3 ms·
Disingenious. A better way to say is that their particular socket implementation was inferior to their new proprietary API. There is nothing with socket paradi
by baybal2 8y ago
Disingenious. A better way to say is that their particular socket implementation was inferior to their new proprietary API. There is nothing with socket paradigm as such that gives it inherent performance disadvantage.
- youdontknowtho 8y agoThere are some scenarios where sockets are slower because of the movement across the userland-kernel boundary. Even with all of the tricks that have been developed over the years it can still be much, much, slower than some of the tools that have come out. Intel released DPDK, Windows Server 2016 had a similar thing called PacketDirect. It's an interesting read. I'm not finished with the video, so I don't know if this is the way that Apple went.
- doctorsher 8y agoI disagree. As discussed in the talk, Network.framework is built on top of their userspace networking stack. This eliminates the kernel-userspace context switch and gets rid of one packet copy operation. These are known problems in the socket paradigm, at least as it exists in Linux and every BSD.
- int0x80 8y agoWhere do they say their network stack is userspace? I watched the video but the last 10 minutes and I missed it.
- kccqzy 8y agoPage 105 of their slides.
- doctorsher 8y agoThe userspace networking portion of the talk starts at 46:00. To clarify, the whole networking stack isn't userspace. They still have the classical BSD networking stack. I think the userspace networking stack is used automatically by system libraries like URLSessions and this new Network.framework library. They introduced their userspace networking stack during last year's WWDC: https://developer.apple.com/videos/play/wwdc2017/707 https://developer.apple.com/videos/play/wwdc2017/707
- int0x80 8y agoAh, good. Thank you.
- baybal2 8y agoWell, for as long as the driver is ran in ring0, you have context switching. The water is wet, there are no tricks around that even if you are an Apple.
- eeks 8y agoIt's only for datagrams, apparently.
- dwaite 8y agoMy understanding is that TCP is also partially user-space, but with some kernel management (such as communicating the closing the TCP connections when processes terminate)