Live data from Hacker News

NUMA Siloing in the FreeBSD Network Stack [pdf]

people.freebsd.org

51–60 of 137 posts

Re: NUMA Siloing in the FreeBSD Network Stack [pdf]

#51
post #2

Is it still accurate that for network bound servers that FreeBSD still outperforms Linux?

Author here.. It depends heavily on the workload. We have man years of optimizations for our CDN workload that we have been upstreaming to FreeBSD. See, for example, the other talk I co-presented regarding Kernel TLS on FreeBSD. https://people.freebsd.org/~gallatin/talks/euro2019-ktls.pdf

What made Netflix pick FreeBSD over Linux in the first place?

Re: NUMA Siloing in the FreeBSD Network Stack [pdf]

#52

This may be a dumb question, but why would streaming video need to be encrypted? Is this just part of the "encrypt everything" best practice these days? Is there metadata accompanying the video data that shouldn't be unencrypted? Is it just so it's not possible to eavesdrop on the fact that I'm watching "Marvelous Mrs. Maisel"?

Also to prevent the video stream from being modified / replaced in transit.

Re: NUMA Siloing in the FreeBSD Network Stack [pdf]

#53

This may be a dumb question, but why would streaming video need to be encrypted? Is this just part of the "encrypt everything" best practice these days? Is there metadata accompanying the video data that shouldn't be unencrypted? Is it just so it's not possible to eavesdrop on the fact that I'm watching "Marvelous Mrs. Maisel"?

The main reason is probably DRM.

This is about TLS. DRM would probably be another layer of encryption inside?

Re: NUMA Siloing in the FreeBSD Network Stack [pdf]

#54

This may be a dumb question, but why would streaming video need to be encrypted? Is this just part of the "encrypt everything" best practice these days? Is there metadata accompanying the video data that shouldn't be unencrypted? Is it just so it's not possible to eavesdrop on the fact that I'm watching "Marvelous Mrs. Maisel"?

The main reason is probably DRM.

Well, no. You talking about HDCP. In this case it's just TLS.

There is a lot of reasons why everything should be behind TLS.

Re: NUMA Siloing in the FreeBSD Network Stack [pdf]

#55

Nice to see AMD replacing Intel, they've gone with EPYC 7551 & 7502P, from 2x Intel “Skylake” / “Cascade Lake” Xeon edit: it looks like they hit 200GB/s with both Intel and AMD

It's disappointing to hear that AMD has not provided adequate performance monitoring tools though. I would have thought by the second generation of Zen that this would be an area that AMD had given attention to.

Re: NUMA Siloing in the FreeBSD Network Stack [pdf]

#56
post #16

Earlier quoted context omitted.

I think once you get to a certain traffic level you are forced to do kernel-bypass stuff like DPDK. Regardless of Linux or FreeBSD being the kernel.

If it's just serving files you don't necessarily need DPDK/XDP. For server-grade hardware there now is P2P-DMA and TLS accelerators which can offload everything to peripherials while still using normal socket APIs. You get NVMe -(PCIe)-> crypto accelerator -(PCIe)-> ethernet for the bulk of the data. Neither CPU nor main memory see any of the network packets as long as they stay on the happy path. Only connection set…

I know Chelsio has crypto directly on the NIC, but are dedicated crypto accelerator cards a thing and are they ever worth it? Why leave the CPU idle when the CPU itself is a good crypto accelerator (AES-NI, ARMv8 crypto)?

AMD Ryzen has a built-in crypto "decelerator" — a FreeBSD driver was written for the crypto engine, but it's disabled by default because it made everything slower than AES-NI. (Though I guess it would be funny to use it to mine bitcoin, since it supports SHA256. AMD — Advanced Mining Devices!)

Re: NUMA Siloing in the FreeBSD Network Stack [pdf]

#57

Author here: The talk will be on Youtube eventually, and a lot of points are explained in more detail in the actual talk. I was just going to bed in advance of traveling back to the states tomorrow, but I'll try to answer any question in the morning.

Why is the hw.model on EPYC redacted, when the chips are listed in the slides? Secret engineering sample? :)

Re: NUMA Siloing in the FreeBSD Network Stack [pdf]

#58

Isn't it great that we work in an industry where a company like Netflix, which has increasing competition lately, just shares potential competitive advantages like this? I get that, in part, this is a way to get people excited to work for Netflix, however, the people working on this are, probably, pretty proud of what they achieved and thus like to share it with us, their colleagues at other places of work and they h…

They also have their own CDN, to reduce load on ISPs. https://media.netflix.com/en/company-blog/how-netflix-works-...

Specifically, the CDN part is where Netflix uses FreeBSD. Their control plane runs on Linux.

Re: NUMA Siloing in the FreeBSD Network Stack [pdf]

#59

This may be a dumb question, but why would streaming video need to be encrypted? Is this just part of the "encrypt everything" best practice these days? Is there metadata accompanying the video data that shouldn't be unencrypted? Is it just so it's not possible to eavesdrop on the fact that I'm watching "Marvelous Mrs. Maisel"?

I think Netflix views its user-consumption data as a competitive advantage, and preventing 3rd parties from finding out what people watch, when, etc, helps protect that advantage.

Re: NUMA Siloing in the FreeBSD Network Stack [pdf]

#60
post #16

Earlier quoted context omitted.

If it's just serving files you don't necessarily need DPDK/XDP. For server-grade hardware there now is P2P-DMA and TLS accelerators which can offload everything to peripherials while still using normal socket APIs. You get NVMe -(PCIe)-> crypto accelerator -(PCIe)-> ethernet for the bulk of the data. Neither CPU nor main memory see any of the network packets as long as they stay on the happy path. Only connection set…

I know Chelsio has crypto directly on the NIC, but are dedicated crypto accelerator cards a thing and are they ever worth it? Why leave the CPU idle when the CPU itself is a good crypto accelerator (AES-NI, ARMv8 crypto)? AMD Ryzen has a built-in crypto "decelerator" — a FreeBSD driver was written for the crypto engine, but it's disabled by default because it made everything slower than AES-NI. (Though I guess it wou…

Intel has a product line called QAT ("QuickAssisT"?) that does crypto acceleration, as well as compression. I don't know how performant it is. There are definitely several older crypto accelerators that were faster than CPUs of the time; I don't know if any of them (outside of QAT) is still relevant.

The AMD Zen1 Crypto Co-Processor is indeed slower than AESNI; I think it's mostly used by stuff like SecureBoot, TPM, etc, and also used internally by the CPU to generate RDRAND/RDSEED data. It was probably never intended to be used by OS drivers and certainly not intended to be any kind of accelerator.

Post reply on HN