100% CPU usage issue


Scythe

Recommended Posts

I'm trying to get to the bottom of an issue where unraid seems to get stuck at 100% CPU usage semi-regularly. What's odd is that the unraid main screen shows 100% CPU usage across all cores while the Dynamix System Stats plugin only seems to show 50% usage.

Opening a terminal and running top shows that the CPU usage seems to be coming from 3 main processes: kswapd0, unraidd & loop2.
image.png.efd3d710cacff26d17e231e32aadae18.png

 

What are the kswapd0 and loop2 processes? Should they be using this much CPU? Can they be safely killed/restarted?

 

Link to comment

kswapd0 is the process that manages virtual memory (swap space). Since most Unraid users don't have swap space configured I would expect the process to be pretty idle.

 

loop2 refers to the mounting of a disk image. In my case it's the docker.img mounted via loop2 on /var/lib/docker so it probably is in your case too.

 

More worrying than CPU usage spikes up to 100% is your load average (the top line of top) which, unless you have a lot of processor cores (I mean Threadripper or dual Xeons), is excessive and has been for some time. I have a feeling that the problem might be associated with loop2, which is waiting for disk I/O and also has a very low nice value. That might point to corruption of your docker.img. You also have "only" 4 GB RAM and a few docker containers running so you'll be getting quite low on memory. Your diagnostics zip would reveal more.

 

Edited by John_M
Corrected mount point
  • Like 1
Link to comment

It's only an i3 CPU (Just running a NAS box with some docker containers for managing content/smart home). Every time I've had this 100% CPU issue it seems to take up to 2-3 hours to clear out and return to normal.

Ram wise I know I only have 4GB and I do plan on upping this to 8GB but from what I was seeing in the UI I didn't think I was actually hitting on the RAM limit just yet with what was running.

I've included my diagnostics below if that helps.

 

tower-diagnostics-20181110-0041.zip

Link to comment
  • 9 months later...

I have been having issues as well..... I have tried a few different things I've found not that is done much Im running an I-7 4790k not overclocked and just sitting idle with plex open I can get anywhere from 50% of my cores to include my HyperT cores pegged to 100% is 4 cores with 8 including the hyper threading on a Z-97 asus saber-tooth not strong enough... I mean Im fighting CRC errors as well and Ive tried moving and re-seating the sata connectors on my 2 Samsung 500GB's 860evo's with no luck Ive already gotten one error in 10 minutes of boot up im going to try narrowing it down and see if it is just on one drive and go from there but any help with my CPU issues would help because I cant even game on it at this point with the CPU Spikes..

Edited by brmcdonald68s
Link to comment
  • 1 year later...
35 minutes ago, xxbigfootxx said:

Same here. I've been noticing the server run quite sluggish and i even installed more RAM into it. 

 

I can see in the logs there are a few erros with a PCIe bus, can someone help with what  the exact issue is?

 

image.thumb.png.f9ab7b27a28c477176fec65c932fdfff.png

zeus-diagnostics-20201016-0920.zip 217.54 kB · 0 downloads

Since all of the errors are with AER and they are all Corrected - it would be safe to disable AER - however, I would not recommend doing so.

Instead, since this issue is being triggered when attempting to access the memory mapped PCI Configuration; I would use the kernel option to switch back to legacy PCI Configuration you can do so by adding the following kernel parameter:

pci=nommconf



This will force the machine to ask the device itself for it's configuration parameters rather than mapping the device's configuration to a memory address. There's a completely negligible performance difference, and this will keep AER enabled, which can improve stability (for example, if an actual error occurs AER might be able to correct it on the fly and not result in a crash)

Link to comment
  • 2 months later...

Hello,

 

Just to chime in, I am also occasionally having this issue i think. CPU maxes out (not on all cores), docker containers become unresponsive, memory seems to be all used up. I am just doing a reboot when i notice that it's happened. but obviously this is a crappy workaround.

 

unraid-cpu.JPG.74525d2f5ab8343d15aa3cc404898145.JPGunraid-console.JPG.c22225a8508fe121dfbe5cf82ff34c69.JPG

 

 

Does anyone have any working solution?

 

Cheers!

Link to comment
  • 8 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.