[tor-relays] Tor uses up all available memory and eventually quits
George W. Maschke
georgemaschke at posteo.de
Wed Jan 31 14:58:50 UTC 2018
Thank you to all who responded to my question!
The memory issue seems to be fixed now, and I would like to share what worked (and what didn’t).
I first tried setting MaxMemInQueues to 512, then 384, while still running Tor 0.2.5.16. This didn’t help.
Adding the option DisableOOSCheck 0 caused an error that prevented Tor from starting.
I then upgraded Tor to 0.3.2.9. With this version, setting MaxMemInQeues to 384 seems to have fixed the problem, with no other changes to /etc/tor/torrc.
Tor has been running for 29 hours with memory usage hovering around 85%, while average throughput is close to 10 megabytes per second.
For any who are interested, additional details about the relay in question are available here:
George W. Maschke
> On Jan 31, 2018, at 4:02 AM, teor <teor2345 at gmail.com> wrote:
> On 31 Jan 2018, at 10:45, r1610091651 <r1610091651 at telenet.be <mailto:r1610091651 at telenet.be>> wrote:
>> On Sun, 28 Jan 2018 at 11:06 teor <teor2345 at gmail.com <mailto:teor2345 at gmail.com>> wrote:
>> Try to make sure MaxMemInQueues allows 10-20s of traffic.
>> Hi teor
>> That advice is quite sensible in my opinion and should be incorporated into tor mainline. With the recent load spikes, I've always wanders why is there a need for that may MB or even GB of queue memory. If it can't be retransmitted in few seconds, it will be retransmitted by source and will increase the queues further...
> Tor doesn't work like TCP.
> Clients do give up and retry after about 10-20s.
> But if a circuit is broken by discarding cells, then the entire circuit needs
> to be rebuilt, and the request sent again. And the client will probably
> choose another path, that isn't as congested.
> A large MaxMemInQueues keeps circuits from breaking during traffic
> But you're right, if the whole network is overloaded, it leads to a lot of large
> buffers that don't do much.
>> The current setting for maxmeminqueue is 256MB and will correct itself if lowered. I would suggest to make that value rate dependent, either configured or measured.
>> To your knowledge, was there any thought put into such a dynamic config, instead of fixed percentage of free memory, independent of the actual throughput?
> There's a ticket to make it lower:
> https://trac.torproject.org/projects/tor/ticket/24782 <https://trac.torproject.org/projects/tor/ticket/24782>
> One problem with dynamic limits is that they don't handle traffic spikes well.
> So we don't want to make it too low, because if your relay has the RAM,
> it should use it.
> tor-relays mailing list
> tor-relays at lists.torproject.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the tor-relays