[tor-dev] [tor-relays] CPU utilization for relay

Mike Perry mikeperry at fscked.org
Fri Jul 15 16:45:17 UTC 2011


Thus spake swsnyder at snydernet.net (swsnyder at snydernet.net):

> FYI, this is a profile of my Tor v0.2.2.30-rc relay, taken in a 10-minute sampling:
> 
> CPU: CPU with timer interrupt, speed 0 MHz (estimated)
> Profiling through timer interrupt
> samples  %        linenr info                 symbol name
> 3126     29.7290  cast-586.s:9                CAST_encrypt

Can you attach gdb to your relay and set a breakpoint for
CAST_encrypt? We have no idea why this function should be called at
all (unless it is for something like reading keyfiles off disk?) let
alone dominate your profile output.

gdb -p <tor_pid>
(gdb) break CAST_encrypt
(gdb) cont

You may need to stick a 'file /usr/bin/tor' or similar in there.

If you get no hits, try to do it on startup:

gdb /usr/bin/tor

(gdb) break CAST_encrypt
Function "CAST_encrypt" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
(gdb) run [<tor args>]


If you get any hits, run 'backtrace' and give us the output. You may
need to install some debuginfo packages, but gdb should tell you this
if so.

If anyone playing along at home gets any hits on either of these
breakpoints, let us know.

> 1677     15.9486  sha256-586.s:8              sha256_block_data_order
> 1149     10.9272  aes-586.s:424               _x86_AES_encrypt
> 844       8.0266  sha1-586.s:8                sha1_block_data_order
> 273       2.5963  crypto.c:1649               crypto_digest_get_digest
> 221       2.1018  md32_common.h:283           SHA1_Update
> 182       1.7309  encode.c:190                EVP_EncodeBlock
> 171       1.6262  OpenBSD_malloc_Linux.c:1793 ifree
> 136       1.2934  cast-586.s:379              CAST_decrypt
> 130       1.2363  md32_common.h:348           SHA1_Final
> 127       1.2078  obj_lib.c:66                OBJ_dup
> 122       1.1602  memarea.c:221               memarea_alloc
> 110       1.0461  aes-586.s:1610              _x86_AES_decrypt
> 
> After running for 14 hours, the Tor relay has consumed 1.6% of CPU time.  It is now using 45MB of RAM, servicing 112 active connections.
> 
> According to http://torstatus.blutmagie.de my Max/Burst/Observed (Bps) bandwidth is:
> 
>     153600 / 307200 / 127170
> 
> Environment:
> 
> CPU: Pentium-M (Dothan) @ 1.80 GHz
> RAM: 1.0 GB DDR1
> Net: Fast Ethernet connected to a Surfboard cable modem
> 
> CentOS v5.6
> Tor v0.2.2.30-rc
> libevent 2.0.12-stable
> openssl 1.0.0d
> zlib 1.2.5
> glibc 2.5-58
> 
> Just another data point.
> 
> 
> _______________________________________________
> tor-relays mailing list
> tor-relays at lists.torproject.org
> https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays

-- 
Mike Perry
Mad Computer Scientist
fscked.org evil labs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20110715/decd77e9/attachment.pgp>


More information about the tor-dev mailing list