Does the nice value affect swap?

If the system doesn't have enough RAM for everything, does the kernel take the nice value into account when it decides what to swap out to reduce memory stress?


The kernel does not take into account the nice value for virtual memory consumption. However, if a process has a low nice value and has not been active for a while then the kernel may take a preference in swapping out the unused pages of this process compared to a busy process that may be consuming more memory.