Opened 13 months ago

Last modified 3 weeks ago

#25372 new defect

relay: Allocation for compression goes very high

Reported by: dgoulet Owned by:
Priority: High Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-relay, compression, tor-dos, review-group-34, 033-backport?, 034-triage-20180328, performance, oom, 034-removed-must-2018-09-05, regression?, 040-deferred-20190220, 033-backport-unreached
Cc: Actual Points:
Parent ID: Points:
Reviewer: nickm Sponsor:

Description

My relay just OOMed some circuits with filled up queue (#25226) but then a useful log was printed showing that the compress total allocation is huge.

Feb 27 20:02:55.718 [notice] We're low on memory (cell queues total alloc: 232279872 buffer total alloc: 1937408, tor compress total alloc: 878586075 rendezvous cache total alloc: 4684497). Killing circuits withover-long queues. (This behavior is controlled by MaxMemInQueues.)

That 878586075 = ~838MB. My relay is hovering around 1.4GB of RAM right now which means ~60% of the RAM used is in the compression subsystem.

I'm not sure where it all comes, the relay is serving directory data but I have my doubt that *compressed*, it comes down to 800+ MB...

Datapoint:

$ du -sh diff-cache/
131M	diff-cache/

Child Tickets

Change History (21)

comment:1 Changed 13 months ago by nickm

Which compression methods is your tor compiled with?

comment:2 Changed 13 months ago by dgoulet

Which compression methods is your tor compiled with?

Feb 13 20:15:54.919 [notice] Tor 0.3.3.2-alpha-dev (git-86f461e362480bb5) running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.2g, Zlib 1.2.8, Liblzma 5.1.0alpha, and Libzstd N/A.
Version 0, edited 13 months ago by dgoulet (next)

comment:3 Changed 13 months ago by ahf

Owner: set to ahf
Status: newassigned

comment:4 Changed 13 months ago by ahf

Looks like this isn't related to #24368 if Zstandard is disabled.

comment:5 Changed 13 months ago by ahf

Status: assignedneeds_review

A patch that might help us in the future: https://gitlab.com/ahf/tor/merge_requests/24

Please don't close the ticket if this is applied since it doesn't solve the issue, but it might help us debug issues in the future.

comment:6 Changed 13 months ago by nickm

Keywords: review-group-34 added

comment:7 Changed 13 months ago by dgoulet

Reviewer: nickm

Assigning reviewer for week 03/19.

comment:8 Changed 12 months ago by nickm

Status: needs_reviewneeds_revision

ahf: lgtm but please add a changes file?

comment:9 Changed 12 months ago by ahf

Status: needs_revisionneeds_review

Should be fixed now.

comment:10 Changed 12 months ago by nickm

Keywords: 033-backport? added
Status: needs_reviewassigned

Cherry-picked this to 0.3.3. Thank you! Putting this back into "assigned" per earlier instructions.

comment:11 Changed 12 months ago by nickm

Keywords: 034-triage-20180328 added

comment:12 Changed 12 months ago by nickm

Keywords: 034-removed-20180328 added

Per our triage process, these tickets are pending removal from 0.3.4.

comment:13 Changed 12 months ago by nickm

Keywords: 034-must performance oom added; 034-removed-20180328 removed

comment:14 Changed 7 months ago by nickm

Milestone: Tor: 0.3.4.x-finalTor: 0.3.6.x-final
Owner: ahf deleted

comment:15 Changed 7 months ago by nickm

Status: assignednew

comment:16 Changed 7 months ago by teor

Keywords: 034-removed-must-2018-09-05 added; 034-must removed

These tickets were removed from 0.3.4, so they can't be 034-must.

comment:17 Changed 5 months ago by nickm

Milestone: Tor: 0.3.6.x-finalTor: 0.4.0.x-final

Tor 0.3.6.x has been renamed to 0.4.0.x.

comment:18 Changed 6 weeks ago by nickm

Keywords: regression? added

comment:19 Changed 5 weeks ago by nickm

Keywords: 040-deferred-20190220 added
Milestone: Tor: 0.4.0.x-finalTor: unspecified

Deferring 51 tickets from 0.4.0.x-final. Tagging them with 040-deferred-20190220 for visibility. These are the tickets that did not get 040-must, 040-can, or tor-ci.

comment:20 Changed 3 weeks ago by teor

These open, non-merge_ready tickets can not get backported to 0.3.3, because 0.3.3 is now unsupported.

comment:21 Changed 3 weeks ago by teor

Keywords: 033-backport-unreached added

Hmm, I guess they should still get 033-backport-unreached

Note: See TracTickets for help on using tickets.