Opened 10 years ago

Closed 3 years ago

#1131 closed defect (wontfix)

fedora rpm doesn't set ulimit -n, so you can't run a fast relay

Reported by: arma Owned by: hiviah
Priority: Medium Milestone:
Component: Core Tor/RPM packaging Version: 0.2.1.19
Severity: Normal Keywords:
Cc: arma Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by arma)

If you run a fast relay, you will end up using more than the default
1024 file descriptors. Currently we point people who run relays to
https://www.torproject.org/docs/tor-doc-relay.html.en and hope they
read through to item #14.

Debian, on the other hand, has a clause in the init script:
https://gitweb.torproject.org/debian/tor.git/blob_plain/HEAD:/debian/tor.init
that sets MAX_FILEDESCRIPTORS based on how many file descriptors are
available on the machine, before it launches the Tor process.

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (9)

comment:2 Changed 8 years ago by katmagic

Resolution: Nonefixed
Status: assignedclosed

Enrico fixed this.

comment:3 Changed 8 years ago by arma

Description: modified (diff)
Resolution: fixed
Status: closedreopened

comment:4 in reply to:  2 Changed 8 years ago by arma

Description: modified (diff)
Priority: minornormal

Replying to katmagic:

Enrico fixed this.

Not well enough, I think. 4096 is better than 1024, but still not enough for fast relays, which sometimes use 10000 or more file descriptors. So I think it remains the case that you can't run a fast relay with Fedora's RPM.

Here's a link to the Red Hat init script that our RPM uses:
https://git.torproject.org/tor/contrib/tor.sh.in
which already has this feature sorted out.

comment:5 Changed 7 years ago by Sebastian

Component: Tor bundles/installationRPM packaging

comment:6 Changed 7 years ago by erinn

Owner: changed from erinn to hiviah
Status: reopenedassigned

comment:7 Changed 7 years ago by hiviah

Status: assignedneeds_revision

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.

comment:8 in reply to:  7 Changed 7 years ago by rransom

Replying to hiviah:

This looks like it's been fixed some time ago.

This ticket is about the RPM provided by Fedora, not the RPMs you are now providing for use on Fedora.

comment:9 Changed 3 years ago by cypherpunks

Resolution: wontfix
Severity: Normal
Status: needs_revisionclosed

The torproject does not longer provide RPMs.

Note: See TracTickets for help on using tickets.