Page 1 of 2

New Defer-Write Setting

Posted: Sat May 01, 2021 7:22 pm
by TomB
I would like to request a new behavior for the Write Mode of 'Buffer' and 'Intelligent', so that they could be switchable to work whether or not the computer is idle. The switch would allow Buffer Mode or Intelligent Mode to either work like they do now, or work according to the requested new behavior.

The new behavior would not be Native Mode plus (Buffer Mode or Intelligent Mode), as it is now. Instead, the new behavior would be (Buffer Mode or Intelligent Mode) minus Native Mode, but still performing 'Buffer' flushing or 'Intelligent' flushing whether the computer is busy or idle. This behavior would be optional, so that a switch would enable either the new behavior or the current behavior as it is now.

Therefore, the new behavior of Buffer Mode / Intelligent Mode would work like this: If the switch is set to the new behavior, then these modes would not start flushing all deferred data to disk each time the specified Latency Time Interval expires. Instead, each time the Latency Interval expires, these modes would continue to do exactly what they do now, except that they would also do it even if the computer is busy. So the new behavior would be somewhat like Native Mode, since Native Mode does not consider whether the computer is busy or idle. But the behavior would also be somewhat like Buffer or Intelligent Mode, since these modes flush only a portion of deferred data to disk and they never attempt to flush all deferred data to disk. This new behavior also would never attempt to flush all deferred data to disk and also would flush only a portion of deferred data to disk in an attempt to keep some percentage of the cache available. The difference is that they would not be paired with Native Mode flushing all deferred data to disk on each Latency Interval. Instead, at each Latency Interval they would simply flush the specified percentage of deferred data to disk if the deferred data threshold amount of cache size was reached, no matter whether the computer was busy or idle.

I think this behavior would make Buffer Mode and Intelligent Mode much more useful to customers where the computer has different workloads at different times, such as sometimes it is quite often idle but other times it is rarely or never idle for 6 or 8 or 10 or 12 hours at a time. This is valuable because it would cause Buffer Mode and Intelligent Mode to automatically scale with the workload. In other words, Native Mode would not perform unnecessary writes when workload is light, but Buffer and Intelligent Modes would continue to work as designed even when workload is heavy.

Thank you for considering my request!

Tom

Re: New Defer-Write Setting

Posted: Thu May 06, 2021 4:22 am
by Support
Thank you very much for your suggestion!

Re: New Defer-Write Setting

Posted: Thu May 06, 2021 8:10 am
by Support
PS. You may set the defer-write latency to INFINITE to remove the affect of Native mode.

Re: New Defer-Write Setting

Posted: Thu May 06, 2021 2:54 pm
by TomB
Thank you!

Yes, I can do that. And in fact I have tried it and it works perfect, but only if the computer has some idle time sometimes.

But in the case when the computer is always busy and never idle for long time, then Buffer Mode and Intelligent Mode never flushes the percentage of deferred data to disk, even when the 'cache used' threshold has occurred. Because never idle.

So I wanted to keep the Deferred Write Latency to a smaller value, and each time Latency expires then Buffer Mode would check the percent full threshold and perform partial flush if necessary even if computer is busy. Instead of just flushing all deferred to disk every Latency time.

Thanks again,

Tom

Re: New Defer-Write Setting

Posted: Fri May 07, 2021 2:50 am
by Support
You are right. Buffer/Intelligent mode is based on Windows Idle. We will give more options. Thanks.

Re: New Defer-Write Setting

Posted: Fri May 07, 2021 3:01 am
by TomB
Thank you and your team for our consideration.

Re: New Defer-Write Setting

Posted: Mon May 24, 2021 12:14 am
by azzurro
what is "windows idle"? IMHO it would make sense to flush the buffer to the disk if the target disk is currently idle. idling disks are worthless, we want to keep them busy but not too busy where they start to struggle because of random i/o.
if we flush the buffer always when the disk is idle, we have more free buffer for caching new I/Os!

Re: New Defer-Write Setting

Posted: Mon May 24, 2021 2:58 am
by Support
azzurro wrote: Mon May 24, 2021 12:14 am what is "windows idle"?
PrimoCache determines the idle state by checking CPU utilization and disk activities.

Re: New Defer-Write Setting

Posted: Mon May 24, 2021 3:14 am
by TomB
I think the best way of flushing the buffer depends on the machine configuration, the workload, and the user's goals for the software.

Because there are so many different combinations of these factors, it is important for the flushing algorithm to be as flexible as possible. I think this is why Romex already offers several flushing methods.

This is one reason I requested that the new behavior be switchable, because your perspective seems like a very reasonable way to look at it. For me though, my situation requires trying to reduce writes to a smaller SSD when the machine is not too busy (frequent idle time), but also not to get too far behind when it is busy (no idle time).

So for me, the Buffer Mode and Intelligent Mode work really well when the machines are not too busy, but not so well when continuously busy for a long time.

Tom

Re: New Defer-Write Setting

Posted: Mon May 24, 2021 12:48 pm
by azzurro
Support wrote: Mon May 24, 2021 2:58 am
azzurro wrote: Mon May 24, 2021 12:14 am what is "windows idle"?
PrimoCache determines the idle state by checking CPU utilization and disk activities.
it would be very cool to be able to configure those parameters to fine tune what PrimoCache considers being idle! :-)