[tor-bugs] #9708 [Tor]: Clarify "please raise ulimit -n" message

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Sep 10 15:16:02 UTC 2013


#9708: Clarify "please raise ulimit -n" message
-------------------------+-------------------------------------------------
     Reporter:  philip   |      Owner:
         Type:           |     Status:  new
  enhancement            |  Milestone:  Tor: 0.2.5.x-final
     Priority:  minor    |    Version:  Tor: 0.2.4.16-rc
    Component:  Tor      |   Keywords:  tor-relay 024-backport log, ulimit,
   Resolution:           |  limits
Actual Points:           |  Parent ID:
       Points:           |
-------------------------+-------------------------------------------------

Comment (by philip):

 After a bit more fiddling, it turns out that the relevant tunables are:

  - kern.maxfiles: maximum file descriptors in the system
  - kern.maxfilesperproc: maximum file descriptors per process
  - kern.ipc.maxsockets: maximum numbers of sockets
  - kern.ipc.somaxconn: maximum number of sockets in the listen queue

 With kern.maxfiles=30000, kern.maxfilesperproc=27000,
 kern.ipc.maxsockets=30000 and kern.ipc.somaxconn=4096, I'm able to keep
 Tor juggling about 21000 connections on average without any upsetting
 messages in the tor log.  My kernel gets a little bit unhappy if I raise
 these any further, but ... that's not really Tor's fault.

 I'm not sure if there's any point in Tor reporting what resource is being
 exhausted.  The kernel will complain about the length of the listen queue.
 It'll also helpfully report the PID of the process that's eating all your
 filedescriptors (that message was flooded out by an unrelated one
 yesterday, so I didnt spot it).

 Given the number of tunables, I'd suggest amending the manpage with a
 section "performance tunables", pointing out 'ulimit -n' on Linux and the
 list above for FreeBSD (I imagine that otherBSD tunables are broadly
 similar if not identical, but I've not checked).

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9708#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list