Save L1 cache to disk

Suggestions around PrimoCache
Post Reply
Neglacio
Level 4
Level 4
Posts: 32
Joined: Tue Jan 21, 2014 11:28 pm

Save L1 cache to disk

Post by Neglacio »

I've been playing around with ramdisks and ramcaches for a while now, and I must say that just a big cache for my system drive works wonders.
Especially whilst gaming, I noticed that load times were halved, which is quite impressive since I'm already using an SSD. Cache hit rates climb up to 80%, average around 50-70%, which is awesome.
A standard SSD/HDD hybrid uses 8GB of SSD cache for a normal HDD. Well, I now use 8GB of RAM for an SSD (256GB Samsung 840EVO) :D

But I noticed a feature in ramdisk software, which I miss in Primocache, and would make it a more genuine hybrid RAM/SSD drive: save L1 cache to disk.
By doing so, Primocache won't need to repopulate the cache everytime you reboot. And since this is Windows, rebooting is a necessary harm :mrgreen:
Repopulating 8GB takes some time, and I experience the most benefits in-game when the cache is filled by at least 2-4GB of blocks.

This could be done in many different ways.
1.1) At shutdown, the whole cache is saved to disk. This won't overly stress SSD's which are sensitive to many writes.
1.2) While Primocache is running it saves its content when the drive is unoccupied. This gives the advantage of a much faster shutdown. When playing with ramdisks 2GB in size, it took me 2-3s longer to shutdown due to the save, so if only changes (with a certain interval) are written to disk, that would mean a huge speed-benefit.

2.1) At boot, the saved content on disk is loaded directly into memory.
2.2) When the drive is unoccupied, it gradually loads it from while Primocache is running.

3.1) Save it to the cached drive. The only option for people with just one drive.
3.2) Save it to a secondary drive, in my case a normal HDD used for data. I'd like this option so I won't be doing unnecessary writes to my SSD. I'm pondering about buying a 1TB SSHD as secondary "gaming" drive, because my 256GB SSD is getting pretty stuffed. 1TB would give me the freedom of installing as much as I want, but with the great speeds of an (8GB cache) SSD. This could also be used as a fast relay for my cache-save.
3.3) Save it to L2-cache (if available, and enough room left). I don't have any L2 cache, since my cached drive is already an SSD, but it could be an option for those who only have a cached HDD with an SSD as L2.

I hope you guys will take this one into account. Many thanks if you do!
Bjameson
Level 6
Level 6
Posts: 62
Joined: Mon Nov 08, 2010 12:00 pm

Re: Save L1 cache to disk

Post by Bjameson »

I agree. I would also like L1 to be saved and restored the same way L2 is. Pushing L1 onto L2 at shutdown would basically be all that's needed. Simply throw out the oldest L2 blocks to make room for L1 and reload L1 from L2 at boot.

Easier said than done, I know. But the Romex programmers are very smart people and they would surely love this challenge to make PrimoCache even better and faster than it already is.
piquadrat
Level 4
Level 4
Posts: 26
Joined: Wed Jan 22, 2014 7:41 am

Re: Save L1 cache to disk

Post by piquadrat »

That would increase the Hit Ratio considerably. But I'm willing to propose configurable storage for L1 saving. Not all of us use L1 in conjunction with L2. The saving system should cover all scenarios for instance separate L1 and L1/L2 caches for different partitions etc.
Post Reply