32
7
I have an Ubuntu 8.04 server which is running a database and a bunch of Java application servers. Its memory configuration and usage is:
total used free shared buffers cached
Mem: 16456176 15930028 526148 0 81372 9674196
-/+ buffers/cache: 6174460 10281716
Swap: 1951888 366100 1585788
I noticed that swap goes up every afternoon, and is released some time at night. The demand is not the same on all days, and starts at different times. So it's pretty random, except for the fuzzy "afternoon-night" boundary.
Load on this machine varies during the day. It's very low between midnight and 6-7 AM, much higher (but stable) until 6-8 PM, then dropping gradually.
Now I have the following questions:
- How can I see which processes are using swap?
- Why does it prefer to swap out rather than take some memory from cache?
6I can't find a
NSWAP
column (Ubuntu 16.04 :/ ). – jjmontes – 2018-02-22T17:58:35.9231
@jjmontes It's been removed. I don't know why.
– Gilles 'SO- stop being evil' – 2018-02-22T18:39:19.977The htop FAQ states that the author doesn't believe it's possible to accurately report swap usage, and that top's metric is inaccurate.
– Oliver Evans – 2018-08-13T16:42:24.707