You are viewing a single comment's thread from:
RE: Building Steem with GCC 6.1 on Fedora 24
As a tip (for any node that takes a lot of RAM, whether steem or something else): If you are sort in ram, you may want to try zram. It can save you the use of slow swap. It essentially compresses the ram used for a small cpu tradeoff (if you use LZ4 the tradeoff is minimal) allowing you to do more with less, plus increase speed if you avoid the swap.
Thanks. I'm actually using zswap, which is better as it can move compressed pages between RAM and on-disk swap while zram only holds compressed pages in RAM. Zswap can be enabled simply by adding "zswap.enabled=1" to the kernel command line.
From what I understand, zswap just compressed the pages it's going to swap out (reducing I/O - say a 10kb write becomes a 5kb write) and doesn't include zram-like functionality although I could be wrong.
Zram can be used to compress the pages it holds in the ram itself - so it avoids the I/O entirely. In my observation, average compression rates are ~3x in my machine for normal use. So in a 4GB machine with 3gb getting compressed with zram, the 3gb compressed can host ~9gb of data. Plus 1gb for the non-zram compressed, it totals around 10gb.
No, according to the kernel documentation zswap keeps compressed pages in a RAM-based memory pool and only moves them out to the on-disk swap when the compressed pool reaches its size limit.
Hmmm... nice. I'm using both zram and zswap on an old laptop of mine (it has an old 40gb pata - very slow) to reduce I/O, so I'll try at some point to see how it goes with zswap only.