Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
S
Snowflake
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 43
    • Issues 43
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 5
    • Merge Requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

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.

  • The Tor Project
    • A
      Anti-censorship
  • Pluggable Transports
  • Snowflake
  • Issues
  • #40026

Closed
Open
Created Dec 10, 2020 by Cecylia Bocovich@cohoshOwner

Reduce KCP bottlenecks for Snowflake

I did some diving into the KCP code and played around with the parameters because of the throughput issues we're having with #25723. Even without multiplexing I was able to drastically increase the throughput of snowflake. It looks like the bottleneck was preventing us from even using the full capacity of a single snowflake, let alone allowing for improvements by splitting across several.

KCP sends data in segments, and will only send a maximum number of segments before the other side acknowledges them. The default window size is 32 segments. Also by default, there is a 1:1 mapping between segments and a call to Send on the KCP connection.

SetWindowSize

I tried doubling window size from 32 segments to 64 and got pretty much a doubling of bandwidth from a single snowflake in my local test environment. We need to set this at both the client and server for it to have any affect because the effective window size is the minimum of the sender's send window and the receiver's advertized receive window.

SetStreamMode

Stream mode causes the sender to fragment segments. A call to Send will append data to the previous segment, up to the maximum segment size. I was able to more than double throughput by setting this. This has to be set on the sender's side, so assuming most of our bandwidth needs are download speeds it should be set at the server.

Assignee
Assign to
Sponsor 28: Reliable Anonymous Communication Evading Censors and Repressors (RACECAR)
Milestone
Sponsor 28: Reliable Anonymous Communication Evading Censors and Repressors (RACECAR)
Assign milestone
Time tracking
None
Due date
None