3 ms·
I find it interesting that he is really concerned with page-faults as opposed to cache misses. Most of the recent stuff I've read on performance focuses much mo
by rocqua 9y ago
I find it interesting that he is really concerned with page-faults as opposed to cache misses. Most of the recent stuff I've read on performance focuses much more on the cache.
Usually, I've seen using swap-space met with derision. I'd only expect page-faults to really happen when using a memory-mapped file. Again on the note of caches, I'd expect more fanfare be made regarding the TLB when accessing a different page than actual page-misses.
- blattimwind 9y agoThe internal caches of the CPU are orders of magnitude faster than handling a page fault (which means: CPU traps, switch to kernel, VM lookup, issue I/O request, block for completion, switch to user). TFA's context is a larger-than-memory data structure mapped from disk, where heap block size = page size.
- deleted 9y ago[deleted]
- pdpi 9y agoHe’s concerned with page faults because his workload involves disk access. The admonitions about cache locality matter more when your workload fits in RAM. Also, he’s not using swap as such, he’s using memory-mapped IO. If you have to hit the disk, you have to hit the disk, might as well try to do it in an OS-aware fashion.