Hacker news

  • Top
  • New
  • Past
  • Ask
  • Show
  • Jobs

Pushing WireGuard on macOS to 5 Gbit/s (https://www.firezone.dev)

66 points by wh33zle 1 day ago | 7 comments | View on ycombinator

Veserv 1 day ago |

They claim that at that speed they are spending most of their time in the kernel UDP stack. Is the Mac UDP stack really that abysmal?

Encapsulating byte blobs into UDP packet payloads can easily be designed to go at nearly memory bandwidth speeds which, on a base M1 Mac, is ~500 Gb/s, nearly 100x faster than the speed in the article. Saturating their 40 Gb/s link should be trivial on a single core unless the UDP stack is incompetently designed.

gkbrk about 21 hours ago |

A good coincidence for me. I recently improved the performance of my mesh network using the same sendmsg_x / recvmsg_x API they ended up using in the article too.

Unlike Linux, it's a private API and not something that has support guarantees, but so many projects use it because there's no alternative that can send multiple UDP packets with one syscall.

https://github.com/gkbrk/smolmesh2/commit/10b0c4b9ae898e0fe7...