How does 100% Read Cache work...?

FAQ, getting help, user experience about PrimoCache
mell111
Posts: 43
Joined: Fri Oct 05, 2018 11:16 am

How does 100% Read Cache work...?

Post by mell111 » Sat Feb 02, 2019 5:00 am

I set up a cache task with only L2 cache configured for 100% read. Block size 512kb total L2 partition size 800GB, one underlying NTFS hard drive with block size 64kb. I started reading data from the drive. After reading over 30GB of data from the cached hard drive, the cached reads are about 200 kilobytes (yes, with a k) and the L2Storage writes are about 28 megabytes. Windows Task Manager shows practically no activity for the L2 SSD the whole time.

What I expected was that PrimoCache would cache the reads onto the L2 cache (since there's no L1 cache for this task) and then, since the cache block size is much larger than the underlying disk block size (512kb vs. 64kb), most of the reads would then be from the cache.

Since this obviously is not how it works, what am I missing? How is it supposed to work? Thanks.

mell111
Posts: 43
Joined: Fri Oct 05, 2018 11:16 am

Re: How does 100% Read Cache work...?

Post by mell111 » Sat Feb 02, 2019 9:17 am

After reading around 500GB (continued from above) and still no caching, I paused the cache for the volume. All of a sudden reading from the hard drive to the cache ssd started at full throttle (visible through Task Manager) with L2Storage writes increasing quickly. I don't get it. I suppose that once the cache filled up future reads would come from there, but that behavior is not useful to me so I stopped it. I'll await some feedback before experimenting further. Thanks.

User avatar
support
Posts: 2363
Joined: Sun Dec 21, 2008 2:42 am

Re: How does 100% Read Cache work...?

Post by support » Sat Feb 09, 2019 3:37 pm

I'm sorry for the late reply because of Lunar New Year Holiday.
PrimoCache populates L2 cache content when Windows is idle, in order not to affect (slow down) foreground running Windows tasks.
If your Windows is always keep busy and has heavy disk activities, you may tune the "L2 gather interval" setting in L2 advanced options to the "FASTEST".
Primo Ramdisk | PrimoCache
Romex Software Support

mell111
Posts: 43
Joined: Fri Oct 05, 2018 11:16 am

Re: How does 100% Read Cache work...?

Post by mell111 » Sat Feb 09, 2019 4:54 pm

No problem. Happy Lunar New Year!

Will PrimoCache consider Windows to be busy if the only disk activity is reading from the underlying disk for the L2 cache I describe?

Also, with FASTEST gather interval, would it be correct what I said above: "What I expected was that PrimoCache would cache the reads onto the L2 cache (since there's no L1 cache for this task) and then, since the cache block size is much larger than the underlying disk block size (512kb vs. 64kb), most of the reads would then be from the cache."

Thanks.

mell111
Posts: 43
Joined: Fri Oct 05, 2018 11:16 am

Re: How does 100% Read Cache work...?

Post by mell111 » Sat Feb 09, 2019 5:25 pm

To clarify my question: when the app does a read of data that is not cached, say for example 4kb at a time, would PrimoCache retrieve the 512kb and then if the next 4kb read from the app addresses data in the same PrimoCache block that was just retrieved it would not need to go to disk? Also, how would the gather interval affect that? (e.g. if the reads are less than 1 second apart would that still work?)

User avatar
support
Posts: 2363
Joined: Sun Dec 21, 2008 2:42 am

Re: How does 100% Read Cache work...?

Post by support » Mon Feb 11, 2019 9:25 am

mell111 wrote:
Sat Feb 09, 2019 4:54 pm
Will PrimoCache consider Windows to be busy if the only disk activity is reading from the underlying disk for the L2 cache I describe?
I think mostly yes. HDDs are not good at processing multiple I/O requests at the same time, so PrimoCache will defer L2 cache population as possible in order not to affect foreground tasks.
mell111 wrote:
Sat Feb 09, 2019 5:25 pm
when the app does a read of data that is not cached, say for example 4kb at a time, would PrimoCache retrieve the 512kb and then if the next 4kb read from the app addresses data in the same PrimoCache block that was just retrieved it would not need to go to disk? Also, how would the gather interval affect that? (e.g. if the reads are less than 1 second apart would that still work?)
Servicing read requests and L2 population are kind of independent. If Windows/Applications request 4KB read data, PrimoCache will only fetch 4KB data from the disk. However when doing L2 population, PrimoCache will fetch the whole block size like 512KB in your case. If future read requests hit the 512KB, of course PrimoCache will read from the L2 cache instead of underlying disk.
Primo Ramdisk | PrimoCache
Romex Software Support

mell111
Posts: 43
Joined: Fri Oct 05, 2018 11:16 am

Re: How does 100% Read Cache work...?

Post by mell111 » Mon Feb 11, 2019 8:54 pm

Interesting. If read requests and L2 population are mostly independent, how does PrimoCache determine what it should populate the read cache with? If there is no read activity, will it still populate?

Also, does the fetching only the data Windows/App requests (as opposed to the whole block) also apply to writing with deferred write enabled?

Thanks.

User avatar
support
Posts: 2363
Joined: Sun Dec 21, 2008 2:42 am

Re: How does 100% Read Cache work...?

Post by support » Tue Feb 12, 2019 4:16 am

mmm, sorry, but I mean the processing of read requests and L2 population are mostly independent. That is, servicing read requests doesn't need to wait or consider the completion of L2 population, and vice versa.
mell111 wrote:
Mon Feb 11, 2019 8:54 pm
Also, does the fetching only the data Windows/App requests (as opposed to the whole block) also apply to writing with deferred write enabled?
Yes.
Primo Ramdisk | PrimoCache
Romex Software Support

mell111
Posts: 43
Joined: Fri Oct 05, 2018 11:16 am

Re: How does 100% Read Cache work...?

Post by mell111 » Tue Feb 12, 2019 6:10 am

It's the "vice versa" I was wondering about: without read activity, how does PrimoCache determine what to populate with? For example, if PrimoCache gets only one 4k read request, after fetching that request will PrimoCache populate the whole 512kb block containing that 4k at the gather interval? More? Less?

User avatar
support
Posts: 2363
Joined: Sun Dec 21, 2008 2:42 am

Re: How does 100% Read Cache work...?

Post by support » Tue Feb 12, 2019 6:32 am

I mean when doing the action of L2 population, it also doesn't have to wait for the completion of reading requests. Of course, to determine what data can be populated into L2, there must be read activities before.
As I mentioned before, PrimoCache do L2 population in a block size, so the whole 512KB block containing that 4K data will be stored to L2.
Primo Ramdisk | PrimoCache
Romex Software Support

Post Reply