3 ms·
As crazy as it sounds, can that fast device be a ramdisk?
by nathell 7y ago
As crazy as it sounds, can that fast device be a ramdisk?
- GuB-42 7y agoExactly what I thought. Losing <5% of your RAM as swap space probably won't do much difference. But if it solves problems, why doesn't the kernel automatically assign part of RAM as a virtual swap device, if the user allows it. It can help monitoring tools, and because the kernel knows it is not a real swap device, it can optimize its use.
- LargoLasskhyfv 7y agoNot crazy at all, very useful. https://en.wikipedia.org/wiki/Zram https://en.wikipedia.org/wiki/Zram https://wiki.gentoo.org/wiki/Zram https://wiki.gentoo.org/wiki/Zram https://wiki.debian.org/ZRam https://wiki.debian.org/ZRam Or Armbian, a Debian derivative for many RaspberryPi-like ARM boards, where it helps avoiding trashing the usual sd-cards, and holds the logs, with different compression algorithms for /var/log, /tmp and swap. Their script is here: https://github.com/armbian/build/blob/master/packages/bsp/common/usr/lib/armbian/armbian-zram-config https://github.com/armbian/build/blob/master/packages/bsp/co... I really like how this enables a tiny NanoPi Neo2 with one GB Ram booting from a 64GB SD-Card in an aluminum case with SATA-adapter and a 2,5" HDD mostly idling to draw only about 1W from the wall socket, while clocking up from about 400Mhz to 1,3Ghz if it needs to. It's not the fastest, but sufficient.
- pantalaimon 7y agoIt's not that crazy, there is zram: https://www.kernel.org/doc/Documentation/blockdev/zram.txt https://www.kernel.org/doc/Documentation/blockdev/zram.txt