5 ms·
4k pages are too small and 2 MB pages too large. I wish we x86 users had 64 kB pages. 4 kB pages reduce CPU performance due to frequent TLB misses and make vir
by vardump 4y ago
4k pages are too small and 2 MB pages too large. I wish we x86 users had 64 kB pages.
4 kB pages reduce CPU performance due to frequent TLB misses and make virtual memory perform worse due to number of faults.
- mjevans 4y agoEven 1MB pages might be desirable for modern hardware. It would be really interesting if there were some charts ran against different types of workloads. E.G. games, databases, compiles, etc. More interesting still if TLP (Transparent Large Pages) could be set to a given size per... cgroup maybe?
- vardump 4y agoDifferent applications would certainly benefit from different page sizes. Use 1G pages, and boom, TLB misses and faults are just gone. But definitely not a good default choice! Any choice is a tradeoff. The larger the page size, the more physical memory is going to be wasted. On the other hand, I guess with the current NVMe hardware the effect on swap might not be too bad. 64 kB pages would mean the number of TLB misses and faults are just one sixteenth of the current status quo. Diminishing returns and all.
- Vogtinator 4y agoOn AArch64 you can have multiple combinations of mapping sizes: 4k/2MiB/1GiB 16KiB/32MiB 64KiB/512MiB/4TiB
- classichasclass 4y agoOn Power ISA the most common page sizes are 4K and 64K. My Raptor Talos II has 64K pages in Fedora. That said, enough useful "workstation" things assume 4K and break on 64K that I'm hopeful aarch64's use of 16K pages will get people to realize everything doesn't use the same page size. I see transparent hugepages as trying to have your cake and eat it too.
- gnufx 4y agoWhat things typically fail? (Nothing I've noticed on an HPC system running a few desktop-ish things under x2go.)
- classichasclass 4y agoFor awhile, Chromium was the biggest offender, and some places may still ship incompatible Electron binaries. I don't use Chrome but I'm told this is now fixed. Hangover also needs 4K, and some kernel modules assume it. Those are all off the top of my head but overall it's starting to get better.