[uWSGI] Linux KSM

Krzysztof Warzecha kwarzecha7 at gmail.com
Fri Feb 1 15:32:16 UTC 2019




The way I understand it, --ksm=10 tells uwsgi to call
madvise(MADV_MERGABLE) on worker's memory, on every 10th request.
Linux kernel will then consider that memory for same-page
de-duplication. It works nice if you have uwsgi emperor with many
vassals. It should work with many separate uwsgi instances too.

> would you recommend to enable it

In theory you can save a bit of memory, but I'm pretty sure you'll
have to benchmark it. Enable it and use /sys/kernel/mm/ksm/ to trigger
merge and measure how effective it is (with stats from

Krzysztof Warzecha

More information about the uWSGI mailing list