Estimated capacity loss from miss-matched block size?

FAQ, getting help, user experience about PrimoCache
Post Reply
JNG
Level 1
Level 1
Posts: 2
Joined: Tue Jun 09, 2020 7:52 am

Estimated capacity loss from miss-matched block size?

Post by JNG »

Setup:
500GB SSD cache for two 10TB HDDs.

Due to memory overhead I'm unable to match my cache block size to that of my storage drives (4kb).

From what I can tell, primocache works on a per block level for caching.
Does this mean setting a cache block size of 32kb with and a storage drive at 4kb, that each cached block would take up 8x the space thus greatly reducing capacity? Or while primocache has no concept of individual files, cache request grab chunks of blocks that represent the entirety of the file that's being accessed losing very little capacity on larger files?

Has there been any benchmarks between different cache block sizes on modern hardware and is there a sweet spot to aim for?
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: Estimated capacity loss from miss-matched block size?

Post by Jaga »

No, it means that when told to fetch something even as small as 1 4k cluster, Primocache will go and fetch the entire 32kb "block" that the cluster is within from the drive. So you end up with a slightly larger read cycle as a result, but have much less memory overhead.

It's probably fine to use 32k (or even 64k) on your 10TB HDDs, since it sounds like they are actually used for long-term storage.
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

Re: Estimated capacity loss from miss-matched block size?

Post by Support »

Jaga wrote: Tue Jun 09, 2020 10:43 am it means that when told to fetch something even as small as 1 4k cluster, Primocache will go and fetch the entire 32kb "block" that the cluster is within from the drive.
PrimoCache just assign a 32KB cache block for this 4KB cluster (and its adjacent 32KB address range). It doesn't mean that PrimoCache will fetch the entire 32KB data from target disks. Only 4KB data will be fetched during the read request. So read cycle will not get larger. PrimoCache will fetch remaining data for this 32KB cache block when Windows is idle based on its cache algorithm.
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: Estimated capacity loss from miss-matched block size?

Post by Jaga »

support wrote: Fri Jun 12, 2020 10:24 am
Jaga wrote: Tue Jun 09, 2020 10:43 am it means that when told to fetch something even as small as 1 4k cluster, Primocache will go and fetch the entire 32kb "block" that the cluster is within from the drive.
PrimoCache just assign a 32KB cache block for this 4KB cluster (and its adjacent 32KB address range). It doesn't mean that PrimoCache will fetch the entire 32KB data from target disks. Only 4KB data will be fetched during the read request. So read cycle will not get larger. PrimoCache will fetch remaining data for this 32KB cache block when Windows is idle based on its cache algorithm.
Ah, new info I didn't know. So it's a read on immediate targeted data, and deferred read data on the rest. Essentially it is reading the entire block, but only based on idle status. Great, thanks Support!
Post Reply