Re: using swap when there is free ram
On Fri, Mar 1, 2019 at 2:18 PM Reco wrote:
>
> Please post the contents of /proc/meminfo. And "sar -r ALL 1 10", for
> the sake of the completeness.
$ cat /proc/meminfo
MemTotal: 3975380 kB
MemFree: 1886004 kB
MemAvailable: 2307332 kB
Buffers: 49840 kB
Cached: 638404 kB
SwapCached: 28688 kB
Active: 1450652 kB
Inactive: 489336 kB
Active(anon): 1188048 kB
Inactive(anon): 142728 kB
Active(file): 262604 kB
Inactive(file): 346608 kB
Unevictable: 96 kB
Mlocked: 96 kB
SwapTotal: 979928 kB
SwapFree: 764888 kB
Dirty: 56 kB
Writeback: 0 kB
AnonPages: 1166924 kB
Mapped: 336476 kB
Shmem: 79036 kB
Slab: 75224 kB
SReclaimable: 33540 kB
SUnreclaim: 41684 kB
KernelStack: 6864 kB
PageTables: 19652 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 2967616 kB
Committed_AS: 4608344 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
Percpu: 736 kB
HardwareCorrupted: 0 kB
AnonHugePages: 245760 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 0 kB
DirectMap4k: 123712 kB
DirectMap2M: 4003840 kB
There is no sar command on my system.
> To prevent it:
>
> sysctl -w vm.swappiness=0
>
I just read some people arguing that 1 is better than 0 because the
later means "never swap" while the former means "swap if out of RAM".
I'll try 1 to see if it reduces swapping, thanks.
Dan Ritter: I agree that swapping activity (and not swap space used)
is what matters. It was swapping activity that started annoying me.
Reply to: