Read priority when deferred write is on.

Suggestions around PrimoCache
Post Reply
Jey123456
Level 1
Level 1
Posts: 3
Joined: Wed Aug 12, 2020 1:08 pm

Read priority when deferred write is on.

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

Re: Read priority when deferred write is on.

Post by Support »

Yes, we have noticed this issue and will try to improve the flush algorithm. Thank you for your suggestion!
Primo Ramdisk | PrimoCache
Romex Software Support
Jey123456
Level 1
Level 1
Posts: 3
Joined: Wed Aug 12, 2020 1:08 pm

Re: Read priority when deferred write is on.

Post 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
xinwei
Support Team
Support Team
Posts: 28
Joined: Mon Jan 25, 2021 8:35 am

Re: Read priority when deferred write is on.

Post by xinwei »

im so sorry.It was delayed by other matters of higher priority,we'll deal with it as soon as possible.
tverweij
Level 2
Level 2
Posts: 5
Joined: Thu May 10, 2018 9:27 am

Re: Read priority when deferred write is on.

Post by tverweij »

This would greatly improve performance!
Post Reply