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


Recommended Posts

So I don't need the -e anymore, I will take that out

 

boot/cache_dirs -d 9 -m 3 -M 5 -p 200 -i "TV\ Shows" -i "Movies" -i "Music" -i "Public" -i "Complete" -w

 

I needed to have the TV Shows like  TV\ Shows becasue it said it doesn't exist

 

so with the -d 9 options

 

the following dirs will be cached too

 

say

 

TV Shows\Showname\Seasons 01\

 

so if i click on season 01 to show the contents the drives should still not spin up

 

am I understanding this correctly?

Link to comment

So I don't need the -e anymore, I will take that out

 

boot/cache_dirs -d 9 -m 3 -M 5 -p 200 -i "TV\ Shows" -i "Movies" -i "Music" -i "Public" -i "Complete" -w

 

I needed to have the TV Shows like  TV\ Shows becasue it said it doesn't exist

 

so with the -d 9 options

 

the following dirs will be cached too

 

say

 

TV Shows\Showname\Seasons 01\

 

so if i click on season 01 to show the contents the drives should still not spin up

 

am I understanding this correctly?

 

It will attempt to cache them, there is NO guarantee.  If on your computer it has to generate a thumbnail, preview, etc then the disk will spin up, and there is nothing that can really be done about that.

Link to comment

How can I figure out if this is working for me?  I don't believe it is when I tried to connect from my laptop it took a long time to load up and when I dug in a little bit the drive spun up...

 

Any help would be much appreciated.

 

Thanks,

 

Neil

 

run it in the foreground so you ran watch it as it runs.

Invoke with

-F -v

Options

Link to comment

Thanks.  This is what I see now:

 

Executing find /mnt/disk1/Movies -noleaf

Executing find /mnt/disk2/Movies -noleaf

Executing find /mnt/disk3/Movies -noleaf

Executing find /mnt/disk4/Movies -noleaf

Executing find /mnt/disk5/Movies -noleaf

Executing find /mnt/disk6/Movies -noleaf

Executing find /mnt/disk7/Movies -noleaf

Executing find /mnt/cache/Movies -noleaf

Executed find in 0.073426 seconds, weighted avg=0.073422 seconds, now sleeping 3 seconds

 

 

Is that normal and a good sign?

 

Thanks,

 

Neil

 

Link to comment

.07 seconds indicates all is in ram or you have very fast disks.

 

Cache_dirs will not help if your laptop is a accessing files.to create thumbnails, or store attributes. It does not cache file contents, just directory entries.

 

The whole idea is the directory entries will not be displaced from the cache in the next three seconds until the next scan.

 

 

Link to comment

When I run it the first time I Get the .7 seconds.

 

cache_dirs -F -v -w -B -i "Movies" "Recordings"

Executing find /mnt/disk1/Movies -noleaf

Executing find /mnt/disk2/Movies -noleaf

Executing find /mnt/disk3/Movies -noleaf

Executing find /mnt/disk4/Movies -noleaf

Executing find /mnt/disk5/Movies -noleaf

Executing find /mnt/disk6/Movies -noleaf

Executing find /mnt/disk7/Movies -noleaf

Executing find /mnt/cache/Movies -noleaf

Executed find in 0.073367 seconds, weighted avg=0.073367 seconds, now sleeping 5 seconds

 

 

I have green drives (i.e. Not fast drives0 and they are all spun down so I think something is wrong here?

 

Thanks,

 

Neil

Link to comment

When I run it the first time I Get the .7 seconds.

 

cache_dirs -F -v -w -B -i "Movies" "Recordings"

Executing find /mnt/disk1/Movies -noleaf

Executing find /mnt/disk2/Movies -noleaf

Executing find /mnt/disk3/Movies -noleaf

Executing find /mnt/disk4/Movies -noleaf

Executing find /mnt/disk5/Movies -noleaf

Executing find /mnt/disk6/Movies -noleaf

Executing find /mnt/disk7/Movies -noleaf

Executing find /mnt/cache/Movies -noleaf

Executed find in 0.073367 seconds, weighted avg=0.073367 seconds, now sleeping 5 seconds

 

 

I have green drives (i.e. Not fast drives0 and they are all spun down so I think something is wrong here?

 

Thanks,

 

Neil

No, it seems to be running just fine.

Link to comment

I've got 16TB in my unRAID server using a AMD 140 Sempron and 1GB of RAM. It only holds Movies (about 2000 at present).

 

Will cache_dirs work after installation without adjusting any settings?

 

Can my RAM/CPU handle it?

 

Thanks

You will tell us.  Run in the foreground to see what it does.  I have have that RAM and it works fine for me.  Are you running an 8086 or greater?  Then it is enough.
Link to comment

I've got 16TB in my unRAID server using a AMD 140 Sempron and 1GB of RAM. It only holds Movies (about 2000 at present).

 

Will cache_dirs work after installation without adjusting any settings?

 

Can my RAM/CPU handle it?

 

Thanks

You will tell us.  Run in the foreground to see what it does.   I have have that RAM and it works fine for me.  Are you running an 8086 or greater?  Then it is enough.

 

So if I run it and it can't cope it won't crash?

 

I've no idea if it is 8086, it's this one:

http://www.pcworld.co.uk/gbuk/amd-sempron-140-processor-04820926-pdt.html

Link to comment

I can't seem to get cache_dirs to load from my go script when unraid is started and I can't figure out why.  The start command is added to my go script right between the start of the emhttp start and the start up of unmenu.  I can see these two start up in the syslog, but no sign of cache_dirs until I start it manually.  What could I be missing?

 

This is normally not a problem.  The server doesn't get stopped very often.  But now that Irene has blown through and the local electric utility seems to go offline with a stiff breeze, the server has been going up and down quite a bit and it's starting to become a pain.

 

Thanks,

Fred

Link to comment
  • 3 weeks later...

@Joe L.

 

how could i excluded the following dirs. My structure is the following

 

first dir is server

and there ar the dirs called Filme, Mp3, ...

 

i want to exclude Mp3

 

cache_dirs -w -B -e "\server\Bilder" -e "server\Mp3"

 

bring an error

 

ERROR: excluded directory "server\MP3" does not exist.

 

 

Is there any chance ?

 

Greets

Eisi

 

Link to comment

remember that the command and path is all case sensitive and make sure you don't have a windows carriage return after the command

 

Try copying the line from the go script and pasting it into putty and make sure it works.

make sure you give the full path to the command.

 

If you're not sure, zip your go file and attach it, otherwise all we can say is it works for us.

 

If you invoke it immediately after emhttp the array will not yet be online, so it should queue itself to be re-invoked.... (it you gave it the -w option when invoking it)

Link to comment

@Joe L.

 

how could i excluded the following dirs. My structure is the following

 

first dir is server

and there ar the dirs called Filme, Mp3, ...

 

i want to exclude Mp3

 

cache_dirs -w -B -e "\server\Bilder" -e "server\Mp3"

 

bring an error

 

ERROR: excluded directory "server\MP3" does not exist.

 

 

Is there any chance ?

 

Greets

Eisi

 

Linux uses slashes, dos uses back-slashes.

If "server" is indeed a folder on your user shares (you have a user-share named "server") then the path is

/server/MP3

not

\server\MP3

 

 

Link to comment

@Joe L.

 

Thx for the fast answer. I hope you could say me the right syntax.

 

i have a share called server. If i mount the share i see the folders called:

 

Filme

MP3

Bilder

 

if i look per putty on the unraid server i have this structure

 

cd mnt

in mnt is disk1 disk2 disk3 disk 4 disk 5 disk 6 and user

under every disk i have a dir called server and in this dir are the folders Filme, MP3, Bilder

 

in the user folder i have a dir called server and in this dir are the other dirs Filme. MP3, Bilder

 

when i now included "server" and will excluded /server/MP3 will this work ?

 

or will the -i "server" overwrite the exclusion from -e "/server/mp3/" ?

 

Greets

Eisi

 

 

Link to comment

@Joe L.

 

Thx for the fast answer. I hope you could say me the right syntax.

 

i have a share called server. If i mount the share i see the folders called:

 

Filme

MP3

Bilder

 

if i look per putty on the unraid server i have this structure

 

cd mnt

in mnt is disk1 disk2 disk3 disk 4 disk 5 disk 6 and user

under every disk i have a dir called server and in this dir are the folders Filme, MP3, Bilder

 

in the user folder i have a dir called server and in this dir are the other dirs Filme. MP3, Bilder

 

when i now included "server" and will excluded /server/MP3 will this work ?

 

or will the -i "server" overwrite the exclusion from -e "/server/mp3/" ?

 

Greets

Eisi

 

 

the includes and excludes cannot be used on sub-directories under a share as the code is written.

You can exclude, or include  "server"

 

You can, of course modify the script to do as you desire, but that is not how I originally wrote it.

 

I think you'll find a solution in this thread, since I remember a while ago someone asking a similar question.

 

For the most part, unless you have a HUGE set of files (100000 or more) in a directory there is no need to use anything to include or exclude.

Link to comment

I am getting the "duplicate objects" log entries whenever mover is running.  As a test I stopped cache_dirs and ran the mover manually and did not get the "duplicate object" log entries.

 

I can't say for sure that cache_dirs is causing these entries, but it looks to be the cuplrit.  Is there a way to confirm this?  If so, then what steps can I take to stop the log entries?  I have checked and I am running the latest version of cache_dirs.

 

There are a lot of these log entries at night when the mover is running.  Seems like a lot of needless entries in the log.

Link to comment

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.