Primocache Prefetching from HDD and not SSD? Topic is solved

FAQ, getting help, user experience about PrimoCache
lordsnipe
Level 2
Level 2
Posts: 5
Joined: Fri Jan 15, 2021 6:41 am

Primocache Prefetching from HDD and not SSD?

Post by lordsnipe »

Hello,

I've got a L1 and L2 cache setup, and it's set to prefetch on Windows startup. When I check Primocache, and Windows task manager just after startup, the prefetch line is running and slowly going up. Windows Task Manager shows 100% read on my HDD and not on my SSD?

The read speed at 100% according to task manager is about 120MB/sec. Is Primocache prefetching from L2 or the HDD?

I'm running 4.0.1.

Thanks.
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: Primocache Prefetching from HDD and not SSD?

Post by Jaga »

It's populating the L1 at boot, not the L2.
lordsnipe
Level 2
Level 2
Posts: 5
Joined: Fri Jan 15, 2021 6:41 am

Re: Primocache Prefetching from HDD and not SSD?

Post by lordsnipe »

Yes, but shouldn't it populate L1 from L2 which is faster than the HDD? Windows task manager shows the HDD at 100% whilst prefetching so it looks like it's prefetching from the HDD. Otherwise I'd expect the SSD to show 100% instead on windows task manager.

The HDD when prefetching runs between 80 and 130MB/sec but my NVME SSD can theoretically do 2600MB/sec.

Surely if data is used enough to be considered L1 that it would also exist in L2 and can be fetched from there much faster than the HDD.....
lordsnipe
Level 2
Level 2
Posts: 5
Joined: Fri Jan 15, 2021 6:41 am

Re: Primocache Prefetching from HDD and not SSD?

Post by lordsnipe »

https://www.romexsoftware.com/en-us/pri ... cache.html

"Thus, PrimoCache can quickly provide needed data from level-2 cache and avoid fetching often-accessed data again from slow disks each time computer boots up."

Although the definitions page (https://www.romexsoftware.com/en-us/pri ... ation.html) states prefetch uses the underlying disk.

"Prefetch Last Cache: PrimoCache will load the last cache content from the underlying disk to the level-1 cache at next computer start up, in order to speed up the first data access."

I don't understand why it can't be prefetched from L2 though.
InquiringMind
Level SS
Level SS
Posts: 477
Joined: Wed Oct 06, 2010 11:10 pm

Re: Primocache Prefetching from HDD and not SSD?

Post by InquiringMind »

lordsnipe wrote: Fri Jan 15, 2021 1:04 pmI don't understand why it can't be prefetched from L2 though.
It could, but that relies on the L2 cache being current and correct (and there are a number of cases why this may not apply on system startup). Loading pre-fetch from the original data is the safest option and provides an extra opportunity for PrimoCache to check L2 (whether it actually does so is a question for Support).
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: Primocache Prefetching from HDD and not SSD?

Post by Jaga »

You're assuming that the L2 has a 100% copy of what was in the L1. To my knowledge they are allowed to keep different blocks in each, which would mean a L1 prefetch doesn't necessarily have to come from the L2.
lordsnipe
Level 2
Level 2
Posts: 5
Joined: Fri Jan 15, 2021 6:41 am

Re: Primocache Prefetching from HDD and not SSD?

Post by lordsnipe »

Jaga wrote: Fri Jan 15, 2021 8:10 pm You're assuming that the L2 has a 100% copy of what was in the L1. To my knowledge they are allowed to keep different blocks in each, which would mean a L1 prefetch doesn't necessarily have to come from the L2.
Yes, my assumption is that the L1 is the mostly accessed blocks of L2, which is the mostly accessed blocks of the HDD. If data is important enough to be in L1 then it should also be in L2. Unless L2 was somehow smaller than L1 but not in my case (28GB L1 and 350GB L2).

It's taking just under 4.5 minutes to prefetch presumably from HDD, whereas 500MB/sec from SSD would be done in a minute.
InquiringMind wrote: Fri Jan 15, 2021 3:22 pm
lordsnipe wrote: Fri Jan 15, 2021 1:04 pmI don't understand why it can't be prefetched from L2 though.
It could, but that relies on the L2 cache being current and correct (and there are a number of cases why this may not apply on system startup). Loading pre-fetch from the original data is the safest option and provides an extra opportunity for PrimoCache to check L2 (whether it actually does so is a question for Support).
I don't think that's the reason why it fetches from the HDD. Primocache uses registry entries to determine if the L2 contents are out of date and also says offline modification of files is a no no.

https://www.romexsoftware.com/en-us/pri ... cache.html under "potential problem and notice"
janusz521
Level 5
Level 5
Posts: 51
Joined: Wed Aug 26, 2020 6:11 pm

Re: Primocache Prefetching from HDD and not SSD?

Post by janusz521 »

Another possible explanation that comes to mind is that the data formats used for L1 and L2 cache may be substantially different and sharing the same cache space may be rather complex. Also saving L1 would also affect the management of the L2 cache size as an L1 cache may be bigger than the target L2 cache.

Personally, I think that prefetch should not be set by default. It may be useful when someone is working with a specific set of applications all the time and wants them to run at full speed right after the boot. However quite often people work with different apps/games on every session so prefetch loads quite a lot of unneeded data that will be soon discarded. It may take some time too. In the case of an HDD drive, I suppose that prefetch may load some data from an L1 dump on HDD even if that data is also cached on a faster L2 cache.
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

Re: Primocache Prefetching from HDD and not SSD?

Post by Support »

Yes, currently PrimoCache prefetch data from underlying disks in order not to interfere L2. But we are considering to allow prefetch from L2 for better performance. Thanks.
lordsnipe
Level 2
Level 2
Posts: 5
Joined: Fri Jan 15, 2021 6:41 am

Re: Primocache Prefetching from HDD and not SSD?

Post by lordsnipe »

Thank you for the confirmation. I'd certainly be setting prefetch from L2 if that were an option.
Post Reply