Non-deferred write cache

FAQ, getting help, user experience about PrimoCache
Post Reply
npelov
Level 5
Level 5
Posts: 55
Joined: Thu Jun 30, 2016 3:01 pm

Non-deferred write cache

Post by npelov »

Does L1 write cache actually do anything if it's not deferred? Does it really speed up anything if it has to write the cache to disk right away. Isn't that the same as if there is no write cache?
User avatar
Support
Support Team
Support Team
Posts: 3627
Joined: Sun Dec 21, 2008 2:42 am

Re: Non-deferred write cache

Post by Support »

Non-deferred write cache belongs to the concept of cache strategy. It depends on the users' real scenario to decide if write cache is needed or not.
When defer-write is not enabled, all write-data will be written to underlying disks immediately whether write cache is set or not. If write cache is specified, write-data will also be saved to the cache. So if later Windows/Applications request to read these data, they can be immediately gotten from the cache. If no write cache is set, they have to be read from the disk first and then saved to the cache.
npelov
Level 5
Level 5
Posts: 55
Joined: Thu Jun 30, 2016 3:01 pm

Re: Non-deferred write cache

Post by npelov »

So if the user expects most of the written data to not be read (like log files), then he shouldn't enable write cache. If he expects that soon the written data will be read again (like temporary tables of database) then write cache could be enabled.
User avatar
Support
Support Team
Support Team
Posts: 3627
Joined: Sun Dec 21, 2008 2:42 am

Re: Non-deferred write cache

Post by Support »

yes.
Krelat
Level 1
Level 1
Posts: 2
Joined: Wed Jan 17, 2018 2:27 pm

Re: Non-deferred write cache

Post by Krelat »

Does PrimoCache simulate writes if defer-write is turned on? For example I have a CPU-intensive program which writes exactly the same placeholder files to disk every time it boots. If I start up the program many times within the defer-write delay, will PrimoCache use needless CPU time and fill the RAM with multiple write requests, or is it able to compare write requests and ignore multiple attempts to write the same file with the same data?

And if multiple programs are writing to the same file, does it simulate these modifications to a virtual file in RAM before writing it? For example if multiple programs are being used to edit a file quickly within the defer-write timeout, would it be possible for PrimoCache to combine the requests internally, bypassing the individual requests to modify the disk and turning them into a single write?

Sorry for the strange questions. I've been very curious just how much more efficient defer-write is than the normal disk operations.
User avatar
Support
Support Team
Support Team
Posts: 3627
Joined: Sun Dec 21, 2008 2:42 am

Re: Non-deferred write cache

Post by Support »

@Krelat, PrimoCache doesn't compare data because doing such will affect performance a lot. It just completes multiple write requests by writing data to ram cache.

And regarding your next question, please see
http://www.romexsoftware.com/en-us/prim ... -wear.html

In the above page, we take SSDs as an example, but the result applies to all disks when defer-write is enabled.
Post Reply