srieger1 / digsinet

multiple twins (siblings) of a network topology (e.g., based on containerlab) with continuous data exchange
https://srieger1.github.io/digsinet/
5 stars 0 forks source link

Containerlab optimization, e.g., memory deduplication #14

Open srieger1 opened 4 months ago

srieger1 commented 4 months ago

systemd >= 254 should support MemoryKSM=true, if kernel >= 6.4, but this currently only works for compiled program and not together with systemd

srieger1 commented 1 month ago

I moved this issue to the backlog, though PR_SET_MEMORY_MERGE is supported in systemd >= 254, it did not work neither in recent debian (testing & unstable), ubuntu or fedora. I was able to build a binary that sets PR_SET_MEMORY_MERGE and also successfully used LD_PRELOAD and identical mem pages were deduplicated correctly. However, systemd throws errors as soon as MemoryKSM: true is set. To me it seams like the systemd implementation misses setting several additional parameters for PR_SET_MEMORY_MERGE, as only one param is used.