[tor-bugs] #24737 [Core Tor/Tor]: Recommend a MaxMemInQueues value in the Tor man page

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Jun 3 00:11:35 UTC 2018


#24737: Recommend a MaxMemInQueues value in the Tor man page
----------------------------+----------------------------------
 Reporter:  starlight       |          Owner:  (none)
     Type:  defect          |         Status:  new
 Priority:  Medium          |      Milestone:  Tor: unspecified
Component:  Core Tor/Tor    |        Version:
 Severity:  Normal          |     Resolution:
 Keywords:  doc, tor-relay  |  Actual Points:
Parent ID:                  |         Points:  0.5
 Reviewer:                  |        Sponsor:
----------------------------+----------------------------------

Comment (by starlight):

 The critical factor in socket memory allowance is

    net.ipv4.tcp_mem = <min> <pressure> <max>

 where <max> is the absolute maximum memory allocated to socket
 buffers in 4096 byte pages.  Checking a couple of systems the
 default values vary form 2/3rds of a 3G virtual machine to 20% of
 an 8GB physical machine.  Not to be confused with tcp_rmem
 and tcp_wmem per-socket tuning parameters.

 Correct advice advice for preventing OOM daemon crashes in
 worst-case scenarios should probably be something like:

 1) find out what tcp_mem <max> is and subtract that from physical
 memory to arrive at memory available for the daemon; subtract an
 additional 384-512MB for the kernel.  Tune tcp_mem if you don't
 like the defaults.

 2) The remaining memory is allocated to one or more tor daemons
 where each daemon is allocated 130% of MaxMemInQueues.

 The above can be turned into a table indicating MaxMemInQueues
 values for different typical distros easily enough, though
 hopefully most operators are able to divide a number by 1.3

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


More information about the tor-bugs mailing list