Opened 10 years ago

Closed 4 years ago

#2766 closed enhancement (wontfix)

Enforce using a fresh circuit for a new Torperf run

Reported by: karsten Owned by:
Priority: Low Milestone:
Component: Archived/Torperf Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Our current approach to enforce using a fresh circuit for a new Torperf run is that we set MaxCircuitDirtiness to something smaller than the interval at which we start new Torperf runs. But whenever we forget to update this setting, Tor won't really tell us that something's wrong. We only learn that when merging .data and .extradata files.

We should switch to sending a NEWNYM signal and stop messing with MaxCircuitDirtiness. Below is a patch that Mike wrote, but that doesn't really fit in, because not all Torperf runs use that script. Maybe we should apply this patch when we merge the various Python scripts in #2565?

commit 6e79ca00fb923d90e63bf10f0e3913ef6641eb5c
Author: Mike Perry <>
Date:   Wed Mar 16 04:46:09 2011 -0700

    Fix to send a NEWNYM signal after every stream.

diff --git a/ b/
index d1c8f34..41678fd 100755
--- a/
+++ b/
@@ -16,6 +16,11 @@ class EntryTracker(TorCtl.ConsensusTracker):
     self.speed = speed
+  def stream_status_event(self, event):
+    # Every time a stream closes, send a NEWNYM signal
+    if event.status == "CLOSED" or event.status == "FAILED":
+      self.c.send_signal("NEWNYM")
   def new_consensus_event(self, n):
     TorCtl.ConsensusTracker.new_consensus_event(self, n)
     TorUtil.plog("INFO", "New consensus arrived. Rejoice!")
@@ -120,7 +125,7 @@ def main():
   conn = TorCtl.connect(HOST, port)
-  conn.set_events(["NEWCONSENSUS", "NEWDESC", "NS", "GUARD"])
+  conn.set_events(["STREAM", "NEWCONSENSUS", "NEWDESC", "NS", "GUARD"])
   conn.set_option("StrictEntryNodes", "1")
   conn.set_option("UseEntryNodes", "1")

Child Tickets

Change History (2)

comment:1 Changed 10 years ago by karsten

Owner: karsten deleted
Status: newassigned

comment:2 Changed 4 years ago by karsten

Resolution: wontfix
Status: assignedclosed

We officially switched from Torperf to OnionPerf for Tor performance measurements. We don't need these tickets anymore and will use OnionPerf's issue tracker for OnionPerf-related issues. Closing them all as wontfix.

Note: See TracTickets for help on using tickets.