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.

Can't get cache_dirs working on upgrade to 6 final

Featured Replies

Hello all,

 

I'm having a problem, almost certainly one I created myself, with getting cache_dirs to work.

 

I started Unraid with server pro 4.7, and added the cache_dirs script. I later upgraded to 6.0b12 and again, no issues.

 

I've since upgraded to 6.0.1 final. Since then, cache_dirs no longer seems to work: if I spin down all the drives manually, and then browse the file structure a from a client PC, there is a pause, and it spins up the drives. The previous behavior was I could browse the tree instantly to pretty much any folder depth, and it would only spin up the drives if I actually opened a file, like playing a movie or what have you.

 

I noticed from my process list there was, in fact, a cache_dirs process running. Nonetheless I installed the plugin with the new plugin manager, no issues. Unfortunately, now I have 2 processes as such:

 

root      3462    1  0 Jul11 ?        00:04:13 /bin/bash /boot/cache_dirs -w -m 1 -M 10 -d 9999 -p 10 -U 50000 -B -a -noleaf

root      5768  3462  0 08:07 ?        00:00:00 /bin/bash /boot/cache_dirs -w -m 1 -M 10 -d 9999 -p 10 -U 50000 -B -a -noleaf

 

and it's still not behaving as previously, accessing the file structure pauses while it spins up a drive, and wakes up more drives as I progress.

 

How do I straighten this out?

 

 

Thanks!

 

 

I don't see anything obvious.  I assume you know that CacheDirs is now included as a plugin, so you should remove the cache_dirs line from the go file, and make sure the plugin is correctly configured.  Please see the CacheDirs guidelines in the Upgrading to UnRAID v6 guide.  I strongly recommend selecting which shares to include, not all of them, only those where it would be helpful.

  • Author

Thank you for the response.

 

I removed that line from my go file, and set the plugin back to enabled, then to defaults, and then to only cache the one share I want. I then rebooted. Still having the issue, I spin drives down, browse directories, they are spun up again.

 

From my process list:

 

root    11846    1  0 11:25 ?        00:00:00 /bin/bash /usr/local/sbin/cache_dirs -w -B -m 1 -M 10 -d 9999 -e appdata -i Shared

 

From my syslog:

 

Jul 14 11:25:57 Shiva cache_dirs: ==============================================

Jul 14 11:25:57 Shiva cache_dirs: command-args=-w -B -m 1 -M 10 -d 9999 -e appdata -i Shared

Jul 14 11:25:57 Shiva cache_dirs: vfs_cache_pressure=10

Jul 14 11:25:57 Shiva cache_dirs: max_seconds=10, min_seconds=1

Jul 14 11:25:57 Shiva cache_dirs: max_depth=9999

Jul 14 11:25:57 Shiva cache_dirs: command=find -noleaf

Jul 14 11:25:57 Shiva cache_dirs: version=1.6.9

Jul 14 11:25:57 Shiva cache_dirs: ---------- caching directories ---------------

Jul 14 11:25:57 Shiva cache_dirs: Shared

Jul 14 11:25:57 Shiva cache_dirs: ----------------------------------------------

Jul 14 11:25:57 Shiva cache_dirs: cache_dirs process ID 11846 started, To terminate it, type: cache_dirs -q

 

What should I try next?

How much memory do you have installed and how many files do you have in the directory you're trying to cache? Also, how long after starting the cache_dirs script are you trying to access the files.

 

It could be either that you don't have enough memory to cache all the files, or that the process that caches the directories hasn't completed yet. It doesn't sound like it's a memory issue since it was working for you in the past.

  • Author

I have 2gb of RAM, and yes - it was working until 2 days ago or whenever I upgraded to Unraid final. The share has 165,067 files broken up into 8,194 folders. The folders levels aren't very deep, I don't think there is any directory that is more than 8 levels and most are like 2 or 3 deep probably. I have a few subfolders, like TV shows and comics, that have many folders in them, but again it's shared\comics\(title), or shared\tv\(title), 3 deep.

 

One thing I did notice is that, on the Unraid Main page previously my RAM usage was very nearly 100%, all the time, which as I understand is normal. Now it shows 60% used. I think the meter on the Unraid Main page may just report it differently though, I have the system stats plugin going and it shows 1.26gb used, 619mb cached, and 140mb free which lines up (less cached) with the value on the Unraid Main; I suspect that the main page no longer includes cached ram in the displayed usage. This is probably totally unrelated.

 

So far as how quickly am I checking the directory structure after the manual spindown, a few minutes, maybe 10 minutes? I freely admit I have absolutely no idea how long it takes to initially write the folder structure to RAM. I'm about to go to bed, so it will have 8 hours until I next check it.

 

 

I removed that line from my go file, and set the plugin back to enabled, then to defaults, and then to only cache the one share I want. I then rebooted. Still having the issue, I spin drives down, browse directories, they are spun up again.

 

The only thing I can think of is that the first run takes much longer than subsequent runs, because it has to cache them by reading all of the info from the physical drives.  If you spun them down too soon, it may not have finished that first sweep, so had to immediately spin some of them back up.

 

Edit: sorry, this was previously both asked and answered, careless reading on my part.

  • Author

OK, got home from work, so it's been about 22 hours. Still not working - I spun down all of the drives, browsed the directories, and it spun them up again. Process is running.

Archived

This topic is now archived and is closed to further replies.

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.