summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrl1987 <rl1987@sdf.lonestar.org>2014-10-26 19:37:48 +0200
committerNick Mathewson <nickm@torproject.org>2014-10-28 14:13:30 -0400
commit6317146b4d96c403773eb72fc293352ad3c47487 (patch)
tree518d1f941a29cfea86424a421064a4d9e2d9e090
parent14d59fdc1009dcbcbf6e30c9eee7c3333d68fbd7 (diff)
downloadtor-6317146b4d96c403773eb72fc293352ad3c47487.tar.gz
tor-6317146b4d96c403773eb72fc293352ad3c47487.zip
Initial version of doc/TUNING.
-rw-r--r--doc/TUNING47
1 files changed, 47 insertions, 0 deletions
diff --git a/doc/TUNING b/doc/TUNING
new file mode 100644
index 0000000000..a4bf386dd6
--- /dev/null
+++ b/doc/TUNING
@@ -0,0 +1,47 @@
+Most operating systems limit an amount of TCP sockets that can be used
+simultaneously. It is possible for a busy Tor relay to run into these
+limits, thus being unable to fully utilize the bandwidth resources it
+has at its disposal. Following system-specific tips might be helpful
+to alleviate the aforementioned problem.
+
+Linux
+-----
+
+Use 'ulimit -n' to raise an allowed number of file descriptors to be
+opened on your host at the same time.
+
+FreeBSD
+-------
+
+Tune the followind sysctl(8) variables:
+ * kern.maxfiles - maximum allowed file descriptors (for entire system)
+ * kern.maxfilesperproc - maximum file descriptors one process is allowed
+ to use
+ * kern.ipc.maxsockets - overall maximum numbers of sockets for entire
+ system
+ * kern.ipc.somaxconn - size of listen queue for incoming TCP connections
+ for entire system
+
+See also:
+ * https://www.freebsd.org/doc/handbook/configtuning-kernel-limits.html
+ * https://wiki.freebsd.org/NetworkPerformanceTuning
+
+Mac OS X
+--------
+
+Since Mac OS X is BSD-based system, most of the above hold for OS X as well.
+However, launchd(8) is known to modify kern.maxfiles and kern.maxfilesperproc
+when it launches tor service (see launchd.plist(5) manpage). Also,
+kern.ipc.maxsockets is determined dynamically by the system and thus is
+read-only on OS X.
+
+Disclaimer
+----------
+
+Do note that this document is a draft and above information may be
+technically incorrect and/or incomplete. If so, please open a ticket
+on https://trac.torproject.org or post to tor-relays mailing list.
+
+Are you running a busy Tor relay? Let us know how you are solving
+the out-of-sockets problem on your system.
+