Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #1706

Closed (moved)
Open
Opened Jul 19, 2010 by Karsten Loesing@karsten

Calculate fraction of bytes spent on answering directory requests

I'm using the following patch to distinguish Directory traffic from OR traffic on my test relay:

diff --git a/src/or/connection.c b/src/or/connection.c index 7b1493b..9eeed63 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -2075,11 +2075,17 @@ connection_buckets_decrement(connection_t *conn, time_t n if (conn->type == CONN_TYPE_EXIT) rep_hist_note_exit_bytes_read(conn->port, num_read); rep_hist_note_bytes_read(num_read, now);

  • log_info(LD_DIR, "Read %d bytes from %s connection " U64_FORMAT ".",

  •         num_read, conn_type_to_string(conn->type),
  •         U64_PRINTF_ARG(conn->global_identifier));

    } if (num_written > 0) { if (conn->type == CONN_TYPE_EXIT) rep_hist_note_exit_bytes_written(conn->port, num_written); rep_hist_note_bytes_written(num_written, now);

  • log_info(LD_DIR, "Wrote %d bytes to %s connection " U64_FORMAT ".",

  •         num_written, conn_type_to_string(conn->type),
  •         U64_PRINTF_ARG(conn->global_identifier));

    }

    if (connection_counts_as_relayed_traffic(conn, now)) {

As a result, I get a very low fraction of Directory traffic compared to OR traffic. I wonder why that is the case.

In the attachment you can find a histogram of 10-second intervals and the sum of read and written bytes in KiB/s. There are only very few Directory connections with very little bandwidth consumption in that histogram. This is a 500 KiB/s middle node running for 24 hours.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#1706