We noticed that on some servers the reported swap usage was very high. After investigating, it appeared that this was not active swap usage, but old swap memory that was still marked as used.
When we ran swapoff followed by swapon , the swap usage immediately dropped back to 0%. Before that, it showed values like 60% or even 99%.
This raised the question whether Cleavr’s nightly jobs (or other automated maintenance tasks) are able to clear or reset old swap usage automatically.
We are not swap experts, so please let us know if our assumption about “old” swap memory is incorrect, or if there is a recommended approach within Cleavr to handle this.
I think what you are observing is actually normal Linux behavior rather than an issue.
On Linux, swap is used as a pressure relief mechanism. When the system experiences memory pressure at some point, certain memory pages are moved to swap.
Once the pressure is gone, Linux does not automatically move those pages back into RAM unless they are accessed again. As a result, swap can remain marked as “used” indefinitely, even if there is plenty of free memory and no active swapping happening.
Regarding Cleavr specifically, Cleavr’s nightly jobs or maintenance tasks do not clear or reset swap, and this is intentional.
Automatically toggling swap is not generally recommended on Linux systems. Because of that, Cleavr follows standard Linux behavior and leaves swap management to the operating system.
In practice, high swap usage by itself is not a problem. What matters more is whether the system is actively swapping, for example continuous swap-in or swap-out activity, high disk IO, or noticeable performance degradation. If those are not present, then the system is behaving as expected.
I hope this answers your question. Please let us know if you have any other questions or concerns.