Re: [tor-relays] How to limit number of sockets used?

2013-04-10 Thread Dennis Ljungmark
You should be able to use normal ulimit style settings,   Limiting open
files count (a socket is an open file).


On Wed, Apr 10, 2013 at 8:38 AM, Roger Dingledine a...@mit.edu wrote:

 On Tue, Apr 09, 2013 at 10:19:38PM -0400, Steve Snyder wrote:
  I am running Tor v0.2.3.25 in a VPS that limits me to a max of 4096
  sockets in use.  How can I instruct Tor not to attempt to use more
  than this number?
 
  Yes, I know about ConstrainedSockets/ConstrainedSockSize, but the
  way I read these it limits the amount of memory used, not the socket
  count.
 
  Advice, please?  Thanks.

 I believe there is no such feature currently.

 How should it work? That is, which connections should it refuse?

 Currently we assume that all relays are able to reach all other relays.
 Otherwise we get into the situation where the network isn't a clique,
 and anonymity analysis from path selection gets complex really quickly
 (I saw the connection from that relay, so the hop before that couldn't
 have been this other relay because there's no link, therefore ...)

 --Roger

 ___
 tor-relays mailing list
 tor-relays@lists.torproject.org
 https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays

___
tor-relays mailing list
tor-relays@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays


Re: [tor-relays] How to limit number of sockets used?

2013-04-10 Thread Roger Dingledine
On Wed, Apr 10, 2013 at 09:09:44AM +0200, Dennis Ljungmark wrote:
 You should be able to use normal ulimit style settings,   Limiting open
 files count (a socket is an open file).

Yes, you can do this, but it will degrade your relay (and hurt the
network) because it will unpredictably hang up on requests.

--Roger

___
tor-relays mailing list
tor-relays@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays


Re: [tor-relays] How to limit number of sockets used?

2013-04-10 Thread Roman Mamedov
On Tue, 09 Apr 2013 22:19:38 -0400
Steve Snyder swsny...@snydernet.net wrote:

 I am running Tor v0.2.3.25 in a VPS that limits me to a max of 4096 
 sockets in use.  How can I instruct Tor not to attempt to use more than 
 this number?

Do you already hit this limitation in practice? Some time ago I was running a
quite busy relay node on a socket-limited VPS, and if I remember correctly,
observed about 1500-2000 open sockets at most, with my limit being
5000-something.

-- 
With respect,
Roman


signature.asc
Description: PGP signature
___
tor-relays mailing list
tor-relays@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays


Re: [tor-relays] BitTorrent complaint

2013-04-10 Thread Moritz Bartl
On 09.04.2013 18:04, bartels wrote:
 Personally, I cannot afford complaints and spend time on legal issues;
 however groundless they may be it is not what I do.

Spending time on legal issues is part of the job of an exit operator.
Sorry.

DMCA notices are totally harmless.

 Another thing is filtering on bittorrent. The tor site suggests a filter:
 https://trac.torproject.org/projects/tor/wiki/BlockingBittorrent

Just because it is in the community wiki, it is not something you should
do, or an official Tor recommendation. I would advise heavily against
anything that blocks connections outside of the official ExitPolicy
statements. Clients will become unreliable, and have no way of knowing
what happened to their connection.

The quoted snippet blocks connections to trackers, but not torrenting
itself. One of the most popular sites, ThePirateBay, does not even rely
on trackers any more. Apart from that, blocking trackers will also hurt
legal torrenting.

 https://trac.torproject.org/projects/tor/wiki/doc/ReducedExitPolicy
 Must say it is a pretty loose list. I do not see the point in
 accessing a squid proxy server over tor. It sort of defeats the
 purpose.

Maybe you don't, but other users do.

The reduced exit policy blocks most random ports, which is what
Bittorrent clients use for connections. This means it will drastically
reduce the amount of DMCA notices you will receive.

You are free to allow an even more limited amount of ports on your exits.

-- 
Moritz Bartl
https://www.torservers.net/
___
tor-relays mailing list
tor-relays@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays


Re: [tor-relays] How to limit number of sockets used?

2013-04-10 Thread krishna e bera
On Wed, 10 Apr 2013 03:12:14 -0400
Roger Dingledine a...@mit.edu wrote:

 On Wed, Apr 10, 2013 at 09:09:44AM +0200, Dennis Ljungmark wrote:
  You should be able to use normal ulimit style settings,   Limiting open
  files count (a socket is an open file).
 
 Yes, you can do this, but it will degrade your relay (and hurt the
 network) because it will unpredictably hang up on requests.

There is a note in the manual regarding socket use:
The DirPort option should also not be used if TCP buffers are scarce.
The cached directory requests consume additional sockets which
exacerbates the problem.

If that doesnt work, it looks like you are left with reducing sockets
by setting a lower BandwidthRate, value thereof to be figured out by
trial and error.
___
tor-relays mailing list
tor-relays@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays


Re: [tor-relays] How to limit number of sockets used?

2013-04-10 Thread Roman Mamedov
On Wed, 10 Apr 2013 07:51:57 -0400
Steve Snyder swsny...@snydernet.net wrote:

 Yes, I have hit the limit, with the expected Error creating network 
 socket: No buffer space available messages seen.

Afaik this is a different error, and it comes from the RAM limit for network
buffers, not due to hitting the maximum quantity of open sockets.

ConstrainedSockets/ConstrainedSockSize may actually help you here.

Also next time you hit this error, check lsof -n | grep tor | wc -l.
My guess is it will be much lower than 4096.

-- 
With respect,
Roman


signature.asc
Description: PGP signature
___
tor-relays mailing list
tor-relays@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays