3 ms·
Interesting! As our devices have gotten faster, the user-space/kernel boundary is becoming more and more of an issue. I was shocked when my supposedly super-f
by mpweiher 8y ago
Interesting!
As our devices have gotten faster, the user-space/kernel boundary is becoming more and more of an issue. I was shocked when my supposedly super-fast MacBook Pro SSD (2+GB/s) was only giving me around 250MB/s.
Turned out mkfile(8), which I was using without thinking much about it, is only using 512 byte buffers...
https://blog.metaobject.com/2017/02/mkfile8-is-severely-syscall-limited-on.html https://blog.metaobject.com/2017/02/mkfile8-is-severely-sysc...
- zozbot123 8y agoThe main thing affecting performance at the userspace/kernel boundary these days is Spectre and Meltdown mitigations, FWIW...
- mpweiher 8y agoYeah, when I ran the same tests a little later and with the Spectre/Meltdown patches (+APFS, which also didn't help), the mkfile I/O rate had a further precipitous drop to ~80MB/s.
- vlovich123 8y agoNo, userspace/kernel transitions are always and will always be slow. Every time it happens you've got to do a context switch which is super-expensive + cache unfriendly. You also pay a penalty keeping the kernel mapped at all times in terms of more pressure on the TLB but due to Spectre and Meltdown mitigations the kernel has actually been unmapped hurting the performance of switching into kernel further although this will be undone eventually.