Non-deferred write cache
Non-deferred write cache
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?
Re: Non-deferred write cache
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.
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.
Re: Non-deferred write cache
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.
Re: Non-deferred write cache
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.
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.
Re: Non-deferred write cache
@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.
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.