4 ms·
I wish Linux didn't make managing huge pages such a pain in the ass. You have to "allocate" huge pages ahead of time by editing a file in /proc/sys before you c
by dahfizz 4y ago
I wish Linux didn't make managing huge pages such a pain in the ass. You have to "allocate" huge pages ahead of time by editing a file in /proc/sys before you can map the huge pages.
Why can't free memory automatically be converted to huge pages when I call mmap(HUGE_TLB)?
- nvarsj 4y agoDoes THP not work for you?
- Am4TIfIsER0ppos 4y agoJudging from the problems my boss has had with them lately they are anything but "transparent".
- nvarsj 4y agoHah, I think they were pretty buggy when they were first enabled by default in RHEL/etc.. We used to turn it off in our prod fleets after running into some serious memory / perf issues with them. I think they're in a better state these days.
- moloch-hai 4y agoYou can add "hugepages=2000" to the boot command line. "Transparent huge pages" is (sort of) the feature you ask for. It is very restricted in what it will do because of early mistakes pegging CPUs scanning for opportunities.
- Const-me 4y agoI wish Windows was different in that regard. On Windows, large pages are borderline unusable. They need special security privilege SeLockMemoryPrivilege, since vista introduced UAC most processes don't have that privilege. Windows is unwilling to page large pages to disk, easy to fail with out of memory errors. I don't think there's a good reason for that: it's much faster to load 2MB from disk on modern computer, then it was to load 4kb from disk on i386.