Page 1 of 1

Read priority when deferred write is on.

Posted: Wed Aug 12, 2020 1:12 pm
by Jey123456
As the title says, my suggestion would be for an option (or even it being default), to give priority to non cached read, over deferred write when deferred write is enabled.

What i mean by this, is say, i have 5 gb of deferred l1 write currently being flushed, on an hdd this can take a while. If i try to read stuff that is not currently in the cache of that same hdd, it ends up being super slow since it share the io with the write operation. The suggestion would be that when a read request is in progress, to pause the deferred writes (unless the cache is full and more write are being requested offcourse).

This would lead to a much more consistent experience performance wise when using deferred write. As it is right now, its great when i write a bunch of files to it, but then im basically stuck with subpar read performance until its done actually writing those.

Re: Read priority when deferred write is on.

Posted: Fri Aug 14, 2020 8:29 am
by Support
Yes, we have noticed this issue and will try to improve the flush algorithm. Thank you for your suggestion!

Re: Read priority when deferred write is on.

Posted: Sat Mar 13, 2021 12:02 pm
by Jey123456
this is still an issue as of 4.1.0

No need for anything complex, just an option to pause the normal write flush (not the urgent as urgent happen when cache is full) when a read request happen.

For my use case at least, its the #1 problem i get with primocache by far. to an extent where, i often end up having to disable the cache before writing large chunk on the drive because of it.

I'm using primocache mostly as a way to continue using my old drive as storage without them being so slow that its unusable, and for the most part, it works great. My old 4tb of 5400rpm hdd combined with a 128gb (64gb write, 64gb read) ssd as l2 cache and a gb (1gb write) of l1 cache (infinite defer with idle-flush writemode) works marvelous well almost always hitting cache and even if it doesnt, it then hit cache on the following read.

The scenario where it become problematic, is if i write a large chunk of data, say 32gb. That get written in the ssd cache with a good speed, no problem there. Then after a while, computer get idle and idle-flush begin, everything fine as of yet. But writing 32gb on those 5400rpm disks can end up taking 6-15mins. During that time, any attempt to read the disk end up slowed down to a crawl, often reaching the point of timeout in applications

Re: Read priority when deferred write is on.

Posted: Mon Mar 15, 2021 2:35 am
by xinwei
im so sorry.It was delayed by other matters of higher priority,we'll deal with it as soon as possible.

Re: Read priority when deferred write is on.

Posted: Mon May 24, 2021 6:12 pm
by tverweij
This would greatly improve performance!