<b>zram beats a swapfile on a cheap SSD box</b>
A disk swapfile on a budget VPS is slow AND chews your IOPS allowance. zram makes a compressed swap device in RAM instead, so 'swapped' pages get compressed ~3:1 and stay in memory.
— <code>apt install zram-tools</code>
— set <code>PERCENT=50</code> in <code>/etc/default/zramswap</code>
On a 1GB box you effectively reclaim ~400MB of usable memory for the cost of a little CPU. Zero disk writes, no IOPS hit. This is the single best trick for surviving on a 1GB instance. Try it tonight.
Root Access Daily
@RootAccessDaily
<b>zram beats a swapfile on a cheap SSD box</b>
Этот пост опубликован в Telegram-канале Root Access Daily. Подписаться можно по ссылке: @RootAccessDaily.