[tor-bugs] #13702 [Tor]: Adding OpenBSD to doc/TUNING

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Jan 31 17:21:01 UTC 2015


#13702: Adding OpenBSD to doc/TUNING
---------------------------+-----------------------------------------------
     Reporter:  mmcc       |      Owner:
         Type:             |     Status:  closed
  enhancement              |  Milestone:  Tor: 0.2.6.x-final
     Priority:  normal     |    Version:  Tor: unspecified
    Component:  Tor        |   Keywords:  OpenBSD, tuning, doc/TUNING lorax
   Resolution:  fixed      |  Parent ID:
Actual Points:             |
       Points:             |
---------------------------+-----------------------------------------------

Comment (by mmcc):

 ''Below is (IMO) a better, clearer, and more thorough version. Feel free
 to make any necessary corrections. I know you're busy, so obviously feel
 free to leave it as is for now.''

 Because OpenBSD is primarily focused on security and stability, it uses
 default resource limits stricter than those of more popular Unix-like
 operating systems.

 OpenBSD stores a kernel-level file descriptor limit in the sysctl variable
 kern.maxfiles. It defaults to 7,030. To change it to, for example, 16,000
 while the system is running, use the command 'sudo sysctl
 kern.maxfiles=16000'. kern.maxfiles will reset to the default value upon
 system reboot unless you also add 'kern.maxfiles=16000' to the file
 /etc/sysctl.conf.

 There are stricter resource limits set on user classes, which are stored
 in /etc/login.conf. This config file also allows limit sets for daemons
 started with scripts in the /etc/rc.d directory, which presumably includes
 Tor.

 To increase the open file limit from its default of 1,024, add the
 following to /etc/login.conf:

 {{{
 tor:\
         :openfiles-max=13500:\
         :tc=daemon:
 }}}

 Upon restarting Tor, it will be able to open up to 13,500 file
 descriptors.

 This will work *only* if you are starting Tor with the script
 /etc/rc.d/tor. If you're using a custom build instead of the package, you
 can easily copy the rc.d script from the Tor port directory.
 Alternatively, you can ensure that the Tor's daemon user has its own user
 class and make a /etc/login.conf entry for it.

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


More information about the tor-bugs mailing list