Le 01/02/2019 à 10:32 a.m., Krzysztof Warzecha a écrit :
Hello,

docs:

https://uwsgi-docs.readthedocs.io/en/latest/KSM.html
https://www.kernel.org/doc/Documentation/vm/ksm.txt
https://www.kernel.org/doc/html/latest/admin-guide/mm/ksm.html

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
/sys/kernel/mm/ksm/pages_sharing).


Thanks a lot for sharing this! I'm looking forward to try enabling ksmd with uwsgi and pypy for testing purposes... :)

kind regards,

tk

--
tkad...@yandex.com | Twitter: @wise_project
https://www.isotoperesearch.ca/
Not everyone who wander are lost.
_______________________________________________
uWSGI mailing list
uWSGI@lists.unbit.it
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to