# How big a VPS for a TOR relay? (BuyVM OvZ or KVM)



## raindog308 (Sep 11, 2013)

Thinking of running a TOR relay (not exit node) for general make-the-world-a-better-place purposes.

- How big a VPS does one need to do this?  Disk doesn't matter but I'm wondering about CPU and RAM.  

- Seems like KVM is perhaps a better choice than OvZ because you have more control over the kernel.  I'm basing that on the TOR FAQ's discussion of various settings the provider might need to set OvZ.

- I don't think there's a way in TOR to say "don't use more than XX GB/TB of bandwidth per month," so I guess I'd have to limit to advertised bandwidth...?

Thanks!


----------



## HalfEatenPie (Sep 11, 2013)

In terms of bandwidth you're probably going to have to limit the port speed.  In terms of CPU and RAM that's actually a very good question.  Although I'd assume it's similar to how an OpenVPN can run on minimal resources (maybe a 256mb, assuming I'm going with "decent RAM" overhead?).  I'm not too sure though.  I'd love it if someone else could please chime in with their expertise!


----------



## Ruchirablog (Sep 11, 2013)

You are fine with OpenVZ. Tor doesnt need any kernel level modifications. Its just install and run. RAM and CPU usage depends on the advertised bandwidth. Anything beyond 3MB/s can eat up the CPU if you have limited resources. 

You should define your question little bit more to give you a definite answer!. How much bandwidth are you going to contribute?


----------



## Nyr (Sep 11, 2013)

You are going to need a nice CPU if you want to serve considerable bandwidth, don't underestimate that part. For the memory, 256 MB is enough for under 100 mbps, as long as you run a 32 bits OS and got SWAP/VSwap.

Kernel modifications are only needed for high bandwidth nodes.

You can limit the advertised bandwidth as well as the daily/weekly/monthly quotas from the Tor configuration.

Feel free to ask any other questions you have.


----------



## Ruchirablog (Sep 11, 2013)

Nyr said:


> For the memory, 256 MB is enough for under 100 mbps, as long as you run a 32 bits OS and got SWAP/VSwap.


Yeah talking about RAM 256MB might be enough to run Tor but CPU usage will be through roof for a single core or 2 considering about the amount of circuits need to be open to use 100Mbps


----------



## Nyr (Sep 11, 2013)

Ruchirablog said:


> Yeah talking about RAM 256MB might be enough to run Tor but CPU usage will be through roof for a single core or 2 considering about the amount of circuits need to be open to use 100Mbps



I am running a 100 mbps node on a single core of a modern processor, using the full core. That's why I said he was going to need a decent one.

Also, Tor doesn't really scale well, so he would probably need two daemons if he wanted to use two cores


----------



## rm_ (Sep 11, 2013)

> - I don't think there's a way in TOR to say "don't use more than XX GB/TB of bandwidth per month,"


There absolutely is, open torrc and look for "Accounting". It has a very sophisticated system to do exactly that, or if you prefer limit per day, per week, etc.

Regarding the requirements, 256MB used to be barely enough, 512MB was the "comfortable" zone.

But sadly nowadays 512MB is not enough (at tens of megabits anyway), at times on my nodes with 512MB RAM and 30Mbit+30Mbit in/out it starts to consume 150-200MB of swap in addition to all the RAM.


----------



## raindog308 (Sep 11, 2013)

Thanks.  I wasn't planning on advertising tons of bandwidth - in fact, probably lower end of the scale because it is a VPS.

I'm thinking a 1024MB, 4-core OvZ VPS.  Probably advertise 3-5Mbps?  Just guessing.  3Mbps (if I've done the math right) is about 1TB a month.  I know BuyVM gives 3TB of bandwidth, though I also know that if everyone used 100% of their allocation the prices would go up dramatically 

I don't have the funds to operate big node - just was hoping to contribute something useful.


----------



## Francisco (Sep 11, 2013)

raindog308 said:


> Thanks.  I wasn't planning on advertising tons of bandwidth - in fact, probably lower end of the scale because it is a VPS.
> 
> I'm thinking a 1024MB, 4-core OvZ VPS.  Probably advertise 3-5Mbps?  Just guessing.  3Mbps (if I've done the math right) is about 1TB a month.  I know BuyVM gives 3TB of bandwidth, though I also know that if everyone used 100% of their allocation the prices would go up dramatically
> 
> I don't have the funds to operate big node - just was hoping to contribute something useful.


Nah. Bandwidth is cheap in Vegas and we also got lots in NY.

It's likely we're going to be bumping the BW on the 1G & 2G plans when we move them to the SSD's.

Thanks for the interest!

Francisco


----------



## rm_ (Sep 11, 2013)

> Probably advertise 3-5Mbps?  Just guessing.  3Mbps (if I've done the math right) is about 1TB a month.


Depends on how efficient you want to be with your money. For me that's something like 10-15TB per each $5/month spent, anything less and I will cancel this or indeed not bother to buy/set it up in the first place.


----------



## raindog308 (Sep 11, 2013)

rm_ said:


> Depends on how efficient you want to be with your money. For me that's something like 10-15TB per each $5/month spent, anything less and I will cancel this or indeed not bother to buy/set it up in the first place.


Maybe I missed it, but what is the strategy you're using?  10TB a month of bandwidth + the CPU to support it for $5 sounds too good to be true, but I may be misinterpreting.


----------

