Running tor relay on a MIPS board (Re: setting up a TOR relay)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The Doctor wrote: Maurizio Lombardi wrote: Considering the fact that my bandwidth is limited to 30 Kb/s (240 Kbps) can it works with just 64 Mb of RAM? (Maybe limiting the number of connections?) I have been trying to run a Tor node on 64 MB of RAM, and it does not seem to work well. Tor stays up for two or three hours and then dies silently. I've been trying to debug it for a few weeks now and I don't know if it's a memory limitation or the same bug that's been discussed in at least one other thread on this mailing list. What about 128 Mb of RAM? No idea. Post if you give it a try, I'm interested in your results. Since my last post, I fixed some annoying problems I was having running tor embedded in a MIPS arch --- actually tor was fine, but there were issues with linking busybox and configuring the kernel. So, I've now pretty much ported my little environment (tor-ramdisk) to MIPS and I'm running a relay only tor node mufasa. Its running in QEMU but as soon as I get my board, I'll move it over. Its status can be seen here: http://torstatus.kgprog.com/router_detail.php?FP=449a610341fa08c0d8c11a2309ef7313b3721451 The biggest question we've had is how much RAM does tor need in these embedded environments. Eg. I believe Kyle Willams who built JanusPA used 256MB. The answer to this question will depend on how you are using tor: client only (like JanusPA), relay only, exit. I'm going to try to address this question systematically for a relay-only node. I'll plot RAM and cpu usage versus BandwidthRate on mufasa for a few points. I'll further break down the RAM between ramdisk versus paging memory. Since the emulated environment is probably not the place to do this reliably, I'll have to wait until my board comes. I'll also proceed carefully. eg. leave a relay up for a week before tweaking the bandwidth. This will give me good statistics and also cause minimal disruption to the tor network itself. For what its worth, here's the current usage after running about 12 hrs: ramdisk 13.8 MB, paging 50.6 MB = total 64.4 MB The mips branch of tor-ramdisk can be obtained here http://opensource.dyc.edu/tor-mipsel-ramdisk BTW, I noticed a lot of downloads after my first post while I was still changing files on the archive so you may want to redownload to get the latest. I've frozen the binaries for mufasa as release 20090125. Any wishlist or caveats before I do my little experiment? - -- Anthony G. Basile, Ph.D. Chair of Information Technology D'Youville College Buffalo, NY 14201 USA (716) 829-8197 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkl8iQEACgkQl5yvQNBFVTWtdgCgpFpX/fzhkckcmK1e+IRvpf7I ebQAn0TnnHVhXrxBmaf/v8V1a0QFXL0Z =mJC9 -END PGP SIGNATURE-
Re: setting up a TOR relay
Maurizio Lombardi wrote: Considering the fact that my bandwidth is limited to 30 Kb/s (240 Kbps) can it works with just 64 Mb of RAM? (Maybe limiting the number of connections?) I have been trying to run a Tor node on 64 MB of RAM, and it does not seem to work well. Tor stays up for two or three hours and then dies silently. I've been trying to debug it for a few weeks now and I don't know if it's a memory limitation or the same bug that's been discussed in at least one other thread on this mailing list. What about 128 Mb of RAM? No idea. Post if you give it a try, I'm interested in your results. -- The Doctor [412/724/301/703] PGP: 0x807B17C1 / 7960 1CDC 85C9 0B63 8D9F DD89 3BD8 FF2B 807B 17C1 WWW: http://drwho.virtadpt.net/ ...and that is how we know the earth is banana-shaped. signature.asc Description: OpenPGP digital signature
Re: setting up a TOR relay
I would really like to know how these two memory requirements scale with BandwidthRate. I'm teaching a course on embedded devices and as part of our class project we're porting tor-ramdisk to a mips board, probably the RB433AH. This sounds like what you're trying to do. You may want to look at http://opensource.dyc.edu/tor-ramdisk http://opensource.dyc.edu/pub/tor-mipsel-ramdisk/ - our very alpha port to a MIPS board http://routerboard.com/ - some of the boards we're looking at Wow, RB433AH, this is exactly the board i want to buy! Thanks for the info! -- Maurizio Lombardi OpenSolaris 2008.11 on x86_64
Re: setting up a TOR relay
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Maurizio Lombardi wrote: Hi, I have a little stupid question: In the near future i will buy a little MIPS-based board running Linux and i would like to set up a TOR relay with it. The problem is that i have an extremely limited amount of RAM ( 64 Mb ) and i read that a tor relay generally needs 768 Mb for a 10 Mbit connection. Considering the fact that my bandwidth is limited to 30 Kb/s (240 Kbps) can it works with just 64 Mb of RAM? (Maybe limiting the number of connections?) What about 128 Mb of RAM? Thanks for the help. Ciao Maurizio, I have (tried) to run a tor relay on a Linksys WRT54G board with about 4MB of ram. It does not work well and runs out of ram quickly. I gave the details of how I did it on this list so you can search the archives. As a reference for how much ram one needs, I do have experience running tor in an embedded environment but on an i386 box. Node simba has been running for months and boots tor-ramdisk, a micro linux distro which basically sets up a ramdisk root filesystem with the bare essentials for a tor server. I set aside 128MB for ramdisk and that's more than enough for BandwidthRate 150KB with BandwidthBurst 200KB --- in fact its overkill. From memory I think I only need 30 MB or so for ramdisk. What I don't have a good feeling for is how much paging memory is needed at those speed. Node simba has 4GB of ram and never comes close to using it all but I'm not in front of the box right now and I can't say what its using right now. There is no remote access. (When I walk my dog to the lab later I'll take a look and get back to you:) I also run bonob2, a relay node on an ordinary box --- its on our lab's ftp server. Its running at BandwidthRate 50KB with BandwidthBurst 75KB. As I write this, ps aux gives RSS of 448 MB and its DataDirectory holds about 21 MB. I would really like to know how these two memory requirements scale with BandwidthRate. I'm teaching a course on embedded devices and as part of our class project we're porting tor-ramdisk to a mips board, probably the RB433AH. This sounds like what you're trying to do. You may want to look at http://opensource.dyc.edu/tor-ramdisk http://opensource.dyc.edu/pub/tor-mipsel-ramdisk/ - our very alpha port to a MIPS board http://routerboard.com/ - some of the boards we're looking at - --Tony Basile -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkl456MACgkQl5yvQNBFVTXZ4ACgiLyP0kTEi0GMYyEVItdLm42Y cBMAn2uNkfiBQjijj0BO/kzMiJs2HP5r =WtqX -END PGP SIGNATURE-