[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #1131 [RPM packaging]: fedora rpm doesn't set ulimit -n, so you can't run a fast relay
#1131: fedora rpm doesn't set ulimit -n, so you can't run a fast relay
------------------------------+---------------------------------------------
Reporter: arma | Owner: hiviah
Type: defect | Status: needs_revision
Priority: normal | Milestone:
Component: RPM packaging | Version: 0.2.1.19
Resolution: | Keywords:
Parent: | Points:
Actualpoints: |
------------------------------+---------------------------------------------
Changes (by hiviah):
* status: assigned => needs_revision
Comment:
This looks like it's been fixed some time ago.
Currently the startup will for 0.2.3.22rc sets ulimit depending on
/proc/sys/fs/file-max. Value of 8192 or higher is used if /proc/sys/fs
/file-max is at least 10000:
{{{
# Raise ulimit based on number of file descriptors available (thanks,
Debian)
if [ -r /proc/sys/fs/file-max ]; then
system_max=`cat /proc/sys/fs/file-max`
if [ "$system_max" -gt "80000" ] ; then
MAX_FILEDESCRIPTORS=32768
elif [ "$system_max" -gt "40000" ] ; then
MAX_FILEDESCRIPTORS=16384
elif [ "$system_max" -gt "10000" ] ; then
MAX_FILEDESCRIPTORS=8192
else
MAX_FILEDESCRIPTORS=1024
cat << EOF
}}}
This seems to be good enough, but I have no fast relay I could test it on.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/1131#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs