L1 + L2 tasks and RAM allocation

FAQ, getting help, user experience about PrimoCache
Post Reply
User avatar
RAMbo
Level 6
Level 6
Posts: 73
Joined: Wed May 11, 2011 7:50 am

L1 + L2 tasks and RAM allocation

Post by RAMbo »

I need some advise on setting up my caching strategy.

Current setup:
Fast SSD + slow HDD.
I have a total of 2GB RAM to allocate for L1.

Currently I use both drives in one caching task. My reasoning is that this way PrimoCache can use the 2GB in the best possible way.
I could setup 2 tasks and allocated 1GB to each but that may not be optimal as disk usage is an ever changing thing. So 1+1 may be ideal right now, but in an hour 0.5+1.5 might be ideal.

OTOH if PrimoCache just looks at how often blocks are accessed the situation may not be ideal either. Does a block from a 10x slower HDD count 10x more compared to a block from a fast SSD?

Future setup:
I'm planning to buy a small SSD for L2 only. That SSD will be slower than the main SSD.
Fast SSD + slow HDD + 'slow' SSD.

All the questions as asked above 'Current setup' plus:
If I group the SSD and HDD into one caching task will PrimoCache cache blocks from my fast SSD to my slow SSD?
Last edited by RAMbo on Sun Aug 19, 2018 8:34 am, edited 1 time in total.
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: L1 + L2 tasks and RAM allocation

Post by Jaga »

RAMbo wrote:OTOH if PrimoCache just looks at how often blocks are accessed the situation may not be ideal either. Does a block from a 10x slower HDD count 10x more compared to a block from a fast SSD?
Nope - different disk technologies aren't weighed differently. Any disk in the Cache Task is eligible for equal rights to block caching.
RAMbo wrote:If I group the SSD and HDD into on caching task will PrimoCache cache blocks from my fast SSD to my slow SSD?
Yes it will, which wont' be an optimal configuration.

I'd suggest using the largest L1 cache you're comfortable with against your current faster SSD (assuming that's the Boot and System temp drive), and the L2 against your slow HDD. Two separate cache tasks: one the L1, the second the L2. Each specifically servicing a single drive. If you can afford a UPS (Uninterruptible Power Supply), then you can turn on deferred writes, which lowers disk thrashing and improves write speeds. If not, set both cache tasks as read/write tasks anyway, but don't enable any write caching.

You *can* cache both drives in one Cache Task that has a L1+L2 cache, and then specify that only one of them also uses the L2 cache. It's in the "Volume Specifications" area of the configuration for the task. But with only a 2GB (?) L1, caching two drives in a single L1 means you're not going to have a very high hitrate. The 10% data coverage recommendation I made still holds (5% at a minimum). Less than that and cache performance suffers, though you'll probably still see an overall speed increase in responsiveness.
User avatar
RAMbo
Level 6
Level 6
Posts: 73
Joined: Wed May 11, 2011 7:50 am

Re: L1 + L2 tasks and RAM allocation

Post by RAMbo »

The other solution might be setting up a small stripe for L2. That way SSD performance stays good and PrimoCache can handle the L1 the way it thinks is best.

The 2GB L1 was just an example. I own PrimoCache for years but yesterday I reinstalled it and right now I'm playing with 2GB. Which most certainly it's my final setup.
I have to workout the best setup first. For example I have certain temp folder that has a lot of activity. Maybe that should be moved to a partion PrimoCache doesn't monitor because those files only exist for a short while and caching them is useless because they are just one time use.
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: L1 + L2 tasks and RAM allocation

Post by Jaga »

A RAID 0 stripe of SSDs working as a L2 is very advantageous, yes. You get enhanced read/write speeds, and the benefit of using cheaper/smaller drives. That's how I'm handling my 2x1TB SSDs for the Drivepool.

I used a Primo Ram Disk for my temp folders and browser cache, though you have to be careful and make sure the virtual disk is large enough for all the things Windows will throw in there. If it's not possible to use a Ram Disk (or there's not enough ram to do it), creating a separate volume on the SSDs (prior to setting it up as a L2) and placing the temp folders there is helpful.
Post Reply