0

I'm almost out of the ram, was hoping to swap ram kicks in, but it doesn't do anything.

CentOS release 6.10 (Final)
root@auth33:~# free -m
             total       used       free     shared    buffers     cached
Mem:          7680       7473        207          0        159       6556
-/+ buffers/cache:        756       6923
Swap:         4095          0       4095
root@auth33:~# swapon -s
Filename                Type        Size    Used    Priority
/swapfile                               file        4194300 0   -1
root@auth33:~# sysctl -a|grep swap
vm.swappiness = 30

or is it just doing what it should be?

Seandex
  • 201

1 Answers1

2

According to your free -m output most of your RAM is eaten by buffers/cache which the kernel throws away first before trying to use SWAP.

Your output is totally normal and no SWAP usage is expected. Perhaps you need to run more memory hungry applications.

  • thank you. Should I not worry about the kernel freezes due to memory full? because SWAP will be used when it needs it? +1 – Seandex Jul 18 '20 at 07:21
  • 1
    @Seandex please refer to https://unix.stackexchange.com/questions/598679/memory-watchdog-for-hungry-applications/

    Also, CentOS 6 is really really old. You might want to run Centos 7 or 8.

    – Artem S. Tashkinov Jul 18 '20 at 07:22
  • how you say he nneds to run more memory hungry applications while there is only 207M of free memory. – Saddam Meshaal Sep 01 '23 at 15:01