[Plugin] Mover Tuning


Recommended Posts

Just now, redeuxx said:

 

I was running the latest version from CA, 2021.03.17. The name of my cache is "Cache". It was the same name before I upgraded.

If you decide to re-install it, please verify that the plugin config file exists.

 

ls -ltr /boot/config/plugins/ca.mover.tuning/ca.mover.tuning.cfg

 

You may have to select some setting in the scheduler (Lower Section) for this file to be created/updated. (i.e. move at 50% usage)

Link to comment

I am having the same issue on 6.9.1.  I had noticed the other day that my cache was filling up so I tried to manually run the mover.  Nothing was happening.  So I uninstalled this plugin and was able to get files to move correctly.  I just tried to reinstall it, but I'm back to having the same issues.  I did verify that I have the config file /boot/config/plugins/ca.mover.tuning/ca.mover.tuning.cfg.

 

If there's anything you need me to test, I'm more than happy to.

 

Thanks in advance!

 

Mar 24 16:18:12 Goliath root: Manually starting mover
Mar 24 16:18:12 Goliath root: Forcing turbo write on
Mar 24 16:18:12 Goliath kernel: mdcmd (75): set md_write_method 1
Mar 24 16:18:12 Goliath kernel:
Mar 24 16:18:12 Goliath root: ionice -c 2 -n 0 nice -n 0 /usr/local/emhttp/plugins/ca.mover.tuning/age_mover start 0 0 0 '' ''
Mar 24 16:18:13 Goliath root: Restoring original turbo write mode
Mar 24 16:18:13 Goliath kernel: mdcmd (76): set md_write_method auto
Mar 24 16:18:13 Goliath kernel:
Mar 24 16:18:57 Goliath emhttpd: shcmd (15981): /usr/local/sbin/mover &> /dev/null &
Mar 24 16:18:57 Goliath root: Manually starting mover
Mar 24 16:18:57 Goliath root: Forcing turbo write on
Mar 24 16:18:57 Goliath kernel: mdcmd (77): set md_write_method 1
Mar 24 16:18:57 Goliath kernel:
Mar 24 16:18:57 Goliath root: ionice -c 2 -n 0 nice -n 0 /usr/local/emhttp/plugins/ca.mover.tuning/age_mover start 0 0 0 '' ''
Mar 24 16:18:58 Goliath root: Restoring original turbo write mode
Mar 24 16:18:58 Goliath kernel: mdcmd (78): set md_write_method auto
Mar 24 16:18:58 Goliath kernel:

 

Link to comment
8 minutes ago, my95z34 said:

I am having the same issue on 6.9.1.  I had noticed the other day that my cache was filling up so I tried to manually run the mover.  Nothing was happening.  So I uninstalled this plugin and was able to get files to move correctly.  I just tried to reinstall it, but I'm back to having the same issues.  I did verify that I have the config file /boot/config/plugins/ca.mover.tuning/ca.mover.tuning.cfg.

 

If there's anything you need me to test, I'm more than happy to.

 

Thanks in advance!

 


Mar 24 16:18:12 Goliath root: Manually starting mover
Mar 24 16:18:12 Goliath root: Forcing turbo write on
Mar 24 16:18:12 Goliath kernel: mdcmd (75): set md_write_method 1
Mar 24 16:18:12 Goliath kernel:
Mar 24 16:18:12 Goliath root: ionice -c 2 -n 0 nice -n 0 /usr/local/emhttp/plugins/ca.mover.tuning/age_mover start 0 0 0 '' ''
Mar 24 16:18:13 Goliath root: Restoring original turbo write mode
Mar 24 16:18:13 Goliath kernel: mdcmd (76): set md_write_method auto
Mar 24 16:18:13 Goliath kernel:
Mar 24 16:18:57 Goliath emhttpd: shcmd (15981): /usr/local/sbin/mover &> /dev/null &
Mar 24 16:18:57 Goliath root: Manually starting mover
Mar 24 16:18:57 Goliath root: Forcing turbo write on
Mar 24 16:18:57 Goliath kernel: mdcmd (77): set md_write_method 1
Mar 24 16:18:57 Goliath kernel:
Mar 24 16:18:57 Goliath root: ionice -c 2 -n 0 nice -n 0 /usr/local/emhttp/plugins/ca.mover.tuning/age_mover start 0 0 0 '' ''
Mar 24 16:18:58 Goliath root: Restoring original turbo write mode
Mar 24 16:18:58 Goliath kernel: mdcmd (78): set md_write_method auto
Mar 24 16:18:58 Goliath kernel:

 

hmm.

I'm a bit busy this evening.  However, I will try to get a new file with echo log statements to help track this down into the forum.

Link to comment

Attached is a new "age_mover" which has the echo/log statements in it to help trouble shoot.  Please replace the age_mover with this file if you have trouble.

 

make a backup of the age_mover file

cd /usr/local/emhttp/plugins/ca.mover.tuning/

cp age_mover age_mover_original

 

copy the new file attached to this post to same location

/usr/local/emhttp/plugins/ca.mover.tuning/

age_mover

  • Like 1
Link to comment
On 3/25/2021 at 10:32 AM, hugenbdd said:

Attached is a new "age_mover" which has the echo/log statements in it to help trouble shoot.  Please replace the age_mover with this file if you have trouble.

 

make a backup of the age_mover file

cd /usr/local/emhttp/plugins/ca.mover.tuning/

cp age_mover age_mover_original

 

copy the new file attached to this post to same location

/usr/local/emhttp/plugins/ca.mover.tuning/

age_mover 8.08 kB · 1 download

 

I'm getting the same log output with that file.  Assuming I don't need to reboot or anything after replacing.  I also ensured the permissions were the same as the original as well.

 

//edit// I lied.  I enabled the standard Unraid mover logging and I got some output.

 

Mar 27 22:25:06 Goliath root: Manually starting mover
Mar 27 22:25:06 Goliath root: Forcing turbo write on
Mar 27 22:25:06 Goliath kernel: mdcmd (95): set md_write_method 1
Mar 27 22:25:06 Goliath kernel:
Mar 27 22:25:06 Goliath root: ionice -c 2 -n 0 nice -n 0 /usr/local/emhttp/plugins/ca.mover.tuning/age_mover start 0 0 0 '' ''
Mar 27 22:25:06 Goliath root: *********************************MOVER START*******************************
Mar 27 22:25:06 Goliath root: mover: started
Mar 27 22:25:06 Goliath root: Share Name Only: ((omitted))
Mar 27 22:25:06 Goliath root: Cache Pool Name:
Mar 27 22:25:06 Goliath root: No shareCachePool entry found in config file, defaulting to cache
Mar 27 22:25:06 Goliath root: cache Threshold Pct:
Mar 27 22:25:06 Goliath root: OVERALL Threshold: 65
Mar 27 22:25:06 Goliath root: Share Path: /mnt/cache/((omitted))
Mar 27 22:25:06 Goliath root: Pool Pct Used: 54 %
Mar 27 22:25:06 Goliath root: DFTPCT LIMIT USED FOR SETTING: 65
Mar 27 22:25:06 Goliath root: Threshold Used: 65
Mar 27 22:25:06 Goliath root: Mover not Needed.

Getting that for every share.  So it seems that instead of moving anyway, it's still obeying the cache space used requirement.  If I remember correctly, that didn't use to be the case.  But I'm not positive.

Edited by my95z34
adding info
Link to comment
14 hours ago, my95z34 said:

 

I'm getting the same log output with that file.  Assuming I don't need to reboot or anything after replacing.  I also ensured the permissions were the same as the original as well.

 

//edit// I lied.  I enabled the standard Unraid mover logging and I got some output.

 


Mar 27 22:25:06 Goliath root: Manually starting mover
Mar 27 22:25:06 Goliath root: Forcing turbo write on
Mar 27 22:25:06 Goliath kernel: mdcmd (95): set md_write_method 1
Mar 27 22:25:06 Goliath kernel:
Mar 27 22:25:06 Goliath root: ionice -c 2 -n 0 nice -n 0 /usr/local/emhttp/plugins/ca.mover.tuning/age_mover start 0 0 0 '' ''
Mar 27 22:25:06 Goliath root: *********************************MOVER START*******************************
Mar 27 22:25:06 Goliath root: mover: started
Mar 27 22:25:06 Goliath root: Share Name Only: ((omitted))
Mar 27 22:25:06 Goliath root: Cache Pool Name:
Mar 27 22:25:06 Goliath root: No shareCachePool entry found in config file, defaulting to cache
Mar 27 22:25:06 Goliath root: cache Threshold Pct:
Mar 27 22:25:06 Goliath root: OVERALL Threshold: 65
Mar 27 22:25:06 Goliath root: Share Path: /mnt/cache/((omitted))
Mar 27 22:25:06 Goliath root: Pool Pct Used: 54 %
Mar 27 22:25:06 Goliath root: DFTPCT LIMIT USED FOR SETTING: 65
Mar 27 22:25:06 Goliath root: Threshold Used: 65
Mar 27 22:25:06 Goliath root: Mover not Needed.

Getting that for every share.  So it seems that instead of moving anyway, it's still obeying the cache space used requirement.  If I remember correctly, that didn't use to be the case.  But I'm not positive.

okay, this helps alot!

This looks normal.  The  "Move Now" under the "Mover Settings" in Scheduler, calls the plug-in.  This is a change from 6.8 version.  Your cache pool is never getting above the 65% limit to initiate a move.  So it doesn't move anything.

 

If you want to run the original mover.  I added a button in the bottom right of the "Mover Tuning w/Age - Days old" area.  Bottom right.  This will just call the original mover script that came with unRAID.  

 

image.thumb.png.2cdddeb11061fe6d886d2ce653ac6bde.png

  • Like 1
Link to comment
27 minutes ago, hugenbdd said:

Your cache pool is never getting above the 65% limit to initiate a move.  So it doesn't move anything.

I just want to confirm that “Force move of all files on a schedule” will still move all files even if the percentage threshold hasn’t been met?

 

One other question, is it still necessary to set a schedule in Mover Settings>Mover Schedule to run the checks in Mover Tuning with Age - Days Old? There have been so many changes recently that my old brain can’t keep up.😁

Link to comment
36 minutes ago, wgstarks said:

I just want to confirm that “Force move of all files on a schedule” will still move all files even if the percentage threshold hasn’t been met?

 

One other question, is it still necessary to set a schedule in Mover Settings>Mover Schedule to run the checks in Mover Tuning with Age - Days Old? There have been so many changes recently that my old brain can’t keep up.😁

I haven't tested this.  It's left over from the original script.  My best guess before looking at the code is that it calls the new mover, so would follow the config settings.  (i.e. cache %)

 

I will review this piece of code and see if needs to be updated.  If you must move all files, I would suggest using the User Scripts plug-in and referencing the "mover.old" file.  (I think this was discussed a few weeks back).

Link to comment
7 hours ago, hugenbdd said:

okay, this helps alot!

This looks normal.  The  "Move Now" under the "Mover Settings" in Scheduler, calls the plug-in.  This is a change from 6.8 version.  Your cache pool is never getting above the 65% limit to initiate a move.  So it doesn't move anything.

 

If you want to run the original mover.  I added a button in the bottom right of the "Mover Tuning w/Age - Days old" area.  Bottom right.  This will just call the original mover script that came with unRAID.  

 

image.thumb.png.2cdddeb11061fe6d886d2ce653ac6bde.png

 

 

Hmm, I've never noticed that button there!  I've been using the button on the main array page in Unraid.  I could have sworn that the previous behaviour was that button calling the original script... unless I'm crazy, lol.

Link to comment
Just now, my95z34 said:

 

 

Hmm, I've never noticed that button there!  I've been using the button on the main array page in Unraid.  I could have sworn that the previous behaviour was that button calling the original script... unless I'm crazy, lol.

LOL, you are not going crazy.  You are correct.

 

Now, 6.9, do to share pools, it works different.  The move now invokes the plug-in configs.  That's why I added the new button (latest release) to the bottom right.  So functionality was there again. (Original Mover)

  • Thanks 1
Link to comment
3 hours ago, hugenbdd said:

LOL, you are not going crazy.  You are correct.

 

Now, 6.9, do to share pools, it works different.  The move now invokes the plug-in configs.  That's why I added the new button (latest release) to the bottom right.  So functionality was there again. (Original Mover)

Well, that makes sense.  I'll keep an eye and see if my mover will properly run once it reaches the capacity requirement and I'll post back.  Thanks!

Link to comment
17 hours ago, hugenbdd said:

I haven't tested this.  It's left over from the original script.  My best guess before looking at the code is that it calls the new mover, so would follow the config settings.  (i.e. cache %)

 

I will review this piece of code and see if needs to be updated.  If you must move all files, I would suggest using the User Scripts plug-in and referencing the "mover.old" file.  (I think this was discussed a few weeks back).

Did a little testing last night. Added a few small files to a cache enabled share just to see if they would be moved per the cron schedule set via the force move option. It appears you are correct. These files were not moved because the percentage threshold was not met.

Link to comment
43 minutes ago, flyize said:

If I set 'Move files off cache based on age?' to yes, and set days to 0, will it simply move whatever the oldest file is, FIFO style?

No.

The age just set's an "mtime" value for the find command.  So it will look for everything greater than 0 days old.

  • Like 1
Link to comment
30 minutes ago, flyize said:

Possible to request that as a feature then? 😁

Problem is I have to know when to stop.  And ordering, checking how much space is left, etc... is a lot more code.  I'm not quite ready to add that feature.

 

I have found with a large enough cache (1TB) that if you set the date at a reasonable amount (15-20 days) for me... it works very similar to FIFO.  

Link to comment
On 3/25/2021 at 3:32 PM, hugenbdd said:

Attached is a new "age_mover" which has the echo/log statements in it to help trouble shoot.  Please replace the age_mover with this file if you have trouble.

 

make a backup of the age_mover file

cd /usr/local/emhttp/plugins/ca.mover.tuning/

cp age_mover age_mover_original

 

copy the new file attached to this post to same location

/usr/local/emhttp/plugins/ca.mover.tuning/

age_mover 8.08 kB · 9 downloads

 

I have the same issue I think and when I try to go to /sur/local/emhttp i cannot find the emhttp file in krusader. Any help?

Link to comment
On 3/28/2021 at 8:17 PM, hugenbdd said:

I haven't tested this.  It's left over from the original script.  My best guess before looking at the code is that it calls the new mover, so would follow the config settings.  (i.e. cache %)

 

I will review this piece of code and see if needs to be updated.  If you must move all files, I would suggest using the User Scripts plug-in and referencing the "mover.old" file.  (I think this was discussed a few weeks back).

Any change of getting is functionality back? As it is now the force move option  does not do much and I really prefer to move the files of my cache in the night instead of during the day when it fills up and the array is in use.

Link to comment

Would it be possible to choose which cache pool to look at for the

Only move at this threshold of used cache space

I currently have a cache pool called "cache" which I use to store my appdata and for my downloads I use a cache pool called "scratch" and want the mover to be invoked when the downloads cache gets close to 75% full.

Link to comment
On 3/29/2021 at 11:40 AM, hugenbdd said:

LOL, you are not going crazy.  You are correct.

 

Now, 6.9, do to share pools, it works different.  The move now invokes the plug-in configs.  That's why I added the new button (latest release) to the bottom right.  So functionality was there again. (Original Mover)

Exactly the answer I needed. I thought something was going wrong my setup because each time I pressed it manually nothing would move. But this makes total sense since my threshold is at 70%.

Edited by Sycotix
Link to comment
14 hours ago, bobokun said:

Would it be possible to choose which cache pool to look at for the


Only move at this threshold of used cache space

I currently have a cache pool called "cache" which I use to store my appdata and for my downloads I use a cache pool called "scratch" and want the mover to be invoked when the downloads cache gets close to 75% full.

Yes, this is already built in.  It looks for a custom config item in each pool.  However...... I'm on vacation for the week and I can't remember the exact details while away.  If you look at the code you can find it, or I will post the details early next week.

Link to comment
4 hours ago, hugenbdd said:

Yes, this is already built in.  It looks for a custom config item in each pool.  However...... I'm on vacation for the week and I can't remember the exact details while away.  If you look at the code you can find it, or I will post the details early next week.

Enjoy your vacation! I'm not sure where to look in the code so I'll wait for your response next week on the details. Thank you!

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.