Opened 2 years ago

Last modified 6 months ago

#25950 new defect

Run "accounting_run_housekeeping" with a periodic event.

Reported by: nickm Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: 034-roadmap-subtask, 034-triage-20180328, 034-included-20180328
Cc: Actual Points:
Parent ID: #26070 Points: 5
Reviewer: Sponsor:

Description (last modified by nickm)

Here's an implementation sketch:

  • Make accounting_add_bytes() check whether limits are exceeded. Refactor the code as needed to make this check fast.
  • If a limit is exceeded, schedule consider_hibernation().
  • Also schedule consider_hibernation() again based on "shutdown_time", "hibernate_end_time", and "interval_wakeup_time".
  • Pull "accounting_run_housekeeping" apart:
    • Other logic to set interval_end_time if it isn't set but accounting is enabled.
    • A periodic event, only scheduled when network is on and accounting is enabled, to record bandwidth usage. Tie this into the or_state_save event.

Child Tickets

Change History (9)

comment:1 Changed 2 years ago by nickm

Description: modified (diff)

comment:2 Changed 2 years ago by nickm

Milestone: Tor: 0.3.4.x-finalTor: unspecified

This would still be good to do, but #26064 should be sufficient for now.

comment:3 Changed 2 years ago by nickm

Parent ID: #25375

comment:4 Changed 2 years ago by nickm

Parent ID: #26070

comment:5 Changed 14 months ago by nickm

Owner: nickm deleted
Sponsor: Sponsor31-can

comment:6 Changed 13 months ago by nickm

Points: 3

comment:7 Changed 13 months ago by nickm

Points: 35

comment:8 Changed 6 months ago by gaba

Sponsor: Sponsor31-can

No more sponsor 31. All this tickets remained open after sponsor 31 ended.

comment:9 Changed 6 months ago by teor

Status: assignednew

Change tickets that are assigned to nobody to "new".

Note: See TracTickets for help on using tickets.