Level-2 cache alogrithm in version 0.9.8

FAQ, getting help, user experience about PrimoCache
Post Reply
User avatar
Support
Support Team
Support Team
Posts: 3627
Joined: Sun Dec 21, 2008 2:42 am

Level-2 cache alogrithm in version 0.9.8

Post by Support »

There're three major changes in the level-2 cache alrogrithm in version 0.9.8.
1. PrimoCache stores disk (being cached) data to level-2 storages when computer is idle. In previous versions, it did when level-1 cache is full.
2. PrimoCache keeps frequency of use data and stores frequently used data to level-2 storages. Currently data block with frequency larger than 1 will be stored. That means a data block has to be requested at least twice before it can be stored to level-2 storages. There's one exception. Boot data will be always cached reglardless of frequency.
3. Only read-data can be stored to level-2 storages regardless of cache strategy.

Here is an example to show how level-2 cache works in version 0.9.8.
1) Setup Cache
Create a cache task on the boot Windows partition with the following settings:
Level-1 Size: 0MB
Level-2 Size: 10240MB
Block Size: 4KB
Strategy: Read-data & Write-data
pcboot1.JPG
pcboot1.JPG (48.6 KiB) Viewed 7004 times
2) Restart Computer
During the boot phase, PrimoCache traces the data usage. After boot is ready and system becomes idle, PrimoCache will store frequently used boot data to the level2-cache. You may check the “L2Storage Write” value listed in the statistics to know how many bytes PrimoCache has stored to the level-2 storage. Here we leave the computer Idle for certain seconds after we log on to Windows. And we'll see that almost all boot data will be stored to the level-2 storage.
pcboot2.JPG
pcboot2.JPG (109 KiB) Viewed 7004 times
3) Restart Computer Again
Restart the computer again and we see that PrimoCache has provided almost all needed boot data from its level-2 cache. The cache hit rate is near to 100%.
pcboot3.JPG
pcboot3.JPG (107.46 KiB) Viewed 7004 times
Bjameson
Level 6
Level 6
Posts: 62
Joined: Mon Nov 08, 2010 12:00 pm

Re: Level-2 cache alogrithm in version 0.9.8

Post by Bjameson »

I tried this with Windows 8.1 x64 and YES! It works! I had tried before but I didn't see it cache anything. That was because I had no idea that Primo delays L2 writes. Now that you explained how it works, I have a better understanding of your algorithms. I now get cache hit rates of over 97%.

My boot volume is an SSD and I created a 4 GB L2 cache on another SSD. This makes the whole thing even faster. Without Primo, Windows must read & write at the same time to the same SSD. With Primo, Windows reads from one SSD and writes to the other. Yes I could delay those writes through a RAM cache but experiments like this are fun.

I have tried all other options and so far I think Primocache 0.9.8 works great & is safe to use.

Maybe the next step would be to make Primo ready for the market. How about colorful animations so that users can visualize what Primo is doing? Look at Supercache, O&O Clevercache to get an idea of "wrapping" your superior product into a nice, attractive package that users want to buy.

Please keep those technical explanations coming. They're extremely useful. Thank you!
minhgi
Level 10
Level 10
Posts: 255
Joined: Tue May 17, 2011 3:52 pm

Re: Level-2 cache alogrithm in version 0.9.8

Post by minhgi »

If the dirty write delay is set to infinite, it looks like the data does not get cache that much. But if the delay is set to 10 seconds or least, than the data get cache more often.

Also does the write cache data is store still in the L1 or L2?
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: Level-2 cache alogrithm in version 0.9.8

Post by Jaga »

Achieved 95.68% cache hit rate using this method, which includes a 20gb RAMdrive mounted prior to Windows startup (a boot drive for temp files).
piquadrat
Level 4
Level 4
Posts: 26
Joined: Wed Jan 22, 2014 7:41 am

Re: Level-2 cache alogrithm in version 0.9.8

Post by piquadrat »

support wrote:There're three major changes in the level-2 cache alrogrithm in version 0.9.8.

2. PrimoCache keeps frequency of use data and stores frequently used data to level-2 storages. Currently data block with frequency larger than 1 will be stored. That means a data block has to be requested at least twice before it can be stored to level-2 storages. There's one exception. Boot data will be always cached reglardless of frequency.
How the caching algorithm knows which data is boot and which not if it works on block level?

I have done some tests.
Win 7 64-bit Ultimate, 16GB RAM, Crucial SSD 256GB used as the system drive and Cache Partition (28GB with 26GB of cache volume), RAID-5 (D: drive) array set up as a target which is supposed to be cached. Settings are exactly the same as in your example. Only L2 enabled, L1 set as 0MB.
Just after defining the Cache Task for D:[Programs] drive:

Image

After running 1 particular application from D: drive 4 times in a row:

Image

After restarting the system and wait for 10 minutes on Desktop:

Image

After running 1 (still the same) particular application from D: drive 4 times in a row:

Image

After restarting the system and wait for 10 minutes on Desktop:

Image

And finally running 1 (still the same) particular application from D: drive 4 times in a row:

Image

Each application run reads around 1GB from the D [Programs] drive. Usually the first run is read from the drive, the rest from windows disk cache I suppose. No other application was being run from D: drive in this test.
As you can see virtually no data was being cached. FreeCache (L1/L2) value still reads 0/24GB.
Comparing L2 Storage Read before and after application run indicates no Cache Read at all.
No speed improvement.
Maybe L2 cache works only for boot/system drive?
User avatar
Nina
Level 4
Level 4
Posts: 38
Joined: Sat Jan 29, 2011 2:21 pm

Re: Level-2 cache alogrithm in version 0.9.8

Post by Nina »

@Romex .. Fantastic work! L2 Cache works great! - I really like the new algorithm.. No cache pollution at all! Superb!.
minhgi
Level 10
Level 10
Posts: 255
Joined: Tue May 17, 2011 3:52 pm

Re: Level-2 cache alogrithm in version 0.9.8

Post by minhgi »

I confirm that it is work. One question, does this pertain only to small frequently access data or large data does get cache as well?
minhgi
Level 10
Level 10
Posts: 255
Joined: Tue May 17, 2011 3:52 pm

Re: Level-2 cache alogrithm in version 0.9.8

Post by minhgi »

Any chances of beta tester getting a free license for Primocache when it become final? I have been using since its first initial release and giving feedbacks since then. Hehe...just asking. Its worth a try. ;)
InquiringMind
Level SS
Level SS
Posts: 477
Joined: Wed Oct 06, 2010 11:10 pm

Re: Level-2 cache alogrithm in version 0.9.8

Post by InquiringMind »

support wrote:...data to level-2 storages...
One small thing - the UI and instructions should refer to "level 2 storage" not "level 2 storages". "Storage" is a noun where the plural is the same as the singular.

It's a minor issue, but the only English mistake in the UI I've come across.
Post Reply