3 ms·
Just last weekend I was talking to one of FreeBSD's VM gurus about doing exactly this in FreeBSD too. You have to be careful about it though -- some data struc
by cperciva 7y ago
Just last weekend I was talking to one of FreeBSD's VM gurus about doing exactly this in FreeBSD too. You have to be careful about it though -- some data structures are autosized at boot, and if you're not careful you can end up with systems "running out of memory" because they have too much memory.
- throwaway8941 7y agoReminds me of Windows 95 "running out of memory" on systems with too much RAM. https://devblogs.microsoft.com/oldnewthing/20030814-00/?p=42903 https://devblogs.microsoft.com/oldnewthing/20030814-00/?p=42...
- toast0 7y ago> some data structures are autosized at boot It's probably a good idea to audit all the things that are autosized at boot by ram size; some of them are probably much too large on a system with 128 GB or so, given some of the sizing was written when 128 MB was big. I know I've run into the size of IP fragment buffers being way too big, but not sure what else.
- hansendc 7y agoOn Linux, most (maybe even all) of the data structures that must grow with memory size can be carved out of the memory being added. The main culprit is 'struct page' which typically needs 64b of metadata for each 4k physical page (on x86 at least). Much of the code to do this stuff is in Linux's "sparsemem" infrastructure: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/sparse.c https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...