My Oracle Support Banner

Oracle Linux: Swap Memory Not Released by SHM Segments When nattch is 0 (Doc ID 2403015.1)

Last updated on AUGUST 04, 2018

Applies to:

Linux OS - Version Oracle Linux 5.6 and later
Information in this document applies to any platform.

Symptoms

On : Oracle Linux 5.6 version, Linux Kernel

After some high memory usage, the processes were killed but swap usage is not released and highly used.

$ free -g
total used free shared buffers cached
Mem: 252 250 2 0 2 119
-/+ buffers/cache: 128 123
Swap: 31 30 1

No process is using swap as can be checked using the commands:
# cat /proc/*/status | grep VmSwap | grep -v " 0 kB"

# cat /proc/*/smaps | grep Swap | grep -v " 0 kB"

The Swap Cached which keep in swap some objects that Kernel decide that might be reused, also only represent a small part of used swap:
$ cat /proc/meminfo | grep SwapCached
SwapCached: 4010096 kB

The list of memory segments show:
# ipcs -m
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x74018004 3604480 root 600 4 0
0x00000000 4161537 root 644 80 2
0x00000000 4194306 root 644 16384 2
0x00000000 4227075 root 644 280 2
0x06347849 5439492 root 666 65544 1
0x00000000 1318191109 pin10 600 1178599424 0
0x3101019e 5537798 root 666 131176 3
0x00000000 1318223879 pin10 600 33554432 0
0x01010279 1618870280 root 664 4192 0
0x010103d8 958234642 root 664 4192 1
0x00000000 1231290387 usr04 600 2147483648 0
0x00000000 1231323156 usr06 600 2147483648 0
0x00000000 1231355925 usr08 600 2147483648 0
0x00000000 1231388694 usr10 600 2147483648 0

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.