[anti-censorship-team] Improving Snowflake performance by adjusting smux parameters

Cecylia Bocovich cohosh at torproject.org
Thu Jul 15 19:56:40 UTC 2021


On 2021-07-14 4:01 p.m., Kali Kaneko wrote:
> On Wed, Jul 14, 2021 at 03:20:31PM -0400, Cecylia Bocovich wrote:
> 
>> I starting doing a few quick performance tests by just modifying the
>> client. This should be enough to check the impact of tuning the
>> MaxStreamBuffer and MaxReceiveBuffer for download speeds.
> 
> Last weekend Jacobo and me were playing a little bit with tweaking the
> buffer sizes on the client. I kind of observe some patterns, but after a
> few runs I suspected that I was catching more temporal network
> variations than any buffer effects.
> 
> https://0xacab.org/kali/snowflake-metrics/-/blob/no-masters/data/Rplots.pdf
> https://0xacab.org/kali/snowflake-metrics/-/blob/no-masters/data/maxstreambuffer.png
> 
Hi!

This is interesting, thanks for sharing! Yes, I suspect most of the
variations you're seeing in these tests are due to network effects, and
the different throughput and latency of the snowflake proxy you happen
to be connecting to for that run. This matches the results of my own tests.

I think the lack of a clear pattern in the results is due to another
bottleneck in KCP that will limit any performance improvements that we
might get in the smux configuration. Once this patch is merged, and both
the client and server's KCP window sizes are increased, we might have
more luck:
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/48

> I wanted to measure too the number of snowflakes needed to complete a
> single download, to try to isolate the high variability across different
> runs. I might be wrong, but in a quick exploration the time-to-bootstrap
> seemed to be significant as a predictor of the download rate together
> with the buffer size.

Can you elaborate a bit on what you mean by the number of snowflakes needed?

The time to bootstrap a Tor connection to 100% will indeed be a good
predictor of the download speed, because all of the network messages
needed to bootstrap a full Tor circuit are sent over the same Snowflake
connection that you are using to download files or browse the web. So,
if you received a slow/low bandwidth/high latency snowflake proxy, both
the bootstrap and the download will be slow.

> 
> Before continuing with these tests: is it advisable to run this kind of
> tests against the working infrastructure, or should I better setup
> snowbox in order to parametrize any changes? (ideally, simulating
> real-world latencies).
> 

Thanks for asking! In general it's okay to run client-side tests on
real-world snowflake as long as you're not overwhelming the network. At
this point we don't have a lot of clients connecting to snowflake and
both the bridge and broker are doing well at handling the current load
so you're probably fine. It's a good idea to space out your tests anyway
for scientific validity purposes. If, for example, you want to make 100
snowflake connections, you could make 10 connections per hour or 25
connections every 6 hours, rather than doing them all at once
immediately sequentially or in parallel.

If you're unsure about the impact of your tests on the system feel free
to reach out here or on IRC as well :) it's awesome that you're doing
research on the snowflake network and we'd like to help if we can!

Cecylia



More information about the anti-censorship-team mailing list