Skip to content
0:00 / 0:00

#freebsd#netflix#tcp

FreeBSD optimizations used by Netflix serving at 800Gb/s - Drew Gallatin - EuroBSDcon 2022

EuroBSDCon

4.6K subscribers • 5 videos on Hallway

YouTube
  • Recommended by 2 people: 2 on Hacker News.
  • Presented by Drew Gallatin, Software Engineer at Netflix

Advanced. Deep dive for people who know the field.

27K views4 years ago2 recommendations

Systems programmingDistributed systemsOperating systemsPerformance and optimizationNetworking and protocols

Drew Gallatin explains the FreeBSD kernel and networking optimizations that enable Netflix to serve video traffic at 800Gb/s.

Quantifying the importance of several FreeBSD optimizations to serving web traffic at extreme speeds. In previous talks, I've focused on new optimizations such as NUMA and NIC kTLS offload, which are critical to serve 800Gb/s. In this talk, I'll focus on the contributions of older, but equally critical optimizations, such as - TCP segmentation offload (TSO) - TCP large receive offload (LRO) - VM optimizations such as the UMA VM pg cache zone and batchqueues - Asynchronous sendfile - Unmapped (extpg) mbufs I will briefly describe the importance of each of these unsung optimizations, explain why they help, and quantify the value of each optimization using a metric I call percent-CPU per Gb. I will wrap up by putting them all together and showing results from an experimental Netflix server serving production traffic at 720Gb/s.

Why it's here

2 people recommend this

What people say. Recommended as an excellent deep dive into high-throughput kernel networking and OS performance tuning.

notaplumber1on Hacker News • Recommends

On “FreeBSD optimizations used by Netflix to serve video at 800Gb/s [pdf]”

This talk was given at this years EuroBSDcon in Vienna, recording is up on YouTube. link link to this video Some really great talks this year from all the *BSDs, highly recommend checking a look: link

thomasjudgeon Hacker News • Recommends

On “Video Streaming at Scale with Kubernetes and RabbitMQ”

OP mentions that "I would love to be a little mouse and peek at YouTube’s complete architecture to see how far we are from them." You can occasionally find posts -often linked here- from another player in streaming video which you might have heard of, discussing technical architecture. For example, this might be a little lower level that you may be interested in as it relates to kernel optimizations to jack bit throughput rates, but I dig this sort of thing - link to this video

drewg123on Hacker News • Mentions

On “FreeBSD optimizations used by Netflix to serve video at 800Gb/s [pdf]”

…lock_delay called out of the aio code. Its also obvious from lockstat stacks (run as lockstat -x aggsize=4m -s 10 sleep 10 > results.txt) See the graph on page 38 or so. The plateaus are mostly memory copy functions (memcpy, copyin, copyout). We already use FreeBSD on our CDN, so it just made sense to do the work in FreeBSD. The talk is on Youtube link to this video…

throw0101con Hacker News • Mentions

On “Happy 50th Birthday, Ethernet”

…t's a bit of a stretch already. How limiting is 1500 for the end-nodes for most people? For access-, distribution-, and core-layer switches the ASICs process things at wire speed, so does it matter what the frame size is? I can see some server applications, but we've had offloading for years now: * link Netflix is hitting (encrypted) 800 Gb/s: * link to this video * link > TCP is also sticking around for too long. Almost nothing wants a stream these days, lots and lots of applications reinvent datagrams on top of it. Tallk to the vendors of middleware boxes (e.g., (CPE) firewalls): we've had (say) SCTP and DCCP for twenty years that offer variations, but they're never allowed to pass through. No ne…

craftkilleron Hacker News • Mentions

On “Linux Performance Analysis (2015)”

Netflix discusses their reasons starting at 18:20: link tl;dw: the performance, the efficiency of development, the community, FreeBSD is a complete operating system, the code base is smaller, the ports system, and the license. and this video covers the optimizations Netflix has made to FreeBSD: link to this video Also potentially a reason: According to drewg123, Linux's kTLS was broken. Which I see drewg123 also commenting in this thread. Is he the "Drew on my team" mentioned in the first video? Is he the speaker in the 2nd video? Idk link