Page 1 of 1
L2-Cache and Mount Points Question
Posted: Thu Nov 26, 2020 5:10 pm
by viniciussalmeida
Hi! My Trial will expire tomorrow, and I need a clarification...
I'm using PrimoCache in a system with a 240Gb SSD Sata3 and an external 1Tb HDD via USB3. My Windows is installed on SSD, and I reserved 32Gb of that SSD to L2-Cache (attached are my configurations). I use some Virtual Machines and also WSL2 (Windows Subsystem for Linux 2), and I'm testing using the VHDs of that on the HDD, cached by PrimoCache.
I've moved the VHD of WSL2 to the HDD, and created a symbolic link so that WSL2 continues to recognize that VHD. But, I'm accessing that HDD through a Mount Point on a folder in my OS installation on SSD (C:). So that symbolic link points to the VHD on HDD through that mount point, i.e.: C:\Archive\_WSL\Ubuntu\ext4.vhd, where C:\Archive is the mount point to D:\.
My question is: this setup (mount point) could prevent PrimoCache from caching the blocks of HDD, as it could recognize the path C:\Archive (mount point to D:\) as the same drive as the SSD.
Re: L2-Cache and Mount Points Question
Posted: Thu Nov 26, 2020 6:01 pm
by Jaga
To my understanding, Primocache caches logical volumes only. Symlinks should bypass the volume referencing, and not get cached by the Cache Task. Support can correct me if I'm wrong.
I've used symlinks for gaming before (specifically TS3 since it needed C: strict location), and had to setup a separate Cache Task for the symlink target drive to effectively get it into the cache.
Windows may not "know" that a file isn't on C:, but Primocache certainly does.
Re: L2-Cache and Mount Points Question
Posted: Thu Nov 26, 2020 7:22 pm
by viniciussalmeida
Jaga wrote: ↑Thu Nov 26, 2020 6:01 pm
To my understanding, Primocache caches logical volumes only. Symlinks should bypass the volume referencing, and not get cached by the Cache Task. Support can correct me if I'm wrong.
I've used symlinks for gaming before (specifically TS3 since it needed C: strict location), and had to setup a separate Cache Task for the symlink target drive to effectively get it into the cache.
Windows may not "know" that a file isn't on C:, but Primocache certainly does.
Thanks for the reply, I'm about to buy a license, but I'm concerned about my setup...
I indeed noticed an increase of performance, comparing the access to VHD on HDD after I created the Cache Task, using exact the same path. But I'm afraid that not all blocks or access are being correctly cached, because the Cache Hit Ratio always decrease when I start the VM/WSL2.
Is Primocache in some way affected by how the blocks are read/written when the file is a Virtual Disk of a Virtual Machine (i.e. a VHD, VMDK)?
Re: L2-Cache and Mount Points Question
Posted: Thu Nov 26, 2020 8:33 pm
by Jaga
Unless your entire VHD fits into the cache (and actually IS all in the cache), your hit ratio will probably drop when you start the virtual machine. It's basically like a Windows boot, but in the case of the VHD a good chunk of it is accessed on startup as opposed to smaller individual files for a standard Windows volume (just my thoughts, not empirical evidence). But I doubt the hit ratio would plummet to 0 - you'll still get some cache hits depending on cache size.
Primocache caches on a strict block basis (defined in the cache task). It doesn't really care about files at all, just what it's asked to deliver.
Part of the trick to hit ratio is keeping your cache above a certain percentage of your cached data. i.e. I try to keep my cache around 10-20% of the data it is caching, so if I have 500GB of data, I'd want a cache of no less than 50GB, but preferably 100GB or more. In the case of a L2 cache you'll probably have more headroom, so don't skimp on the L2 volume size if you can afford it.
If you want to cache the VHD(s) on the spinner drive, setup a separate L2 space that follows the conventions above (min 10% data coverage). With the VHD, I'd suggest 20-30% if you want good hitrate on a repeating basis.
Re: L2-Cache and Mount Points Question
Posted: Thu Nov 26, 2020 10:20 pm
by viniciussalmeida
Thanks a lot for the clarifications!
Indeed my hit ratio didn't reached 0, I was just concerned about not using the configuration optimally. But your explanations and ideas helped me to better understand how Primocache works, and I certainly will buy the license and play around of the configurations.