[2017-12-21] PrimoCache 3.0.2 released!

First hand news related to PrimoCache
Asgaroth
Level 3
Level 3
Posts: 11
Joined: Thu Jun 15, 2017 3:18 pm

Re: [2017-12-21] PrimoCache 3.0.2 released!

Post by Asgaroth »

Jaga wrote: Thu Dec 06, 2018 8:14 pm I don't really do set-it-and-forget it defragmentation, since it can mess with Primocache's content and hit rates when clusters are constantly being moved around and the cache is running. Once a month or two I'll take my Drive pool offline and do individual defragmentation. Pausing Primocache, running defrag, then resuming it seems to be the best course of action for my needs. I use a batch file for that purpose with command line options for Primocache.
Do you only pause the cache while defragging or do you pause *and* reset primocache cache? Also, with Auslogics Disk Defrag do you kick it off using the cli or are you using the pro version's scheduling option?

I'm currently evaluating the Auslogics Disk Defrag Pro software, I might try to do a similar schedule as yourself whereby you disable the cache, defrag and then re-enable the cache. I dont have the paid for version of Auslogic Disk Defrag Pro at the moment so I cannot see the options available for sceduling defrags, so I dont know if it supports pre/post scripts to be run when the defrag job kicks off. Do you schedule it using the defrag software or do you use the windows scheduler?
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: [2017-12-21] PrimoCache 3.0.2 released!

Post by Jaga »

Typically I'll find a good day for the array to be offline for several hours, then manually kick off an analyze and then a full (free space) defrag on the volumes I think need it the most. Due to it's ability to do multiple drives at once, it only takes as long as a single drive would take.

I don't ever clear the cache unless I think there's corruption of data inside it. Pausing it during backups/defrags forces it to hold onto as much of the relevant info from daily use as possible.

You can tell Auslogics to stop certain programs/processes if they are running, so that files to be moved aren't locked. I haven't ever looked into whether or not you can have it kick off scripts itself, but you can absolutely kick *it* off from a batch file. That part is very easy and configurable, so that you only need 1 script to control it all (even for automated defragging). The free Auslogics version's command line help is here.

I use a script when I run backups on the server - it simply pauses Primocache's cache task(s), runs the backup, then restarts the cache tasks.
rxpcc pause -a -s
timeout 10
cd "C:\Program Files\Macrium\Reflect"
Reflect.exe -e -w "C:\Users\username\Documents\Reflect\My Backup.xml" -full
timeout 10
rxpcc resume -a -s
All of the Primocache CLI commands can be found here.

You could substitute Auslogics CLI commands for the backup command in my script, and you'd have a fully automated defrag that plays well with Primocache and preserves as much of the cache contents as possible. Of course you can always use Auslogics' built-in scheduler if you wanted to, and just leave Primocache running. I find that doing that clears more of the cache than I want to, because I use the write cache as well as the read - writes done during cluster moves can flush other data in the cache, which is what I was trying to avoid.

Lots of different ways to do it depending on your need. Drives with heavy activity would of course benefit from more regular defragmentation, but others like mine (which are mostly for long-term storage of media) only need it once every 3-6 months. I haven't ever tested the Auto-defrag (runs 24-7 in the background) along with Primocache - I'm unsure what it would do with cache contents, though I suspect your hitrate would decline a little due to the cache holding things from the defrag and less from what the computer actually uses.
Axel Mertes
Level 9
Level 9
Posts: 180
Joined: Thu Feb 03, 2011 3:22 pm

Re: [2017-12-21] PrimoCache 3.0.2 released!

Post by Axel Mertes »

I do space defrag with o&o defrag on my 64 TB volumes every night. It typically runs only minutes, as the data to be moved is usually in the cache. I do not turn off PrimoCache. I have even write caching enabled on some vokumes. Runs smoothly since years on Windows 2012 R2 server.
romanshein
Level 1
Level 1
Posts: 3
Joined: Thu Nov 28, 2013 10:38 am

Re: [2017-12-21] PrimoCache 3.0.2 released!

Post by romanshein »

Write-back cache is potentially a killer feature, yet in my experience it can cause data loss, especially in dual-boot environment.
Imaging the situation: your system crashes without flushing the WBC properly for data volume and becomes non-bootable. You restore backup or dual-boot to fix the main OS. The second OS considers file system "broken" and "fixes" it, causing data loss. The data loss can be silent, so it will not become evident until it is too late as backups are long gone.
IMHO, Primo has to overwrite fs uber-block, making it unrecognizable to the OS without PrimoCache installed. This way it will preserve fs and cache from unintended modification by third-parties. That is the proper way to setup WBC. Unfortunately neither Romex, nor VeloSSD and even Intel CAS (!) operate in the same flowed manner :-(.
Axel Mertes
Level 9
Level 9
Posts: 180
Joined: Thu Feb 03, 2011 3:22 pm

Re: [2017-12-21] PrimoCache 3.0.2 released!

Post by Axel Mertes »

I think all it really needs is a journaled write cache and an indication, which os host was running when writing that journal. This way you could finish missing journaled write operations during bootup. Clearly users can always manually create a situation that could sacrifice the write cache. There is no way to prevent that, except you have installed PrimoCache on any OS involved, which does not work if we are talking Linux or OSX. But with a journaled write cache all it needs is to boot with the OS that was last used after a crash or similar. Important: you should never employ write caching on you OS as a rule of thumb to minimize risk.
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: [2017-12-21] PrimoCache 3.0.2 released!

Post by Jaga »

Axel Mertes wrote: Fri Dec 14, 2018 7:24 amImportant: you should never employ write caching on you OS as a rule of thumb to minimize risk.
Which I disagree with, if you take steps to protect the OS drive and the data on it. Use a good UPS. Don't overclock to unsafe/untested limits. Use ECC RAM if possible. Keep a weekly Full backup and at least bi-weekly differentials.

I've run with write caching on my OS drive now (both workstation and server) for ~3-4 years, haven't had an issue (or needed to do any repairs). And if I do - I know a fix isn't far off with a boot disc and a network restore.
Post Reply