Hoi Wim,
On Fri, May 4, 2018 00:14, Wim de With wrote:
I was reading the adminstrators manual and I have a question about the section about setting up a judgehost: https://www.domjudge.org/docs/admin-manual-3.html#ss3.7
It recommends the 'swapaccount=1' kernel parameter, but that made me wonder if you actually want swap on a judgehost. I'm not fully familiar with how Linux processes and swap work in detail, but say a judgehost is judging a random submission while the RAM of the host is almost exhausted. If the memory is swapped to disk to clear space for the memory allocated by the submission, doesn't that potentially heavily impact the run time of the submission? And if that's true, wouldn't you see a TIMELIMIT that is not fully justified, because while you might not exceed CPU time, you will exceed wall time?
Yes, agreed. We set swapaccount so the cgroup actually tracks the amount of swap used. Cgroup has two memory limits: the actual memory and mem+swap. We set both to the same value. Therefore we're sure that no swapping will occur:
cgroup_add_value(int64, "memory.limit_in_bytes", memsize); cgroup_add_value(int64, "memory.memsw.limit_in_bytes", memsize);
So actually we need to have swapaccount in order to enforce that there's no swapping.
Cheers, Thijs