New Defer-Write Setting

Suggestions around PrimoCache
TomB
Level 5
Level 5
Posts: 44
Joined: Wed Jul 29, 2020 11:15 pm

New Defer-Write Setting

Post 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
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

Re: New Defer-Write Setting

Post by Support »

Thank you very much for your suggestion!
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

Re: New Defer-Write Setting

Post by Support »

PS. You may set the defer-write latency to INFINITE to remove the affect of Native mode.
TomB
Level 5
Level 5
Posts: 44
Joined: Wed Jul 29, 2020 11:15 pm

Re: New Defer-Write Setting

Post 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
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

Re: New Defer-Write Setting

Post by Support »

You are right. Buffer/Intelligent mode is based on Windows Idle. We will give more options. Thanks.
TomB
Level 5
Level 5
Posts: 44
Joined: Wed Jul 29, 2020 11:15 pm

Re: New Defer-Write Setting

Post by TomB »

Thank you and your team for our consideration.
azzurro
Level 2
Level 2
Posts: 5
Joined: Sun May 23, 2021 11:26 pm

Re: New Defer-Write Setting

Post 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!
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

Re: New Defer-Write Setting

Post 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.
TomB
Level 5
Level 5
Posts: 44
Joined: Wed Jul 29, 2020 11:15 pm

Re: New Defer-Write Setting

Post 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
Last edited by TomB on Tue May 25, 2021 11:49 am, edited 1 time in total.
azzurro
Level 2
Level 2
Posts: 5
Joined: Sun May 23, 2021 11:26 pm

Re: New Defer-Write Setting

Post 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! :-)
Post Reply