Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

kswapd swapping memory though plently of it available

Aliaksandr PaulikAug 10 2020 — edited Aug 13 2020

Hello

When I start EBS apps for some reason kswapd process uses swaps memory, though a lot of memory is available in buff/cache.

top - 16:43:46 up 56 min,  2 users,  load average: 17.34, 6.91, 4.21

Tasks: 329 total,   2 running, 327 sleeping,   0 stopped,   0 zombie

%Cpu(s): 51.1 us,  1.7 sy,  0.0 ni, 46.5 id,  0.5 wa,  0.0 hi,  0.1 si,  0.1 st

KiB Mem : 14341116 total,    95208 free,  9303740 used,  4942168 buff/cache

KiB Swap: 10485756 total, 10481520 free,     4236 used.   840176 avail Mem

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND

20316 oracle    20   0 3874488   1.3g  10792 S 193.7  9.2   0:49.53 java

19207 oracle    20   0 4707380 240868 226808 S  10.6  1.7   0:01.84 ora_s010_cdbvis

    54 root      20   0       0      0      0 S   1.7  0.0   0:49.11 kswapd0:0

This is memory usage before the apps startup:

[root@demo ~]# free -mh

              total        used        free      shared  buff/cache   available

Mem:            13G        830M        8.2G        4.0G        4.7G        8.8G

Swap:            9G          0B          9G

This is memory usage after the apps startup:

[root@demo ~]# free -mh

              total        used        free      shared  buff/cache   available

Mem:            13G        6.7G        2.3G        3.9G        4.7G        3.0G

Swap:            9G        4.1M          9G

So for some reason the system needed to swap 4.1 M when there was at least 3G available.

The system is sluggish when the swap is used, though I the OS is installed on SSD.

To confirm that there is indeed enough memory I turned off swap completely using 'swapoff -a'.

Still kswapd takes some of the CPU during application services startup:

top - 13:25:31 up  5:18,  2 users,  load average: 69.47, 34.86, 14.85 

Tasks: 443 total,   1 running, 442 sleeping,   0 stopped,   0 zombie 

%Cpu(s):  0.3 us,  3.3 sy,  0.0 ni, 91.5 id,  4.8 wa,  0.0 hi,  0.0 si,  0.1 st 

KiB Mem : 14341116 total,    95816 free,  8267744 used,  5977556 buff/cache 

KiB Swap:        0 total,        0 free,        0 used.   144740 avail Mem 

 

 

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND 

   150 root      20   0       0      0      0 S  28.1  0.0  25:08.59 kswapd0:0 

So the issues are:

1) Swap usage even when free memory is available

2) kswapd process taking CPU when there's no swap available at all

Please tell if anyone faced the same issues and if you can help me with the investigation?

Regards,

Alex

This post has been answered by Aliaksandr Paulik on Aug 13 2020
Jump to Answer
Comments
Post Details
Added on Aug 10 2020
3 comments
1,641 views