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

David Fifield david at bamsoftware.com
Wed Aug 4 02:23:42 UTC 2021


On Wed, Jun 30, 2021 at 06:43:03PM -0600, David Fifield wrote:
> While experimenting with another tunnel built on KCP and smux, I
> discovered that performance could be greatly increased by increasing the
> size of smux buffers. It's likely that doing the same can also improve
> performance in Snowflake.

I spent a good deal of time trying to see if adjusting the size of smux
buffers could also improve the performance of dnstt. The full
information is here:

https://www.bamsoftware.com/software/dnstt/performance.html#download-20210802

I had mixed results. I initially had promising results when connecting
directly to the dnstt server using plaintext UDP DNS, without a
recursive resolver. But the configurations with a recursive resolver
proved difficult to optimize.

These are the parameters I settled on:
 * smuxConfig.MaxStreamBuffer = 1 * 1024 * 1024 (both client and server)
 * KCP conn.SetWindowSize(64, 64)
 * turbotunnel.queueSize = 128
You can see numbers from my brief parameter search in the commit
message:
https://repo.or.cz/dnstt.git/patch/de15c5a51291cae19dfad26149f00b2b836edfb3



More information about the anti-censorship-team mailing list