Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The percentage of memory idea isn't quite right. Consider what would happen in 2 computers, one with 4MB of ram and one with 4 GB of ram. The former would waste a large percentage from moving from 4k to 2MB pages than the latter one.


That's true, although the effect here is because the page size you picked (2MB) is close to the physical memory size (4MB).

Between a computer with 1GB and a computer with 64GB, any vaguely reasonable default page size you pick (whether that's 64k or 2M) is far from the total memory size, so the percentage wasted doesn't get much smaller as RAM continues increasing. I.e. the relative benefit of larger pages grows much slower than total system memory.

So in other words, my point is that default page size should not just grow linearly with memory size, the best tradeoff is something a little more complex. Saying that RAM grew 1000x, therefore page size should grow a lot is aiming too high too fast. Especially given that hardware already supports mixed page sizes (despite lackluster software support at the moment)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: