Open srieger1 opened 4 months 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.
systemd >= 254 should support MemoryKSM=true, if kernel >= 6.4, but this currently only works for compiled program and not together with systemd