Opened 2 years ago

Closed 13 months ago

#22747 closed defect (implemented)

Pls document relay with restricted socket count

Reported by: tmpname0901 Owned by: teor
Priority: Medium Milestone: Tor: 0.3.5.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: doc tor-relay
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

There is documentation in the Tor manual about how to alleviate the problem of constrained socket memory (ConstrainedSockets, ConstrainedSockSize), but not about a restricted number of sockets.

The problem of a restricted number of TCP sockets is particularly acute in OpenVZ VPSs. A vendor may offer a great deal of bandwidth, but then restrict the practical use of it by imposing a low limit on the number of sockets in use.

So... how do I tell my relay to use no more than n TCP sockets?


    # cat /proc/user_beancounters | grep sock
        numtcpsock          3         4        3000        3000
        othersockbuf    46240    108960    20571088    28942177
        numothersock       42        56        3000        3000

Child Tickets

Change History (4)

comment:1 Changed 2 years ago by nickm

Keywords: tor-relay added
Milestone: Tor: 0.3.0.x-finalTor: unspecified
Status: newneeds_information

Did you see the documentation for the ConnLimit option? Did it make sense?

comment:2 Changed 13 months ago by traumschule

Component: Webpages/WebsiteCore Tor
Owner: set to teor
Status: needs_informationassigned

you probably can easily answer this. don't see the website relation.

comment:3 in reply to:  1 Changed 13 months ago by teor

Component: Core TorCore Tor/Tor
Keywords: doc added; Documentation removed
Milestone: Tor: unspecifiedTor: 0.3.5.x-final
Status: assignedneeds_review
Type: taskdefect
Version: Tor: 0.3.0.8

Replying to nickm:

Did you see the documentation for the ConnLimit option? Did it make sense?

ConnLimit is "The minimum number of file descriptors that must be available to the Tor process before it will start."

https://www.torproject.org/docs/tor-manual.html.en

It's not actually a socket limit. (Which confused me a lot when the extra load hit in late 2017.)

My branch bug22747 on https://github.com/teor2345/tor.git explains how to use ulimit and ConnLimit to limit tor's file descriptor usage. But those instructions only work on small private bridges. (Relays need thousands of sockets, to connect to every other relay.)

comment:4 Changed 13 months ago by nickm

Resolution: implemented
Status: needs_reviewclosed

seems useful; merged!

Note: See TracTickets for help on using tickets.