Opened 7 years ago

Last modified 22 months ago

#6781 new enhancement

Make cell statistics useful in simulations again

Reported by: robgjansen Owned by:
Priority: Low Milestone: Tor: unspecified
Component: Core Tor/Tor Version: Tor: 0.2.3.20-rc
Severity: Normal Keywords: tor-relay statistics debugging easy
Cc: arma, karsten, robgjansen Actual Points:
Parent ID: #7357 Points:
Reviewer: Sponsor:

Description

Once upon a time, when I set "CellStatistics 1" in my torrc files, each relay in my TestingTorNetwork would track and write statistics to disk. Since writing these every 24 hours was too long for my simulations, I just needed to patch WRITE_STATS_INTERVAL to a smaller value (once per minute). Every new interval, a new entry would be appended to the stats files. These statistics are very useful in determining how our test network looks and how it compares to live Tor.

Somewhere along the line (in 0.2.3.x-alpha I think, but I can't find the ticket), the behavior changed so that each new entry replaces the existing file, presumably under the assumption that by that time the stats from the last entry were already sent to the authority and were no longer needed. Of course they weren't in my simulations, and only getting the last minute of statistics from each relay isn't nearly as useful.

Whats the best solution here? Is there another #define that I should patch so my relays upload stats every minute instead of the current rate? That will cause extra network load. Should we allow the option of appending statistics instead of replacing?

Ideally, I wouldn't have to patch anything and this would all be handled automatically if TestingTorNetwork is 1.

Child Tickets

Change History (8)

comment:1 Changed 7 years ago by arma

Notice how rep_hist_desc_stats_write() still calls append_bytes_to_file() rather than how rep_hist_buffer_stats_write() calls write_str_to_file(). Looks like it should be a simple change.

I'm not yet convinced it should automatically happen for all testing networks though. Appending I could see. Generating it way more often probably isn't so good. Or is it? Hm.

comment:2 Changed 7 years ago by robgjansen

OK, I can see how it wouldn't generally apply to all test networks. A config option explicitly request to append would be sufficient.

Do we also want the option(s) to set the various stats reporting intervals? or is it better if I keep patching that?

comment:3 Changed 6 years ago by nickm

Keywords: tor-relay added

comment:4 Changed 6 years ago by nickm

Component: Tor RelayTor

comment:5 Changed 6 years ago by robgjansen

Cc: arma karsten added
Parent ID: #7357

We might as well decide on what we want and do this as part of #7357.

comment:6 in reply to:  5 Changed 6 years ago by karsten

Replying to robgjansen:

We might as well decide on what we want and do this as part of #7357.

I'd prefer doing this as part of #7357 versus touching the code that aggregates cell statistics for publication to the directory authorities.

comment:7 Changed 6 years ago by robgjansen

Milestone: Tor: 0.2.4.x-finalTor: unspecified

comment:8 Changed 22 months ago by nickm

Keywords: statistics debugging easy added
Priority: MediumLow
Severity: Normal
Note: See TracTickets for help on using tickets.