0
I have a VM and in it a process that consumes a lot of memory (~200GB). Some sort of in-memory DB. I need to run it on a standard laptop and I cannot recompile it or see the code.
I've added 256GB of swap space with pri=32767 in /etc/fstab and vm.swappiness=100 in /etc/sysctl.conf but it just won't load the DB quick enough (stuck on 4GB after 24h; doesn't seem to grow anymore).
(EDIT: I cloned the machine, changed the RAM from 256GB to 4GB, added hard disk, formated it as ext4 and created a swap file of size 256GB (dd -> mkswap -> swapon...))
Why did it stop growing?
I suspect the slowness is caused by it being a swap space, therefore the OS is busy "swapping" (load -> not enough room -> deciding what to swap out...).
I'm looking for a way to "add more memory" but make the OS treat it as normal memory. Or maybe my swap configuration is wrong?
I know it'll hurt performance, but it is acceptable for me.
The VM is CentOS 6.
3“I need to run it on a standard laptop” Well, you won’t. Even if you could get it to start, an in-memory database isn’t built to cope with the slowness of disk access. You might as well perform whatever the program does by hand with pen and paper and it’d probably be faster. – Daniel B – 2017-08-28T10:20:53.750
2If there were no difference between swap and real RAM all our systems would have a very small RAM. If you need the speed of real RAM, you need real RAM. – xenoid – 2017-08-28T12:12:13.547