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.

cache_dirs - an attempt to keep directory entries in RAM to prevent disk spin-up

Featured Replies

This may be a silly question, but the way I understand this script...If I use "user shares" I would want to use the -u switch, right? I access the server though user shares and the /mnt/user/ paths are the ones that should also be cached.

 

Thanks

  • Replies 1.2k
  • Views 460.5k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Alex R. Berg
    Alex R. Berg

    Hey yo all,   I'm the last active maintainer of the plugin cache-dir script (I guess since Joe wrote it). There's 'complaints' for a long time here, that cache-dir spikes CPU, and I finally

  • There is a replacement cache_dirs plugin that should solve several of the issues here.  Uninstall the current cache_dirs then go to CA and install the new one.  You will notice that the 'exclude' fold

  • Alex R. Berg
    Alex R. Berg

    It looks good interwebotech, so your problem is not the line i noticed had changed.    After I sent the message I noticed I completely had missed pulling all the changes from the release-rep

Posted Images

  • Author

This may be a silly question, but the way I understand this script...If I use "user shares" I would want to use the -u switch, right? I access the server though user shares and the /mnt/user/ paths are the ones that should also be cached.

 

Thanks

User-shares data structures that are performing the union of all the disks, and presenting you with a consolidated view, are already in memory.  No need to cache them... should never have to spin up a disk to read them.

 

But the option is there to cache_dirs if you want to see if it makes a difference.

 

I use user-shares.  I never use the -u option.

 

Joe L.

I downloaded cache_dirs from the first post in this thread, but when I run cache_dirs -V the version is listed as 1.6.5  - is this just a problem with the script misreporting the version number?

 

*Edit*

I just opened the script in an editor, it has notes about 1.6.6 and what was fixed, but the version variable is listed as 1.6.5 in the script. 

  • Author

I downloaded cache_dirs from the first post in this thread, but when I run cache_dirs -V the version is listed as 1.6.5  - is this just a problem with the script misreporting the version number?

yes

I have determined that using Windows Explorer causes the disks to spin up, whereas Total Commander does not.

 

"How do you like them apples?" :P

Is there anything I can do to make it quit faster? Whenever I'm working on my server and it requires multiple shutdowns, it's a real hassle to shutdown as the server is waiting on the drives to unmount. Using -q doesn't do anything, it still keeps going. I have to kill multiple Find processes manually before it finally finishes.

 

Thanks,

Adrian

 

Unraid 4.7

  • Author

Is there anything I can do to make it quit faster? Whenever I'm working on my server and it requires multiple shutdowns, it's a real hassle to shutdown as the server is waiting on the drives to unmount. Using -q doesn't do anything, it still keeps going. I have to kill multiple Find processes manually before it finally finishes.

 

Thanks,

Adrian

 

Unraid 4.7

It looks for the lock file once each time through it "find" loop.

Have it loop faster ( by having it search fewer directories, or less deep in your hierarchy ) and it will terminate faster.

 

Or, don't use it... Or... re-write it in C.  It is only a shell script. ;)

by having it search fewer directories, or less deep in your hierarchy

 

ok, I guess excluding the directories that I rarely access would help. I'll give that a shot.

 

Or... re-write it in C

hehe...well if you could convince me that it would be fast enough to be worth it maybe I could get inspired ;)

  • 2 weeks later...

@Joe L.

 

is there any option to scan all disks in cache ? Now is the situation that when i enter a dir first time the disk spin up and put the content into cache. When i enter this dir next time all is ok from cache. But i have for every movie a dir, and so at 1000 movies it takes a lot time to put all dirs into cache manual. I hope you understand what i mean.

 

Greets

Eisi

 

  • Author

@Joe L.

 

is there any option to scan all disks in cache ? Now is the situation that when i enter a dir first time the disk spin up and put the content into cache. When i enter this dir next time all is ok from cache. But i have for every movie a dir, and so at 1000 movies it takes a lot time to put all dirs into cache manual. I hope you understand what i mean.

 

Greets

Eisi

The directory entries are ALREADY being cached.  If your visiting the individual directories is accessing the files in the directory themselves, then that is why the disks themselves need to be accessed.

 

Sorry, but there is nothing that will help you unless you know more of exactly what is being accessed.

 

You can install the inotify tools package and see exactly what is being accessed.  Then you can really see why your disks are being spun up.

 

You can run the cache_dirs program with the -F option on the command line to see what it is doing.  It will print to the screen the directories as they are being scanned.

 

Joe L.

@Joe L.

 

Thanks for attempt to help me. I install the notify tool and start it. Then i enter a dir from my server share. Here is the result:

 

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN Drag me to Hell - BluRay-trailer.mov

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE Drag me to Hell - BluRay-trailer.mov

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN Drag me to Hell - BluRay-trailer.mov

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE Drag me to Hell - BluRay-trailer.mov

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN Drag me to Hell - BluRay-trailer.mov

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/ OPEN,ISDIR

/mnt/user/server/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/ OPEN,ISDIR

/mnt/user/server/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/ OPEN,ISDIR

/mnt/user/server/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/ OPEN,ISDIR Filme

/mnt/user/server/Filme/ OPEN,ISDIR

/mnt/user/server/ CLOSE_NOWRITE,CLOSE,ISDIR Filme

/mnt/user/server/Filme/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/ OPEN,ISDIR Kinderfilme

/mnt/user/server/Kinderfilme/ OPEN,ISDIR

/mnt/user/server/ CLOSE_NOWRITE,CLOSE,ISDIR Kinderfilme

/mnt/user/server/Kinderfilme/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/ OPEN,ISDIR MP3

/mnt/user/server/MP3/ OPEN,ISDIR

/mnt/user/server/ CLOSE_NOWRITE,CLOSE,ISDIR MP3

/mnt/user/server/MP3/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/ OPEN,ISDIR neu

/mnt/user/server/neu/ OPEN,ISDIR

/mnt/user/server/ CLOSE_NOWRITE,CLOSE,ISDIR neu

/mnt/user/server/neu/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/MP3/ OPEN,ISDIR Musik

/mnt/user/server/MP3/Musik/ OPEN,ISDIR

/mnt/user/server/MP3/ CLOSE_NOWRITE,CLOSE,ISDIR Musik

/mnt/user/server/MP3/Musik/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/ OPEN,ISDIR

/mnt/user/server/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/ OPEN,ISDIR Serien

/mnt/user/server/Serien/ OPEN,ISDIR

/mnt/user/server/ CLOSE_NOWRITE,CLOSE,ISDIR Serien

/mnt/user/server/Serien/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/MP3/Musik/ OPEN,ISDIR 0-9

/mnt/user/server/MP3/Musik/0-9/ OPEN,ISDIR

/mnt/user/server/MP3/Musik/ CLOSE_NOWRITE,CLOSE,ISDIR 0-9

/mnt/user/server/MP3/Musik/0-9/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/ OPEN,ISDIR Spiele

/mnt/user/server/Spiele/ OPEN,ISDIR

/mnt/user/server/ CLOSE_NOWRITE,CLOSE,ISDIR Spiele

/mnt/user/server/Spiele/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/MP3/Musik/0-9/ OPEN,ISDIR 4 Non Blondes - Bigger,better,faster,more

/mnt/user/server/MP3/Musik/0-9/4 Non Blondes - Bigger,better,faster,more/ OPEN,ISDIR

/mnt/user/server/MP3/Musik/0-9/ CLOSE_NOWRITE,CLOSE,ISDIR 4 Non Blondes - Bigger,better,faster,more

/mnt/user/server/MP3/Musik/0-9/4 Non Blondes - Bigger,better,faster,more/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Spiele/ OPEN,ISDIR eset nod

/mnt/user/server/Spiele/eset nod/ OPEN,ISDIR

/mnt/user/server/Spiele/ CLOSE_NOWRITE,CLOSE,ISDIR eset nod

/mnt/user/server/Spiele/eset nod/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE Drag me to Hell - BluRay-trailer.mov

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

xtrafanart

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrafanart/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR extrafanart

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrafanart/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR extrafanart

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrafanart/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR extrafanart

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrafanart/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR extrafanart

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrafanart/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR extrathumbs

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrathumbs/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR extrathumbs

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrathumbs/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR extrathumbs

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrathumbs/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR extrathumbs

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrathumbs/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR extrathumbs

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrathumbs/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR extrathumbs

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrathumbs/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR extrathumbs

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrathumbs/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR extrathumbs

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrathumbs/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR extrathumbs

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrathumbs/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR extrathumbs

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrathumbs/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR extrathumbs

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrathumbs/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR extrathumbs

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrathumbs/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR extrathumbs

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrathumbs/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR extrathumbs

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrathumbs/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR extrathumbs

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrathumbs/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR extrathumbs

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/extrathumbs/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN,ISDIR

/mnt/user/server/Filme/D-E/ CLOSE_NOWRITE,CLOSE,ISDIR Drag me to Hell - BluRay

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ CLOSE_NOWRITE,CLOSE,ISDIR

/mnt/user/server/Filme/D-E/ OPEN,ISDIR Drag me to Hell - BluRay

 

Did that say you somethin ?

 

Greets

Eisi

 

Here is a second example, but i don´t know why there was logged the movie "dogma" when i entered drive angry.

 

http://pastebin.com/pibb4jDA

 

Hope you could give me a hint. After entering first time the dir, go back, then spin donw driv and enter dir again, all is fine the conten was show and no disk spin up.

 

Greets

Eisi

 

Your browser is opening up the movie files and likely retrieving info from them.

 

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN Drag me to Hell - BluRay-trailer.mov

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN Drag me to Hell - BluRay-trailer.mov

/mnt/user/server/Filme/D-E/Drag me to Hell - BluRay/ OPEN Drag me to Hell - BluRay-trailer.mov

 

/mnt/user/server/Filme/D-E/Drive Angry - BluRay/ OPEN Drive Angry - BluRay-trailer.mov

/mnt/user/server/Filme/D-E/Drive Angry - BluRay/ OPEN Drive Angry - BluRay-trailer.mov

@BRit

 

could i make a setting in win 7 explorer to change that ?

 

I don´t understand why the explorer access a file. When i enter the dir a second time the disk will not spin up.

 

When i make first time a double klick on a movie dir, the disk spin up and first when the disk is up the explorer entered the dir and shows me the files.

 

Greets

Eisi

 

Explorer accesses the file because it's trying to extract media info from the files in the directory or trying to generate or display thumbnails. It likely wont access the file(s) a second time because Explorer has that info cached on the client side.

 

As for what settings to tweak so it doesn't try to extract media info, I don't know of any directly. Perhaps use an alternative file explorer or file manager?

  • Author

exectly.  The cache_dirs is just keeping the directory entries in cache by accessing them frequently.

 

Your browser or whatever you are using to access the directory is opening up the media files.  Those are not in the cache.  (and unless you have a *very small* media collection, all your media files are very unlikely to fit in your RAM at the same time)

 

Perhaps you can set a listing mode that shows text names only, and does not display thumbnail images of the media in the directories. 

 

The issue is in your file-explorer, not in how the directories are cached.

 

The name of the script unfortunately is not "cache_all_my_hard_disk_content" as that is not possible in most cases.  (I only have 512 Meg of ram on my original server, and 6TB of disks.  No way will it all fit, even if I use small bits  ;).)

@Joe L. and BRiT

 

Thanks for your help. You Show me the right way. I must change my folder settings. After disable thumbnails all work fine.

 

Greets

Eisi

 

Just a word of warning. cache_dirs started becoming the daemon that actually spun up all my disks. In the end the core issue was obvious but for a while it had me scratching my head.

 

I placed my XBMC library artwork folders on unRAID. XBMC creates huge amounts of art files so essentially even with 4GB or ram and normal usage expesive cache data i.e. my media colection was being pushed out by non expensive data i.e. my artwork cache. Approcimately XBMC creates two jpg art files per movie, one per tv show and 30+ for actor thumbs. Realsiitically your looking at 20-30 image files per video file.

 

I havent confirmed this completely but i have made the changes and should be able to confirm soon.

 

I so wish there was a better way to do this as going beyond 4GB for ls data seems silly and has obvious PAE implications.

  • Author

Just a word of warning. cache_dirs started becoming the daemon that actually spun up all my disks. In the end the core issue was obvious but for a while it had me scratching my head.

 

I placed my XBMC library artwork folders on unRAID. XBMC creates huge amounts of art files so essentially even with 4GB or ram and normal usage expesive cache data i.e. my media colection was being pushed out by non expensive data i.e. my artwork cache. Approcimately XBMC creates two jpg art files per movie, one per tv show and 30+ for actor thumbs. Realsiitically your looking at 20-30 image files per video file.

 

I havent confirmed this completely but i have made the changes and should be able to confirm soon.

 

I so wish there was a better way to do this as going beyond 4GB for ls data seems silly and has obvious PAE implications.

Not knowing what you have on your server, but theorizing.

 

If each directory entry occupied 1000 bytes of data  (I doubt this is the case, but again, just guessing it has to have the file name, the modification/access/creation dates, and permissions. )

If you had 100,000 files, the directory entries would occupy 100Meg of space in RAM. 

 

That is nowhere near 4Gig.  Something else is spinning up the drives.  In addition,  I suspect it is less than 100 bytes per directory structure, so 100Meg should handle about a million directory entries with relative ease.

 

Joe L.

Thats the main reason i didnt look at cache_dirs sooner. Here the thing though I could watch via lsof and grep cache_dirs walk the directory when the server had been sitting for several hours doing nothing. Now that I have removed the XBMC artwork cache from cache_dirs drives sleep as expected.

 

I dont think it is a math problem but rather a cache pressure problem. Currently I have:

 

vm.vfs_cache_pressure = 5

 

I know the kernel documentation states

 

"When vfs_cache_pressure=0, the kernel will never reclaim dentries and inodes"

 

but this in my experience is not correct with a zero value being no different to a low value.

 

  • 4 weeks later...

I am in the later stages of writing a plugin for unRAID V5.0b that capulates the cache_dirs script into the V5.0 compatible plugin with a menu system.

 

Anyone see any value in this.

 

cache_dirs-2-settings_menu.PNG

 

cache_dirs-3-configuration_menu.PNG

 

 

 

Cache_dirs is a very valuable extension. Anyone who don't want needless disk spin ups due to directory reading should use this.

 

In fact there is already an add-on as part of SimpleFeatures which gives a graphical interface to the cache_dirs settings.

 

You may want to continue your development for anyone running the stock interface though  :)

 

Below a screenshot.

 

cache_dirs.png

 

Unless Joel L. has a problem with adding Graphical interface I think it would be a great addon to have.

  • 2 months later...

Cache_dirs is a very valuable extension. Anyone who don't want needless disk spin ups due to directory reading should use this.

 

In fact there is already an add-on as part of SimpleFeatures which gives a graphical interface to the cache_dirs settings.

 

You may want to continue your development for anyone running the stock interface though  :)

 

Below a screenshot.

 

cache_dirs.png

 

I decided to give this version a go in SimpleFeatures, but the -e command is not working.  I think it is because the code is not wrapping "" around the folder names in the -e command?

Strange..works on my setup <see below> Should probably go in the SImpleFeatures thread to get more attention.

 

Simple Features....

Line 61: 2012-07-01	19:43:40	notice	192.168.1.108	user	cache_dirs	cache_dirs process ID 857 started, To terminate it, type: cache_dirs -q
Line 62: 2012-07-01	19:43:40	notice	192.168.1.108	user	cache_dirs	----------------------------------------------
Line 63: 2012-07-01	19:43:40	notice	192.168.1.108	user	cache_dirs	movies
Line 64: 2012-07-01	19:43:40	notice	192.168.1.108	user	cache_dirs	---------- caching directories ---------------
Line 65: 2012-07-01	19:43:40	notice	192.168.1.108	user	cache_dirs	version=1.6.6
Line 66: 2012-07-01	19:43:40	notice	192.168.1.108	user	cache_dirs	command=find -noleaf
Line 67: 2012-07-01	19:43:40	notice	192.168.1.108	user	cache_dirs	max_depth=9999
Line 68: 2012-07-01	19:43:40	notice	192.168.1.108	user	cache_dirs	max_seconds=10, min_seconds=1
Line 69: 2012-07-01	19:43:40	notice	192.168.1.108	user	cache_dirs	vfs_cache_pressure=10
Line 69: 2012-07-01	19:43:40	notice	192.168.1.108	user	cache_dirs	vfs_cache_pressure=10
Line 70: 2012-07-01	19:43:40	notice	192.168.1.108	user	cache_dirs	command-args=-w -B -m1 -M10 -d9999 -eAutumn -e Documents -e music -imovies

 

Earlier unMENU install

Line 536: 2012-06-24	12:39:03	notice	192.168.1.108	user	cache_dirs	cache_dirs process ID 3755 started, To terminate it, type: cache_dirs -q
Line 537: 2012-06-24	12:39:03	notice	192.168.1.108	user	cache_dirs	----------------------------------------------
Line 538: 2012-06-24	12:39:03	notice	192.168.1.108	user	cache_dirs	music
Line 539: 2012-06-24	12:39:03	notice	192.168.1.108	user	cache_dirs	movies
Line 540: 2012-06-24	12:39:03	notice	192.168.1.108	user	cache_dirs	Documents
Line 541: 2012-06-24	12:39:03	notice	192.168.1.108	user	cache_dirs	Autumn
Line 542: 2012-06-24	12:39:03	notice	192.168.1.108	user	cache_dirs	---------- caching directories ---------------
Line 543: 2012-06-24	12:39:03	notice	192.168.1.108	user	cache_dirs	version=1.6.5
Line 544: 2012-06-24	12:39:03	notice	192.168.1.108	user	cache_dirs	command=find -noleaf
Line 545: 2012-06-24	12:39:03	notice	192.168.1.108	user	cache_dirs	max_depth=9999
Line 546: 2012-06-24	12:39:03	notice	192.168.1.108	user	cache_dirs	max_seconds=10, min_seconds=1
Line 547: 2012-06-24	12:39:03	notice	192.168.1.108	user	cache_dirs	vfs_cache_pressure=10
Line 547: 2012-06-24	12:39:03	notice	192.168.1.108	user	cache_dirs	vfs_cache_pressure=10
Line 548: 2012-06-24	12:39:03	notice	192.168.1.108	user	cache_dirs	command-args=-w -m 1 -M 10 -d 9999 -a -noleaf

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.