Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #1790

Closed (moved)
(moved)
Open
Created Aug 03, 2010 by Karsten Loesing@karsten

Count bytes spent on answering directory requests

Mike wants to know for his bandwidth weights how many bytes we're writing and reading for directory requests as compared to all bytes. We could add two new lines in the style of write-history and read-history that declare how many bytes were spent on directory requests, including both direct connections to the Dir port and tunneled requests via BEGIN_DIR cells.

Here are some example numbers from my test relay's state file, together with the write-history and read-history lines for comparison:

BWHistoryReadEnds 2010-08-03 08:45:44
BWHistoryReadValues [...],185844736,205917184,207345664,17137133
BWHistoryWriteEnds 2010-08-03 08:45:44
BWHistoryWriteValues [...],223923200,240807936,239798272,21942640
BWHistoryDirReadEnds 2010-08-03 08:43:32
BWHistoryDirReadValues [...]38042624,32221184,32626688,8438197
BWHistoryDirWriteEnds 2010-08-03 08:43:32
BWHistoryDirWriteValues [...],684032,542720,642048,167731

The interval ends of read/written bytes and read/written dir bytes don't match, because the relay was measuring bytes before, but not dir bytes.

I'm wondering why we're reading that many more dir bytes than we are writing. Is something wrong with my patch?

Please find branch dirbytes in my public repository that has the patch. Note that the dirreq-{write,read}-history lines are not added to extra-info descriptors in that patch, but only written to the local state file. Once we're done reviewing the patch, we need to change the r<2 part in rep_hist_get_bandwidth_lines() to r<4 (search for "TODO" in the patch).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking