Page 1 of 1

Block size impact?

Posted: Fri May 22, 2015 1:09 pm
by vvume
I have PrimoCache installed on different machines and I find that the default block size was different for each. What is the impact of block size on Read/Write strategy w/ 20 sec deferred write?

Thanks,

Re: Block size impact?

Posted: Sun May 24, 2015 2:39 am
by Davey126
I found smaller block sizes increased the effectiveness of intra-cache trim and thus reduced the amount of data written to disk. With 8K block size and 60 sec write defer I see a 50-60% delta between normal and total writes (eg: 41 GB staged but only 16 GB written). Obviously reductions will vary widely depending on the amount and type of data written. I do not notice any performance difference with varying block sizes but my rig is relatively modest. As always, need to find the best compromise between block size and memory overhead when tuning PrimoCache. Let the control panel be your guide. Do not obsess over the cache hit rate, especially if Windows caching remains active. Windows and PrimoCache operate differently and will share the caching load (yes, the same data can sometimes reside in both caches).

Re: Block size impact?

Posted: Thu May 28, 2015 1:38 pm
by Axel Mertes
I am facing a similar issue.

I dumped one large partitions directory/file structure to a log file and wrote a small program to analyze that.
I've checked for file sizes matching any power of 2 block size, like 1, 2, 4, 8, 32, 64, 512, 1K, 2K, 4K, 8K, 16K, 32K, 64K, 128K, 256K, 512K.
I notice the total true size of the files plus how much blocks they need as per block size. Afterwards I've exported that data (from roughly 4 million files).
In turn I made an excel sheet to analyze that statistic data and what amount of disk space is wasted at any given block size.

If found that at the default disk 512 Bytes cluster size I would have a utlitization of 99.9914% of the true cluster size. So with 12+ TByte of data written to disk I'd loose only ~1 GByte in total.
At the true used NTFS formatting cluster size of 4K on that partition I have a utlitization of 99.9343% of the true cluster size. So with 12+ TByte of data written to disk I'd loose only ~7.5 GByte in total.
At a cluster size of 64K I would have a utlitization of 99.1329% of the true cluster size. So with 12+ TByte of data written to disk I'd loose only ~99 GByte in total. As this seems to be significantly more, its still relative small.

So for a future formatting of volumes this large (it has 26 TBytes...) I'd go for 64KByte block size, as this is the largest provided by NTFS and clearly supported on the PrimoCache options (while 512 Bytes or 4K isn't even showing up on this size of cache and volume).
So my RAM overhead for indexing will be fairly small plus the size of the MFT will be potentially smaller too due to less index entries for using less clusters with a larger size each.

Re: Block size impact?

Posted: Thu May 28, 2015 5:41 pm
by Davey126
Keep in mind the block size in PrimoCache does not need to match physical block sizes on the target media; optimal but not required. At present I run with 4K block size on all physical media but vary PrimoCache block sizes depending on available memory and size of disk being cached. The most common combination is 4K physical/8K PrimoCache. I did runs some tests with matching sizes but saw no appreciable difference in performance. Note I only use L1 cache primarily for deferred write benefits. My findings may not be applicable to L2 and/or those looking for accelerated reads.