Should I enable/disable memory compression?

Last edited:
My DS220+ running DSM7 with 18GB memory. Under Control panel->Hardware & Power, there is optional that given a option to enable memory compression (see the screenshot below).

Reading the article and seems that Synology recommended to enable the option. See Here

My question is shoud I enable it?

Thanks


Capture.PNG

-- post merged: --

Based on the article, I don't think I need to enable the option cause I have enough ram space.
 
But if you have enough RAM, you should uncheck it. Memory compression is CPU-hungry.

If I don't remember wrong, you have the same amount of RAM as I have, 18GB.
 
Last edited:
I realize old thread.... But wanted to confirm.... for latest DSM (7.1--1)
This is enabled by default (At least, I didn't do it...)
All systems here Only have 6GB Ram, but, Ram use on each is 30% -- or less at times.... (Running Cache Advisor in bkgnd)

So Under 7.1-1 with the Ram Useage being 30% or less... Should I disable the memory compression... ????

Thanks for your post
 
@Jan Janowski
I'd be amazed if you did see a RAM difference with GB of RAM installed.

This feature exists due to the tiny amount of RAM installed in early Synology NASes - for the first few years 64 MB was typical and I think they only got to the dizzying height of 128 MB in 2010 ish. It's less than 18 months since they still had an 'enterprise' NAS with 512 MB of RAM. You are in a different league!
 
I realize old thread.... But wanted to confirm.... for latest DSM (7.1--1)
This is enabled by default (At least, I didn't do it...)
All systems here Only have 6GB Ram, but, Ram use on each is 30% -- or less at times.... (Running Cache Advisor in bkgnd)

So Under 7.1-1 with the Ram Useage being 30% or less... Should I disable the memory compression... ????

Thanks for your post

I’d say disable it and monitor the memory swap for a while if it’s zero or extremely low, you should be fine.
-- post merged: --

I have a DS220j which doesn't have much memory , should I switch it on?

Check memory swapping and if it’s excessive, try turning it on and compare.
 
Sorry for reviving this old thread but it is rated quite high on google.

Just posting my experience.. with memory compression enabled, it is constantly putting stuff to zram (compressed ram)
Even if utilization is around 2.5-3GB out of 8GB installed RAM.
Making overall CPU utilization higher for absolutely no good reason at all.

Makes no sense right.. my second (ubuntu) server with 8GB RAM and similar utilization with zram set up does NOT swap or use zram whatsoever.
So Synology setup is set up in a way that forces use of zram, even with low overall RAM utilization or even with vm.swappiness of 1..

Also note for others, even if you set vm.swappiness=1 in /etc/sysctl.conf, synology will most likely just ignore it after reboot, you have to change /etc.defaults/sysctl.conf as well, AND use sysctl -p in some startup script.. otherwise you are stuck with 60 which sucks.

Seriously, kswapd0 was taking most of my CPU (htop top 1 sorted by CPU Total) all the time.. for no reason.
 
Yeah the setting is nasty for the modern era.

☕
and on top of that, my DS920+ is changing vm.swappiness by itself over the course of day, so I have to keep changing it back to desired value of 1 via task scheduler lol.

Seriously, I have it set to 1 in both /etc/sysctl.conf and /etc.defaults/sysctl.conf, I set it to 1 during init script and I set it to 1 every 5 minutes via task scheduler and yet, sometimes I log in via ssh, check cat /proc/sys/vm/swappiness and its back to 60 !!!
 
Last edited:
Aaand even with all precautions the stupid Synology keeps swapping without getting even close to 50% utilization lol
Any idea what the hell to do ?

1707649748917.png

1707649670478.png

1707648767265.png
 
Personally, I do not bother, CPU use does not seem excessive, and difference between regular linux like Ubuntu and the syno may be caused by (over?) protective settings to prevent whatever loss in case of a disk, network or power failure.
So I leave it at using default (no compression) setting and live with small extra CPU use.
 
I can’t understand this crap system, how and why it is swapping when the memory utilization is so low, swappiness is set to 1
 
Last edited:
When I looked at this earlier (with and without ram added). I ended up at same place (not used). I Would be interested to learn what it actually, really, is doing, for reference.
Just setting and guessing may make you feel like you learned something, but verification of why it works that way: So we can make Educated Decisions, That — would help us all.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top