This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

High CPU usage (99%) kswapd0 on ASG/UTM 9.305-4

Hi all,

I'm running ASG/UTM 9.305-4.

Every few days, I see a spike in CPU usage caused by kswapd0:

top - 09:35:30 up 6 days, 12:29,  1 user,  load average: 1.06, 1.03, 1.05
Tasks: 163 total,   2 running, 159 sleeping,   0 stopped,   2 zombie
Cpu(s):  0.0%us, 25.4%sy,  0.0%ni, 74.6%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   3792464k total,  3519572k used,   272892k free,   364348k buffers
Swap:  4190204k total,    27428k used,  4162776k free,  1637560k cached

  PID USER      PR  NI  VIRT  RES  SHR S   %CPU %MEM    TIME+  COMMAND         
  338 root      20   0     0    0    0 R     99  0.0   3587:29 kswapd0          
 1152 root      20   0     0    0    0 S      1  0.0   3:55.21 scsi_eh_1        
13461 postgres  20   0  563m 9616 7936 S      1  0.3   0:00.46 postgres         
16318 root      20   0     0    0    0 S      1  0.0   0:00.31 kworker/0:2      
30871 postgres  20   0  562m 5888 4608 S      1  0.2   0:13.97 postgres         
    1 root      20   0  1916  572  516 S      0  0.0   0:02.47 init             
    2 root      20   0     0    0    0 S      0  0.0   0:00.02 kthreadd         
    3 root      20   0     0    0    0 S      0  0.0   0:11.24 ksoftirqd/0      
    5 root       0 -20     0    0    0 S      0  0.0   0:00.00 kworker/0:0H     
    7 root      RT   0     0    0    0 S      0  0.0   0:00.27 migration/0      
    8 root      20   0     0    0    0 S      0  0.0   0:01.98 rcu_bh           
    9 root      20   0     0    0    0 S      0  0.0   1:31.84 rcu_sched        
   10 root      RT   0     0    0    0 S      0  0.0   0:00.39 migration/1      
   11 root      20   0     0    0    0 S      0  0.0   0:02.81 ksoftirqd/1      
   13 root       0 -20     0    0    0 S      0  0.0   0:00.00 kworker/1:0H     
   14 root      RT   0     0    0    0 S      0  0.0   0:00.30 migration/2      
   15 root      20   0     0    0    0 S      0  0.0   0:01.62 ksoftirqd/2      


The CPU remains at this level until I restart the system. Has anyone else encountered this problem?

I've found that I can reduce the problem temporarily by using the following command to drop the kernel caches on the UTM:

echo 1 > /proc/sys/vm/drop_caches

which drops the CPU usage from kswapd0 down to zero for a while. Today, I noticed it was back. So I've put the command above in a cron job to run every hour for now, but I was wondering if there is another solution?

If it's of any help, the ASG/UTM runs on a Hypervisor (XenServer 6.5 build 90239c) with 4 CPUs and 4Gb of memory assigned to it.

Thanks,
Paulo


This thread was automatically locked due to age.
Parents
  • Hi all. A quick update. I've given the UTM 6Gb of memory, and so far the problem has disappeared. It used to appear every few days, but it's been two weeks and no issues. I will continue to keep an eye on it, and if it comes back I will let you know.

    I should also mention that in that period, the UTM was also upgraded to 9.306-6...

    But for now, it would seem giving it more memory (or the recent upgrades) has done the trick.
Reply
  • Hi all. A quick update. I've given the UTM 6Gb of memory, and so far the problem has disappeared. It used to appear every few days, but it's been two weeks and no issues. I will continue to keep an eye on it, and if it comes back I will let you know.

    I should also mention that in that period, the UTM was also upgraded to 9.306-6...

    But for now, it would seem giving it more memory (or the recent upgrades) has done the trick.
Children
No Data