Optimizing Memory Consumption on Small Systems

Optimizing Memory Consumption on Small Systems – Again

Many moons ago, I wrote about optimizing memory availability on a small system with only 512MB of RAM. Systems got bigger since then, but there are many cases where such optimisations are still needed, and default configurations are not always cooperative with that goal out of the box. When working all day every day in the MySQL consulting business, this kind of thing matters to cost conscious clients with a lot of VMs.

So here are a few additional setting to consider for systems with no more than 4GB of RAM:

crashkernel=0

If your links distro configures a crashkernel reservation by default, this will save some memory.

swiotlb=0

Only use this if you have less than or equal to 4GB of memory. But if you do, it will save approximately 256MB of RAM.

Between these and some of the settings in the previous article mentioned, on something like the Oracle Cloud free-forever tier instance with only 1GB of RAM, it can make the difference between unusable and useful.