Reading Deferred Blocks value real time. Topic is solved

Suggestions around PrimoCache
Post Reply
krishilife
Level 1
Level 1
Posts: 2
Joined: Sat Mar 19, 2022 1:39 am

Reading Deferred Blocks value real time.

Post by krishilife »

Hi,

I'd like to suggest, and see 1 feature that would be useful (at least to me).
How hard would be to implement functionality to PrimoCache that would allow me to read Deferred Blocks value real time?

There is a good reason why I need it. When I cache HDD writes on fast SSD, lets say 200GB, I set deferred write time to 3-5 minutes. So, this way I wait until the whole data that is going to be written on HDD, is cached on SSD. Then PrimoCache starts moving all data from SSD to HDD. The problem I noticed is if I start writing another data to the same HDD, suddenly writing process slows down significantly. I see on Task Manager that HDD struggles handling (probably) 2 streams at the same time. HDD response time increases to high value, like a few seconds. Data transfer fluctuates from a few Mb/s to a few hundred MB/s, but mostly is low.

If I don't send 2nd stream of data (copy of large files) until PrimoCache flushes the 1st. stream, HDD works at full speed. To make sure that all data has been flushed, I open PrimoCache app, and watch Deferred Blocks value. It decreases its value (in %) while the data is being written. Once PrimoCache flushed all cached data, I can start copying another large files. That way my HDD works fast. If I start copying another batch of files before cache is flushed, HDD gets clogged, and its extremely slow.

I have installed RainMeter, and I can add another widget to it that would show me Deferred Blocks value on my desktop. I could easily read that value
from Windows Registry, lets say every 2 seconds. However, PrimoCache must store this value real time every 2 seconds to allow me reading it from there.

Would it be hard to implement such functionality in PrimoCache?
Thanx.
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

Re: Reading Deferred Blocks value real time.

Post by Support »

You can use PrimoCache CLI get statistics data, including Deferred Blocks. Regarding CLI, please visit https://www.romexsoftware.com/en-us/pri ... rface.html

The command to show statistics is "rxpcc perf". Type "rxpcc ? perf" to see the help on this command. You should exit the PrimoCache GUI program when you run the CLI command.

Blow is the command to show values of deferred blocks in a command prompt window.

Code: Select all

rxpcc perf -c {DCD935AF-3311-4A4A-8831-3FE6DB3F2EB4} | find /i "deferred blocks"
Replace {DCD935AF-3311-4A4A-8831-3FE6DB3F2EB4} by your cache task GUID.

If you just want to see value, use the FOR command to filter the output.

Code: Select all

FOR /f "tokens=1,2 delims=:" %i IN ('rxpcc perf -c {DCD935AF-3311-4A4A-8831-3FE6DB3F2EB4} ^| find /i "deferred blocks"') DO ECHO %j
You can create a batch script to show the value and called it regularly.

Code: Select all

@ECHO OFF
FOR /f "tokens=1,2 delims=:" %%i IN ('rxpcc perf -c {DCD935AF-3311-4A4A-8831-3FE6DB3F2EB4} ^| find /i "deferred blocks"') DO ECHO %%j
krishilife
Level 1
Level 1
Posts: 2
Joined: Sat Mar 19, 2022 1:39 am

Re: Reading Deferred Blocks value real time.

Post by krishilife »

Thanx, it's working. Excellent service.
I didn't know I can read that detailed data using CLI. Including a few examples in documentation, how to use CLI in full potential, would be very helpful.
Post Reply