Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

High CPU Usage / Spikes - find /mnt/cache/docker -noleaf

Featured Replies

Hello Unraid Community,

 

I've been experiencing an issue on my Unraid system where a particular process is causing unusually high CPU usage every 5-10 seconds. The process in question is a `find` command running as root, specifically `find /mnt/cache/docker -noleaf`. This seems to be repeatedly scanning my Docker cache directory, and I'm unsure why it's happening or how to address it.

 

I've attached screenshots from Netdata that show the spikes in CPU usage corresponding to when this command is executed. These spikes are making me concerned about potential performance impacts on my server.

 

Does anyone have insights into why this `find` command might be running so frequently and any suggestions on how to mitigate the high CPU usage? Could this be related to a misconfiguration in Docker or a scheduled task I'm not aware of?

 

Any advice or guidance would be greatly appreciated. Thank you in advance for your help!

 

1761806011_Screenshot2024-03-07131923.thumb.png.0ca3329131cb4cb4a6fd8a0fc1a3b828.png

1087861311_Screenshot2024-03-07133706.thumb.png.572e56760eacad1c9dc940a0c723ef50.png

68039505_Screenshot2024-03-07134429.thumb.png.f6e271c56e81af35256a074b753cc5d6.png

unraidpsy-diagnostics-20240307-1322.zip

  • Community Expert

The find command running regularly is frequently caused by the cache_dirs plugin.   If using that plugin you want to try and limit the folders it scans.

Set up cache_dirs to only include the folders you really need to be scanned.  Don't use the default settings.  It will end up scanning everything causing the issue you see.

  • Author

Ok, I think I found out what is causing this issue. It was the "Dynamix Cache Directories" Unraid plugin. 

I disabled it. Any reason why I should leave it on?

 

1.thumb.png.f1fd47d53d319d797e7ade35409d56aa.png

Untitled-1.thumb.jpg.f1bc53b8182633ea6319b15658cdc240.jpg

  • Community Expert

The purpose is to avoid disks in the array being spun up unnecessarily.   However you do need to use the included Folders setting to limit to relevant folders to avoid excessive scanning.

  • Author

For best practices, what should I include or exclude exactly? I'm new to unraid, sorry for asking.

 

Data folder is for media server: Radarr, torrents, emby etc. 

nextcloud_data for Nextcloud AIO.

 

My shares:

image.thumb.png.9a2c4e4f5b646c19ddebcf94bb85085d.png

  • Community Expert

There is no ‘right’ answer to this as it depends on exactly how you have things set up, but based on you comment it is likely you only want the ‘data’ folder included.

  • Author

Ok, Thanks!

I have SMB on for these folders. Nextcloud data is on the spinning disk too. Should i include the data and nextcloud dir too?

 

It seems that these spikes appear only if I do not include any dir in the plugin settings.

 

image.thumb.png.211ee360ff288ebb071bcdd5eb4631d3.png

Edited by psy

  • Community Expert

Of the shares you have, only data and nextcloud_data should be scanned.

 

Personally, I would have those other shares hidden or not shared on the network.

  • Community Expert

You basically want to make settings to limit the number of folders/files to be scanned.    If the number is too large the the Linux level will not be able to keep all directory entries in RAM so it is continually re-reading them causing the symptoms you saw.

  • Author

Thanks! I share them because in data i have only torrents and movies and i don't care about them, and nextcloud_data because transfer is way better with smb than via nextcloud on browser.

  • Author

What is this process? 

/usr/local/bin/unraid-api/unraid-api/snapshot/api/dist/unraid-api .cjs start

 

It seems that this also causes my cpu spikes every few seconds.

image.thumb.png.c8058346d64d0e492d75e33ef25e509a.png

 

Also this one:

image.thumb.png.310368c047227f8f037927a5bf98fc52.png

  • Author

I fixed the unraid-api cpu spikes by removing the unraid connect plugin. 

I think something is filling up my logs, and therefore putting pressure on nvme writes. Is this normal?

 

image.thumb.png.9bf0e840bde9a47894d52c208cf22fe8.png

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.