psy Posted March 7 Share Posted March 7 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! unraidpsy-diagnostics-20240307-1322.zip Quote Link to comment
itimpi Posted March 7 Share Posted March 7 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. Quote Link to comment
dlandon Posted March 7 Share Posted March 7 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. Quote Link to comment
psy Posted March 7 Author Share Posted March 7 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? Quote Link to comment
itimpi Posted March 7 Share Posted March 7 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. Quote Link to comment
psy Posted March 7 Author Share Posted March 7 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: Quote Link to comment
itimpi Posted March 7 Share Posted March 7 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. Quote Link to comment
psy Posted March 7 Author Share Posted March 7 (edited) 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. Edited March 7 by psy Quote Link to comment
trurl Posted March 7 Share Posted March 7 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. Quote Link to comment
itimpi Posted March 7 Share Posted March 7 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. Quote Link to comment
psy Posted March 7 Author Share Posted March 7 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. Quote Link to comment
psy Posted March 7 Author Share Posted March 7 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. Also this one: Quote Link to comment
psy Posted March 7 Author Share Posted March 7 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? Quote Link to comment
Recommended Posts
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.