Opened 3 years ago

Last modified 11 months ago

#17520 new enhancement

Relax the rend cache failure cleanup timer

Reported by: dgoulet Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-hs, tor-client, prop224
Cc: Actual Points:
Parent ID: #23300 Points: 1
Reviewer: Sponsor: SponsorR-can


rend_cache_failure_clean() is called every second and the reason is that we want to make the client wait as little as possible so we try our best to cleanup the failure cache.

This is not ideal CPU wise since the cache could technically grow to the number of possible introduction point in the network thus making it a larger loop every second.

Let's relax the cleanup timer here to 5 minutes (expiry time of an entry) and at each lookup, if the entry did expire, clean it and return that "we do not have an entry". This will not address the size of the cache that can grows but that's fine since we can handle that in the OOM. Also, a cache that has the maximum number of entries is a valid use case.

Child Tickets

Change History (10)

comment:1 Changed 2 years ago by nickm

Milestone: Tor: 0.2.8.x-finalTor: 0.2.9.x-final

It is impossible that we will fix all 226 currently open 028 tickets before 028 releases. Time to move some out. This is my second pass through the "new" and tickets, looking for things to move to 0.2.9.

comment:2 Changed 2 years ago by nickm

Points: small/medium

comment:3 Changed 2 years ago by dgoulet

Sponsor: SponsorRSponsorR-can

Move those from SponsorR to SponsorR-can.

comment:4 Changed 2 years ago by isabela

Milestone: Tor: 0.2.9.x-finalTor: 0.2.???

tickets market to be removed from milestone 029

comment:5 Changed 20 months ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:6 Changed 19 months ago by nickm

Keywords: tor-03-unspecified-201612 added
Milestone: Tor: 0.3.???Tor: unspecified

Finally admitting that 0.3.??? was a euphemism for Tor: unspecified all along.

comment:7 Changed 14 months ago by nickm

Keywords: tor-03-unspecified-201612 removed

Remove an old triaging keyword.

comment:8 Changed 14 months ago by dgoulet

Keywords: tor-hs tor-client added
Parent ID: #17242
Points: small/medium1
Type: defectenhancement

This is relevant to prop224 client implementation as well.

comment:9 Changed 13 months ago by nickm

Keywords: prop224 added

comment:10 Changed 11 months ago by dgoulet

Parent ID: #17242#23300

... is called every 30 seconds actually which is done by rend_cache_failure_clean_callback().

1) Cleanup any entry that expired at lookup.
2) v2 entries expire after 5 minutes. and v3 after 2 minutes.

So, calling the callback every 2 minutes could be what we want to fit both use case *OR* we bring down to 2 minutes the v2.

Note: See TracTickets for help on using tickets.