Level 2 cache and HDD.

Suggestions around PrimoCache
Post Reply
idefix44
Level 8
Level 8
Posts: 137
Joined: Sat Oct 26, 2013 2:13 pm

Level 2 cache and HDD.

Post by idefix44 »

On my old rig, I use a 10 GB partition to store the level 2 cache.
Not a SSD but an old spinning HD.
And I get a system more responsive.
My suggestion is about this kind of level 2 storage.
When the system is idle and when used blocks have been wrote on the level 2 storage, if this storage is a HDD (no SSD) PrimoCache defragment it... :roll:
Neglacio
Level 4
Level 4
Posts: 32
Joined: Tue Jan 21, 2014 11:28 pm

Re: Level 2 cache and HDD.

Post by Neglacio »

Do you have any benchmarks to support that as I can hardly believe that your system gets faster with L2 from an HDD. Do you have L1 RAM cache as well?
idefix44
Level 8
Level 8
Posts: 137
Joined: Sat Oct 26, 2013 2:13 pm

Re: Level 2 cache and HDD.

Post by idefix44 »

Here are some benches.
First HD: Western Digital 5400 rpm, 8 MB.
2 partitions.
F: 50 GB, System, cached.
G: 182.9 GB, Datas 1, not cached.
Second HD: Maxtor 7200 rpm, 16 MB.
2 partitions.
Z: 10 GB, L2 cache. Invisible for CrystalDiskMark.
H: 269.5 GB, unused.

Focusing on 4KB Input/Output Operations Per Second (IOPS) the results are (G: H: ---> H/G):
Random Read 4KB (QD=1): 138.9 IOPS 170.6 IOPS ---> 22.82%
Random Write 4KB (QD=1): 495.4 IOPS 798.3 IOPS ---> 61.14%
Random Read 4KB (QD=32): 204.8 IOPS 239.8 IOPS ---> 17.09%
Random Write 4KB (QD=32): 527.7 IOPS 811.7 IOPS ---> 53.82%

You can see that Random Read 4KB test result is better for the Maxtor (used for L2 cache) with at least 17%.

I think that the L1 cache is a better system cache dedicated to a choosen disk/partition (F: for me) and that the L2 cache is a better swap file dedicated to a choosen disk/partition (F: for me).
Furthermore, remember that If using a powerfull PC some people need some benches to realise the PrimoCache efficiency, other like me using some old rig can do it only when they are waiting sometimes 4 or 5 seconds without and 2 or 3 second with to have an application starting... :lol:

-----------------------------------------------------------------------
CrystalDiskMark 3.0.2 (C) 2007-2013 hiyohiyo
Crystal Dew World : http://crystalmark.info/
-----------------------------------------------------------------------
* MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s]

Sequential Read : 1031.788 MB/s
Sequential Write : 1035.523 MB/s
Random Read 512KB : 999.809 MB/s
Random Write 512KB : 982.166 MB/s
Random Read 4KB (QD=1) : 354.222 MB/s [ 86480.0 IOPS]
Random Write 4KB (QD=1) : 260.571 MB/s [ 63616.1 IOPS]
Random Read 4KB (QD=32) : 344.201 MB/s [ 84033.5 IOPS]
Random Write 4KB (QD=32) : 227.137 MB/s [ 55453.4 IOPS]

Test : 50 MB [F: 89.1% (44.6/50.0 GB)] (x5)
Date : 2014/02/18 10:03:39
OS : Windows XP Home Edition SP3 [5.1 Build 2600] (x86)

-----------------------------------------------------------------------
CrystalDiskMark 3.0.2 (C) 2007-2013 hiyohiyo
Crystal Dew World : http://crystalmark.info/
-----------------------------------------------------------------------
* MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s]

Sequential Read : 71.678 MB/s
Sequential Write : 70.009 MB/s
Random Read 512KB : 36.505 MB/s
Random Write 512KB : 49.539 MB/s
Random Read 4KB (QD=1) : 0.569 MB/s [ 138.9 IOPS]
Random Write 4KB (QD=1) : 2.029 MB/s [ 495.4 IOPS]
Random Read 4KB (QD=32) : 0.839 MB/s [ 204.8 IOPS]
Random Write 4KB (QD=32) : 2.161 MB/s [ 527.7 IOPS]

Test : 50 MB [G: 25.7% (47.1/182.9 GB)] (x5)
Date : 2014/02/18 10:10:32
OS : Windows XP Home Edition SP3 [5.1 Build 2600] (x86)

-----------------------------------------------------------------------
CrystalDiskMark 3.0.2 (C) 2007-2013 hiyohiyo
Crystal Dew World : http://crystalmark.info/
-----------------------------------------------------------------------
* MB/s = 1,000,000 byte/s [SATA/300 = 300,000,000 byte/s]

Sequential Read : 60.007 MB/s
Sequential Write : 58.282 MB/s
Random Read 512KB : 30.107 MB/s
Random Write 512KB : 58.471 MB/s
Random Read 4KB (QD=1) : 0.699 MB/s [ 170.6 IOPS]
Random Write 4KB (QD=1) : 3.270 MB/s [ 798.3 IOPS]
Random Read 4KB (QD=32) : 0.982 MB/s [ 239.8 IOPS]
Random Write 4KB (QD=32) : 3.325 MB/s [ 811.7 IOPS]

Test : 50 MB [H: 0.1% (0.2/269.5 GB)] (x5)
Date : 2014/02/18 10:16:20
OS : Windows XP Home Edition SP3 [5.1 Build 2600] (x86)
Neglacio
Level 4
Level 4
Posts: 32
Joined: Tue Jan 21, 2014 11:28 pm

Re: Level 2 cache and HDD.

Post by Neglacio »

In your first CrystalDisk benchmark I can clearly see the effect of a RAM cache (with older RAM that is). Can you disable all L1 cache (set it to 0) and only use your L2? I guess that will make a difference.

In percentages the disk may seem much faster, but in reality, it isn't. The overhead Primocache delivers is way more than those percentages.
I myself have tested this theory before: using an internal hard disk to "speed up" my USB drives. Here is an image with my benchmarks.
I set the test size larger than the L1 cache, just to make sure L1 isn't the main factor. The Truecrypt drive was an 1TB Toshiba USB3.0 drive, the backup drive was a 2TB WD Green USB2.0 drive. The 256GB was a Samsung Spinpoint, SATA 150.
As you can see, the USB drives are slower than the 256GB Spinpoint. But instead of being faster, they're much slower! What happens is the following: Primocache searches the L2 cache at the slow HDD rate for a potential hit. If you have a 50% cache hit rate, which is great, that means that 1 out of 2 times it doesn't find a cache hit on the L2. Whenever that happens, it needs to search on the main drive, which is also a slow HDD. So... You need to access TWO slow HDD's whenever there isn't a cache hit.
If you'd use an SSD, the overhead of accessing the slow main drive AFTER searching on the L2 is compensated by the fast speed of an SSD when there is a cache hit.

If you really want to access those performances of your second drive, it's best to just move those applications (or your whole OS) to that drive. L2 cache delivers way too much overhead. (I was disappointed too when I found that :P )
idefix44
Level 8
Level 8
Posts: 137
Joined: Sat Oct 26, 2013 2:13 pm

Re: Level 2 cache and HDD.

Post by idefix44 »

Neglacio wrote: As you can see, the USB drives are slower than the 256GB Spinpoint. But instead of being faster, they're much slower! What happens is the following: Primocache searches the L2 cache at the slow HDD rate for a potential hit. If you have a 50% cache hit rate, which is great, that means that 1 out of 2 times it doesn't find a cache hit on the L2. Whenever that happens, it needs to search on the main drive, which is also a slow HDD. So... You need to access TWO slow HDD's whenever there isn't a cache hit.
My cache hit rate is 96.94%... I think that this is why it works fine for me. ;)
Post Reply