[tor-dev] Fwd: [tor-relays] tcmalloc in FreeBSD

Jordi Espasa Clofent jespasac at minibofh.org
Mon Aug 6 15:08:45 UTC 2012


I posted this message in tor-relays, but it seems to me (and another 
people) that dev mail-list is better channel to use.


-------- Original Message --------
Hi all,

 From time to time my tor node (minibofh) stopped to work properly;
since it's a tiny FreeBSD VPS, the root origin was some CPU
over-consumption. I'm taking some actions to fix it (more swap, freeing
CPU from another services... etc).

The FreeBSD tor port offers to you the tcmalloc compilation option, so I
had some fun reading this interesting paper:

I recompiled the tor port but just using the tcmalloc option. Actually,
now I got the google-perftool package and, obviously, the tcmalloc library:

mb# pkg_info | grep google
google-perftools-1.8.3 Fast, multi-threaded malloc() and nifty
performance analysi

mb# pkg_info -L google-perftools-1.8.3 | grep malloc.so

But, when I'm checking which libraries the tor binary is using, I get:

mb# ldd /usr/local/bin/tor
	libz.so.5 => /lib/libz.so.5 (0x281aa000)
	libm.so.5 => /lib/libm.so.5 (0x281bc000)
	libevent-2.0.so.6 => /usr/local/lib/event2/libevent-2.0.so.6 (0x2844e000)
	libssl.so.7 => /usr/local/lib/libssl.so.7 (0x28489000)
	libcrypto.so.7 => /usr/local/lib/libcrypto.so.7 (0x284d7000)
	libthr.so.3 => /lib/libthr.so.3 (0x281df000)
	libc.so.7 => /lib/libc.so.7 (0x28090000)

So... I understand that the tor binary is actually NOT using the new
tcmalloc library.

Am I wrong?

PS. I adding a CC to tor FreeBSD port mantainer.

More information about the tor-dev mailing list