Skip to content
GitLab
  • Explore
  • Sign in
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #40301

relay: Reduce compression level when streaming

Turns out that most of the time, relays will stream back directory content on the highest compression level which means a lot of CPU for the best compression ratio.

However, in the case of authorities, when under DDoS from clients fetching non stop directory documents, it leads to a gigantic amount of CPU time being used on compressing requests that can not be pre-compresssed.

We propose to reduce the compression level, in case of streaming, to the lowest level. Considering that authorities, using Zstd, will see a significant reduction in CPU time but also will still gain on using the highest compression level that Zlib offers.

See https://docs.google.com/spreadsheets/d/1devQlUOzMPStqUl9mPawFWP99xSsRM8xWv7DNcqjFdo/edit#gid=0

Pre-compressed data will still use the current values, only streaming data will be downgraded to lowest ratio.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking