L2 Cache when Defrag HDD

FAQ, getting help, user experience about PrimoCache
Post Reply
TomB
Level 5
Level 5
Posts: 43
Joined: Wed Jul 29, 2020 11:15 pm

L2 Cache when Defrag HDD

Post by TomB »

Hello, Primo Community -

I have a concern as to what will happen with my L2 cache whenever the underlying HDD is Defragmented and / or Consolidated.

Will the L2 cache become out of synchronization with the HDD?

Will the HDD data or the L2 data become corrupted?

Will the L2 cache begin to slow down i/o access to my HDD instead of speeding it up?

Any insight will be appreciated.

Thank you in advance!

Tom
User avatar
Support
Support Team
Support Team
Posts: 3430
Joined: Sun Dec 21, 2008 2:42 am

Re: L2 Cache when Defrag HDD

Post by Support »

TomB wrote: Sat Aug 15, 2020 12:49 am Will the L2 cache become out of synchronization with the HDD?
Will the HDD data or the L2 data become corrupted?
No. Corresponding L2 data will be removed from the cache if a sector in the HDD is moved to another position.
TomB
Level 5
Level 5
Posts: 43
Joined: Wed Jul 29, 2020 11:15 pm

Re: L2 Cache when Defrag HDD

Post by TomB »

Thank you.

Then should I pause the cache when I defrag and consolidate the disk?

Also, should I pause the cache when I do a full virus scan or a backup, so that I do not flush my L2 cache?
User avatar
Support
Support Team
Support Team
Posts: 3430
Joined: Sun Dec 21, 2008 2:42 am

Re: L2 Cache when Defrag HDD

Post by Support »

TomB wrote: Sun Aug 16, 2020 1:36 am Then should I pause the cache when I defrag and consolidate the disk?
Usually no need.
TomB wrote: Sun Aug 16, 2020 1:36 am should I pause the cache when I do a full virus scan or a backup, so that I do not flush my L2 cache?
If you intend to not flush the L2 cache, then yes.
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: L2 Cache when Defrag HDD

Post by Jaga »

TomB wrote: Sun Aug 16, 2020 1:36 am Also, should I pause the cache when I do a full virus scan or a backup, so that I do not flush my L2 cache?
I use the following batch file to pause/unpause the cache and kickoff the backup locally:

Code: Select all

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
timeout 5
rxpcc perf -a -r -s
TomB
Level 5
Level 5
Posts: 43
Joined: Wed Jul 29, 2020 11:15 pm

Re: L2 Cache when Defrag HDD

Post by TomB »

Very nice, Jaga.

I had not yet looked into the CLI until just now, prompted by your code snippet above.

rxpcc looks quite powerful and flexible, too. The internal help documentation inside rxpcc states that the cache and volume indexes are created dynamically at boot time, though, so I'd guess they're not appropriate for use in batch files. Has that been your experience or observation?

Thank you for your interest and for the code.

Tom
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: L2 Cache when Defrag HDD

Post by Jaga »

Pausing/unpausing the cache with rxpcc has worked flawlessly for years now. I don't restart with it paused, just for the duration of the backup.
TomB
Level 5
Level 5
Posts: 43
Joined: Wed Jul 29, 2020 11:15 pm

Re: L2 Cache when Defrag HDD

Post by TomB »

Thanks, Jaga -

Yes, I wasn't meaning to imply that rxpcc was unfit for use in batch files. I was trying to say that it looks to me as if the documentation is saying that the dynamically generated cache and volume indexes shouldn't be used in batch files, as they are generated anew at boot time and may therefore change at that time. So, since there is no guarantee that a particular index number will refer to the same object after a reboot that it referred to before the reboot, then using the index numbers to refer to specific objects in a batch job that will be invoked after a reboot may result in unexpected results. And therefore, it might be better to use the GUIDs in batch files which will be used across multiple reboots, and just use the index numbers for command line activity over the course of a single interactive session.

And I wondered if that had been your experience or observation.

Thanks again,

Tom
User avatar
Support
Support Team
Support Team
Posts: 3430
Joined: Sun Dec 21, 2008 2:42 am

Re: L2 Cache when Defrag HDD

Post by Support »

@TomB You can use the task Identifier to specify a cache task. It is fixed across the computer reboots. For volumes, volume indexes are decided by Windows, so they may change across reboots. However, you can use their driver letters instead in PrimoCache CLI commands.
Besides, in most PrimoCache commands, you may just operate cache tasks which will apply to all volumes belong to them.
TomB
Level 5
Level 5
Posts: 43
Joined: Wed Jul 29, 2020 11:15 pm

Re: L2 Cache when Defrag HDD

Post by TomB »

Thank you, Support.

I believe that either of the options suggested above will work for me. But I will probably just use the Drive Letter.

Thanks again!

Tom
Post Reply