Caching both SSD and spinning disk Topic is solved

FAQ, getting help, user experience about PrimoCache
Post Reply
npelov
Level 6
Level 6
Posts: 60
Joined: Thu Jun 30, 2016 3:01 pm

Caching both SSD and spinning disk

Post by npelov »

Hi,

I have an SSD and spinning disk. The OS is on first partition of the ssd. Currently I have following cache setup:
Cache Task 1: - caching of spinning disk
4GB L1 read cache
20 GB L2 (last partition of the SSD)

Cache task 2: caching of SSD
5GB L1 - read cache
No L2
L1 cache ratio - 98%

I rarely use the spinning disk so usually total read for a day is about 100-200 MB.
Read on OS partition (C:) however is 5 to 10 GB/day and it comes mostly from cache. If I reduce the cache of OS partition cache ratio gets a lot worse.

If I merge the two tasks the OS partition would benefit from better caching because of the more ram and I can reduce the total ram to (for example) 6GB. However I don't want parts of OS2 partition being stored on L2 because it's actually quite a lot of writing 3 to 6 GB/day. But if I remove L2 cache then the spinning disk will have poor ratio because it's mostly benefiting from L2 cache (almost always when I use it it's after restart).

What I need is currently not existing (correct me if I'm wrong). There are few features that if added to primocache would solve my problem:
1. option ti disable writing to L2 cache data of it's own hard disk. Actually it may not be an option, but hardcoded. Who will want to L2 cache it's own contents.
2. Being able to mark hard disk as ssd and disable L2 caching for SSDs
3. Similar to creating L2 cache partitions L1 can be set to partitions outside of cache tasks. At each cache task instead of selecting L1 memory size, an L1 "partition" will be selected. This will allow to share L1 memory between tasks.

Because I don't know how hard it is to implement these options I leave it up to you. Also you can come up with different solution.
User avatar
Support
Support Team
Support Team
Posts: 3731
Joined: Sun Dec 21, 2008 2:42 am

Re: Caching both SSD and spinning disk

Post by Support »

You may just merge these two tasks into one. PrimoCache automatically ignore L2 caching for volumes that are on the same disk with L2 storage volume. You won't see any "L2Storage Read" or "L2Storage Write" on C drive.
npelov
Level 6
Level 6
Posts: 60
Joined: Thu Jun 30, 2016 3:01 pm

Re: Caching both SSD and spinning disk

Post by npelov »

Well that's very good! It doesn't solves the problem with a second ssd (for example if L2 is on different ssd), but it's good for now. Anyway. Think about option 2 - it shouldn't be that hard.
npelov
Level 6
Level 6
Posts: 60
Joined: Thu Jun 30, 2016 3:01 pm

Re: Caching both SSD and spinning disk

Post by npelov »

I just realized I can't set separate block size if they are both in the same cache task. I used to have 4k for SSD and 16k for HDD. Now 4k gives 1.5GB overhead :(
User avatar
Support
Support Team
Support Team
Posts: 3731
Joined: Sun Dec 21, 2008 2:42 am

Re: Caching both SSD and spinning disk

Post by Support »

Well, that's true...I think you may just use 16K block size for all.
User avatar
Jaga
Contributor
Contributor
Posts: 694
Joined: Sat Jan 25, 2014 1:11 am

Re: Caching both SSD and spinning disk

Post by Jaga »

Don't forget - the contents from the two drives (in a single Task) are in competition for L1 cache space, so you can (for example) get boot files and other frequently-accessed files taking priority over your spindle-disk. I had that happening, and regularly had boot-time files bullying the L1 cache and taking it over.

To avoid that, I segmented it into two tasks like you currently have. It makes sure there's dedicated cache where I need it at all times. It helps to have a ton of memory to do it with. Overall this solution is more beneficial for me.
npelov
Level 6
Level 6
Posts: 60
Joined: Thu Jun 30, 2016 3:01 pm

Re: Caching both SSD and spinning disk

Post by npelov »

I tried it for a while. However the data read from spinning disk is not that much - jumps to 800 MB for a day and then stays there. I can't even fill 20 gb L2. So I'd much prefer to cache whatever I use the most. If I ever need frequently used data from spinning disk and it's not in L1, but it's in L2 - not that critical. It'll still be fast enough.
Post Reply