[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r13627: if you have more than 40k FDs on your system let Tor use up (tor/trunk/debian)
Author: weasel
Date: 2008-02-20 17:34:44 -0500 (Wed, 20 Feb 2008)
New Revision: 13627
Modified:
tor/trunk/debian/changelog
tor/trunk/debian/tor.init
Log:
if you have more than 40k FDs on your system let Tor use up to 16k of them by default
Modified: tor/trunk/debian/changelog
===================================================================
--- tor/trunk/debian/changelog 2008-02-20 22:28:26 UTC (rev 13626)
+++ tor/trunk/debian/changelog 2008-02-20 22:34:44 UTC (rev 13627)
@@ -2,14 +2,17 @@
* Change the default for MAX_FILEDESCRIPTORS in our init script to depend
on the number of system-wide available file descriptors:
- /proc/sys/fs/file-max is bigger than 100k, set ulimit -n to 32k, if it's
- smaller than 20k set it to 1024. Big servers at the moment regularly use
- more than 10k FDs, so our old default of 8k no longer is sufficient. On
- the other hand we don't want lower end systems to run out of FDs on Tor's
- account.
+ /proc/sys/fs/file-max is bigger than 80k, set ulimit -n to 32k, if it's
+ greater than 40k set the limit to 16k, and when greater than 20k our limit
+ shall be 8k descriptors. If there are less than 20k FDs in the entire
+ system default to a limit of only 1024.
- -- Peter Palfrader <weasel@xxxxxxxxxx> Wed, 20 Feb 2008 23:27:35 +0100
+ Big servers at the moment regularly use more than 10k FDs, so our old
+ default of 8k no longer is sufficient. On the other hand we don't want
+ lower end systems to run out of FDs on Tor's account.
+ -- Peter Palfrader <weasel@xxxxxxxxxx> Wed, 20 Feb 2008 23:33:00 +0100
+
tor (0.2.0.19-alpha-1) experimental; urgency=low
* New upstream version.
Modified: tor/trunk/debian/tor.init
===================================================================
--- tor/trunk/debian/tor.init 2008-02-20 22:28:26 UTC (rev 13626)
+++ tor/trunk/debian/tor.init 2008-02-20 22:34:44 UTC (rev 13627)
@@ -28,8 +28,10 @@
# Let's try to figure our some sane defaults:
if [ -r /proc/sys/fs/file-max ]; then
system_max=`cat /proc/sys/fs/file-max`
- if [ "$system_max" -gt "100000" ] ; then
+ if [ "$system_max" -gt "80000" ] ; then
MAX_FILEDESCRIPTORS=32768
+ elif [ "$system_max" -gt "40000" ] ; then
+ MAX_FILEDESCRIPTORS=16384
elif [ "$system_max" -gt "20000" ] ; then
MAX_FILEDESCRIPTORS=8192
else