Caching strategy

FAQ, getting help, user experience about PrimoCache
l0rdraiden
Level 2
Level 2
Posts: 8
Joined: Mon Jun 26, 2017 8:44 pm

Caching strategy

Post by l0rdraiden »

I have

1 SSD of 120 GB
1 SSD of 250 GB (OS)
1 HD of 2 TB
16 GB RAM (Almost always 5-6 GB unused even gaming)

What is the best config?

If I use the 120 GB SSD as a L2 cache of the Hard disk and then 6 GB of ram as L1 cache of the 250GB SSD is fine?
Does it make sense to add the HD to the L1 cache or will I be duplicating cache space?

Is there any conflict with the write caching policy of windows if I use write caching as well in PrimoCache?
https://www.tenforums.com/tutorials/219 ... -10-a.html

Thanks in advance
InquiringMind
Level SS
Level SS
Posts: 471
Joined: Wed Oct 06, 2010 11:10 pm

Re: Caching strategy

Post by InquiringMind »

Welcome to the forums l0rdraiden,

If you have games or applications installed on your HDD, then it would certainly make good sense to cache that - but the ideal would be to have them installed on SSD and keep the HDD for non-speed critical data (downloads, media files and backups of your SSDs).

So the ideal would be to use your 2 SSDs for the OS and applications (120GB should be enough for Windows as long as you relocate the Users folder to another disk) and just use PrimoCache L1 for the 2 SSDs.

However with applications installed on the HDD, the best option would be as you suggest - PrimoCache L1 for the 250GB SSD and HDD and use the 120GB SSD as a L2 cache for the HDD. Allocating 6GB (the memory you have left unused) should be fine - check PrimoCache's stats at the end of the day to see if any cache is still free - if so, you may be able to lower it slightly.

As for Windows file caching, it makes sense to disable as much of it as possible, but it is unfortunately not possible to disable it completely.
l0rdraiden
Level 2
Level 2
Posts: 8
Joined: Mon Jun 26, 2017 8:44 pm

Re: Caching strategy

Post by l0rdraiden »

InquiringMind wrote:Welcome to the forums l0rdraiden,

If you have games or applications installed on your HDD, then it would certainly make good sense to cache that - but the ideal would be to have them installed on SSD and keep the HDD for non-speed critical data (downloads, media files and backups of your SSDs).

So the ideal would be to use your 2 SSDs for the OS and applications (120GB should be enough for Windows as long as you relocate the Users folder to another disk) and just use PrimoCache L1 for the 2 SSDs.

However with applications installed on the HDD, the best option would be as you suggest - PrimoCache L1 for the 250GB SSD and HDD and use the 120GB SSD as a L2 cache for the HDD. Allocating 6GB (the memory you have left unused) should be fine - check PrimoCache's stats at the end of the day to see if any cache is still free - if so, you may be able to lower it slightly.

As for Windows file caching, it makes sense to disable as much of it as possible, but it is unfortunately not possible to disable it completely.
I have games in the HDD so I will use the L2 cache.
So should I reduce the pagefile size of windows to what number?
InquiringMind
Level SS
Level SS
Posts: 471
Joined: Wed Oct 06, 2010 11:10 pm

Re: Caching strategy

Post by InquiringMind »

Leave the Windows pagefile alone - it has nothing to do with file cacheing.
User avatar
Jaga
Contributor
Contributor
Posts: 681
Joined: Sat Jan 25, 2014 1:11 am

Re: Caching strategy

Post by Jaga »

Just set the pagefile to a static size - whatever Windows recommends. Allowing it to dynamically resize can impact performance negatively.
InquiringMind
Level SS
Level SS
Posts: 471
Joined: Wed Oct 06, 2010 11:10 pm

Re: Caching strategy

Post by InquiringMind »

Agreed - a static size pagefile is better. If you always have memory spare, then keep it at a small size - say 1-2GB.
l0rdraiden
Level 2
Level 2
Posts: 8
Joined: Mon Jun 26, 2017 8:44 pm

Re: Caching strategy

Post by l0rdraiden »

The idea of reducing the pagefile (I have it in auto and it requires 19 GB, the value recommended by windows is around 2-3 GB) is in general or only because I'm using primocache?
User avatar
Jaga
Contributor
Contributor
Posts: 681
Joined: Sat Jan 25, 2014 1:11 am

Re: Caching strategy

Post by Jaga »

In general. If you have enough RAM you don't really use the pagefile, but you shouldn't ever completely turn it off. Static and small is the way to go.
BonzaiDuck
Level 7
Level 7
Posts: 84
Joined: Wed Jan 11, 2017 12:57 am

Re: Caching strategy

Post by BonzaiDuck »

I could run some more experiments, and I have a good range of hardware to play with -- from NVMe down to 2TB laptop spinners in a desktop system.

In the last cycle, getting all of my hiccups suppressed and glitches removed, it seemed that a two-tier caching strategy for the HDD eventually resulted in some disk error quickly repaired by CHKDSK. That is, I only use a spare 250gb NVME as L2 for an HDD; I don't cache the HDD to RAM. And I don't think Primo displays a current SSD-cache volume as available for caching to RAM. So imposing L1 and L2 simultaneously on an HDD may lead to those errors. I'm only guessing that you duplicate the cache at RAM and SSD level, and it wouldn't work like a two-tiered caching arrangement one could imagine.

So I cache my NVME main boot-system to 16GB of RAM. I cache an SATA and SSD and HDD to the 250GB NVME. The first caching task uses only L1; the second task exclusively and only uses L2.

Then, there's another dimension to my own situation that requires some thought to eliminating "off-line writes." This is a dual-boot system. I had trouble and no success trying to create two different caching volumes -- one for each of two OSes -- on the same physical drive. But with a total of 32GB of RAM, I can use L1 caching for both Win 7 and Win 10, and reserve the L2 cache-usage to the most frequently used OS -- my Win 10.

The off-line-writes problem extends to sharing each type or level of device in some proportional allocation of volume sizes for the Win 7 OS and the Win 10 OS. So I might have a "programs extension" drive with an NTFS volume for Win 7 and another for Win 10. It is just simple to abjure drive lettering in a given OS for volumes used by the second OS and vice-versa. It now turns out that the usage of Win 7 has dropped to a point where I'd almost consider deleting it. But there's no hurry.

If one had a drive and single volume that is shared (as, for instance, a data disk) between the OSes, you had best only use L1 caching and assure that it is recreated at boot time as a tabula rasa. You do not want to load a cache from a previous session in one OS when you'd made writes to the same disk in the other OS.

But -- sorry -- I digress. Maybe this will raise some issues or points. Maybe provide some ideas. Perhaps it will make things easier after troubling to understand the dual-boot, and make a simple single-boot system seem clear for any viable strategy.
InquiringMind
Level SS
Level SS
Posts: 471
Joined: Wed Oct 06, 2010 11:10 pm

Re: Caching strategy

Post by InquiringMind »

BonzaiDuck wrote:...it seemed that a two-tier caching strategy for the HDD eventually resulted in some disk error quickly repaired by CHKDSK.
Any use of "Defer Write" will increase the likelihood of data corruption (due to blue-screen crashes, power failures or hardware errors preventing deferred writes from completing). If data integrity matters more to you than performance, then it would be better to disable deferred writes.
BonzaiDuck wrote:That is, I only use a spare 250gb NVME as L2 for an HDD; I don't cache the HDD to RAM. And I don't think Primo displays a current SSD-cache volume as available for caching to RAM. So imposing L1 and L2 simultaneously on an HDD may lead to those errors. I'm only guessing that you duplicate the cache at RAM and SSD level, and it wouldn't work like a two-tiered caching arrangement one could imagine.
L1 (RAM) caching offers the best performance by a significant margin, but is volatile (contents lost on reboot) though the pre-load feature can improve matters. L2 (SSD) caching should survive reboots, but on its own offers less performance.

When you use L1 and L2 together, they should work as a two-tier read cache with the most frequently requested data being held in L1 (though Windows file caching comes in making this a 3-level arrangement). Disk writes are handled differently though (according to the L2 Cache documentation) since they are only held in L1 cache.
BonzaiDuck wrote:So I cache my NVME main boot-system to 16GB of RAM. I cache an SATA and SSD and HDD to the 250GB NVME. The first caching task uses only L1; the second task exclusively and only uses L2.
What data are you holding on HDD? If it is items like media/music/video or downloads, then such data does not benefit from increased speed in which case you don't need to cache it - focus on drives that store programs and frequently accessed data instead.
BonzaiDuck wrote:Then, there's another dimension to my own situation that requires some thought to eliminating "off-line writes." This is a dual-boot system. I had trouble and no success trying to create two different caching volumes -- one for each of two OSes -- on the same physical drive...
You might benefit from using separate drives (and dual booting by using BIOS/UEFI options to select boot device). Aside from better separation of OSes (especially important if you have Secure Boot enabled - or have it enabled by Windows Update) you'd be better covered against hardware (disk) failure.
BonzaiDuck wrote:If one had a drive and single volume that is shared (as, for instance, a data disk) between the OSes, you had best only use L1 caching and assure that it is recreated at boot time as a tabula rasa. You do not want to load a cache from a previous session in one OS when you'd made writes to the same disk in the other OS.
Agreed, Romex themselves note this issue in the "offline modifcation" section of their Level 2 Cache page.
Post Reply