hn.today

Pushing WireGuard on macOS to 5 Gbit/s

firezone.dev66 points7 comments
Screenshot of Pushing WireGuard on macOS to 5 Gbit/s

Firezone’s macOS WireGuard client had been limited to about 1 Gbit/s, with upload speeds sometimes falling to a few hundred Mbit/s and performance worsening as network latency increased. The account describes the effort to raise throughput beyond 5 Gbit/s, using networking fundamentals and investigation of how Apple’s XNU-based systems handle TUN and UDP. It explains that TCP and QUIC discover usable bandwidth through feedback: congestion controllers track acknowledgments and round-trip time, increase the amount of data in flight, and reduce their sending rate when they infer packet loss. Because more latency requires a larger congestion window to sustain the same throughput, losses can be especially costly on high-speed, long-distance connections.

The central engineering lesson is that a VPN must not introduce avoidable packet loss or reordering. A congestion controller cannot tell whether a packet was dropped by a physical network or by the VPN’s own software; either can trigger a rate reduction even when the network has spare capacity. Firezone’s data path spans TUN-reading and writing threads, an event loop for routing, policy and NAT, crypto workers, and UDP threads. These stages communicate through bounded channels, which limit memory use and propagate backpressure: when a later stage is full, its sender waits until capacity becomes available instead of dropping packets. This lets slower processing stages regulate earlier ones, preserving packets and helping the connection use available bandwidth.

Read on firezone.dev7 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

GIMP now has UI tests

GIMP now has UI tests

GIMP has introduced automated UI tests that launch the real application and check common tasks, from opening dialogs to exporting images. The tests run in a hidden desktop on CI servers and use accessibility data, also helping improve screen-reader support. (gimp.org)

PostgreSQL 19

PostgreSQL 19

PostgreSQL 19 adds online table repacking, query-planning advice, faster database operations, and expanded logical replication and standby consistency features. Upgrading requires a migration step, and compatibility changes include removing RADIUS support and enforcing standard-conforming strings. (postgresql.org)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.