Jump to content

SSD Maximizer: cache management script for DrivePool's SSD Optimizer - Windows - Powershell


Recommended Posts

Posted

Greetings!

Just want to start by saying, as a long time DrivePool user, I love it and I'm grateful that it exists. I would never go back to Unraid or consider anything but a JBOD setup after experiencing the simplicity it offers. 

Like most of us who still use mostly HDDs, I make use of the SSD Optimizer plugin to accelerate writes. I also use the File Placement Rules to keep certain files, basically everything but video files, on SSD indefinitely. The problem is DrivePool wants to move all the video files off SSD at every balancing pass, but is that really necessary?

I think most of us here have figured out by now that the files most recently added to the server are the files most likely to be accessed. That means if you could extend the period for which that stuff is on SSD, activity on your HDDs would be greatly reduced, and you'd be making full use of all that fast silicon you have sitting around. 

Emptying the SSD completely made sense back when they were small and expensive, but now they're BIG and expensive, so we might as well use them to their max potential. (I am aware of Primocache, and I'm sure it can do all this and more, but after using this script for a few months, I can't really see why I would need Primo.)

So with the help of A.I. (I don't really like LLMs, but I really wanted this, so... yeah.) I put this together one small step at a time, testing at every step, and manually editing many parts. If there's any rank amateur bs going on in this, I take full responsibility. I am a rank amateur. I've written batch files, but that's it. I tried learning C++. Twice. I hate coding and anything that resembles coding in any way. Hence the A.I.

In a nutshell, it checks the size of your SSD poolpart folder and, if it's larger than you specify, moves just enough old files out of the cache and onto your archival drives so that it's no longer too full. (Technically, it only copies the old files to the archives, then DrivePool comes along and removes them from cache - it's all explained in the instructions.) The main thing to know going in is that you pretty much need to have your HDDs in a pool of their own inside your main pool. An SSD pool is also recommended but not necessary.

What I can say is that, as is, it works for me and I believe it will work for most people. But of course if anyone sees any obvious improvements to be made, I'm all for improvements. 

Please see the instructions located in the script, below the config section. They are, for better or worse, 100% human. I also included a A.I. generated summary for reference. I'm dropping it here because Emby is the best media server, and so Emby admins should have it first. I mean why not.

Load it up into your favorite editor and have a go. Happy holidays!

 

SSD_Maximizer.zip

  • Like 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...