Mike, Rob, and I briefly discussed at the dev meeting that we could make Torperf log circuit failures by adding REASON and REMOTE_REASON from CIRC events to Torperf's output whenever a request fails.
I can see how Torperf learns about circuit failures, but I'm yet unsure how to include this information in its output. Torperf outputs exactly one line per measurement. But if a circuit fails before attaching Torperf's measurement stream to it, we'll never learn about that circuit in the context of this measurement. And I assume this isn't just about circuits failing after they got a stream attached, right?
Here are a few options:
We don't include circuit failure information in Torperf's results, but log CIRC events locally to a separate file. These CIRC event log files won't be archived or made publicly available. This may work if we're only looking for changes in CIRC failures within the next few weeks or so.
We add a new field to Torperf's output collecting all CIRC failures since the last measurement. This is somewhat similar to the QUANTILE and TIMEOUT fields that contain values from the last received BUILDTIMEOUT_SET event.
We give up the one-output-line-per-measurement format and add further information to Torperf's output. This is a rather big data format change though. If we were to do this, we should also move QUANTILE and TIMEOUT to their own lines.
Thoughts?
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
Hrmm.. We're likely to want to observe this data for some time, perhaps on the order of a year, at least. Looking at https://metrics.torproject.org/network.html#versions, it seems to take around 6 months or more for relays to migrate off of the previous stable version. If we assume client churn is similar, we're going to need to watch that data for at least that long (as we transition to ntor with 0.2.4.x).
Since reliability is tied closely to network security, I think we probably want to keep an eye on this data basically forever, just in case we hit some other load barrier that suddenly introduces lots of failure (like socket or TCP sourceport exhaustion).
This makes me think that if we do go the separate file route, we want to publish it, too... (It could be shorter than full CIRC event logs.. We only want the failures vs successes right now).
However, one option for per-line data is only listing the top 2-3 reason pairs so far, and then also list the remaining total under OTHER?
Hmm, okay, let's give up the one-output-line-per-meausurement format. If we need this data for more than a few weeks, we should publish it. And while I see how we could aggregate circuit failures in a single new field for it, this isn't going to scale forever. I'm certain you'll want other circuit information in the future, and then we'd have this discussion again. So, let's screw the format we have and come up with something new. No better time than now to do this.
Here's a sample result line from a currently running 0.2.5.x Torperf (reformatted and annotated):
This is just a draft that may change during implementation. We could also add a separate event type for more detailed information about the stream used for the measurement.
We can easily add reasons for circuit failures, which would mostly be in "circuit" events that are not referenced from "file_download" events.
Anything else that comes to mind that we should add?
JSON sounds like a good choice here for maximum extensibility and machine-readability.
Later down the road, we may want some info on stream reliability and timeout data, too. JSON will make it easier to add those, too.
However, one area where you'll need to take care is how to handle grouping multiple failures. Based on the above example, it looks like you intend all circuits related to a fetch to be encoded in the same top-level JSON object for the fetch? Or do you intend to have separate objects for each failure?
Related: How does Torperf currently handle streams that detach from a circuit and get retried on another circuit? This can happen for example if you get an EXITPOLICY or HOSTUNREACH relay reason back before establishment, or if you hit the stream timeout. Probably some other cases too.
JSON sounds like a good choice here for maximum extensibility and machine-readability.
Great.
Later down the road, we may want some info on stream reliability and timeout data, too. JSON will make it easier to add those, too.
What info on stream reliability and timeout data would that be? The better we know what data we plan to gather, the better we can design the file format.
However, one area where you'll need to take care is how to handle grouping multiple failures. Based on the above example, it looks like you intend all circuits related to a fetch to be encoded in the same top-level JSON object for the fetch? Or do you intend to have separate objects for each failure?
My original idea was to have separate objects for a) each file download including stream details, b) circuit (summary of CIRC events with same CircuitID), and c) BUILDTIMEOUT_SET event. These objects would all be on the top level and contain references to each other. In the example above, there's a field "circ_id": "1365473682.13_501" in the "file_download" event that refers to the "circuit" event.
But you're right, it's quite possible that we use more than one circuit in a single fetch. So far, whenever we detached a stream from a circuit and re-attached it to another circuit, we simply discarded the old circuit information. We shouldn't do that. Instead, we should keep a list of circuits to which a stream was attached, together with REASON and REMOTE_REASON information.
We'll want to have a separate event type for each stream that contains a summary of STREAM events with the same StreamID. This wasn't necessary so far, because we didn't really store anything about the stream we used for the measurement, but that is different now.
Here's an updated example. There could be several "circuit" events in this list, and the "stream" event could contain more than just one of them in its "circuits" field.
Related: How does Torperf currently handle streams that detach from a circuit and get retried on another circuit? This can happen for example if you get an EXITPOLICY or HOSTUNREACH relay reason back before establishment, or if you hit the stream timeout. Probably some other cases too.
(This should be handled by the new data format.)
Thanks for your feedback so far! This is very helpful.
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.
Trac: Resolution: N/Ato wontfix Status: needs_information to closed