Thanks for your answer.I doubt that X has any logic that would allow it to use less memory because you imposed a limit. Rather, if it ever does need more than the limit, it will crash, and you may lose work in GUI applications. However, since systemd applies the limit to a cgroup, it is possible that the kernel will try to use less memory, for instance by evicting pages that are actually in regular use, which would harm performance.I had to limit the size of the systemd service to avoid fullfilling all the RAM (hence the "max: 200.0M").
200M for Xorg does not seem unusual to me. What are you trying to save the other 1.8G or 3.8G for?
I effectively use systemd MemoryMax parameter https://www.freedesktop.org/software/sy ... yMax=bytes in order to limit the amount of RAM used by Xorg. And you're right: our user interface totally unusable when we're approaching that limit.
Why this limit ? It corresponds to a day of usage. Xorg starts with 50-60M and continuisly grows over time.
Without this limit some of our devices reached more than 2G for Xorg within weeks. Then the system becomes unstable and unpredicable since swap is disabled. Unfortunately, the V3D driver often crash before the oom killer can do anything, resulting a UI unrecoverable freeze.
Statistics: Posted by laurent — Sat Jun 22, 2024 10:24 pm