Improved Cache Algorithm

Suggestions around PrimoCache
Post Reply
steveb
Level 4
Level 4
Posts: 21
Joined: Fri Sep 17, 2021 7:58 am

Improved Cache Algorithm

Post by steveb »

From very limited testing Primocache seems to act similar to FIFO (i could be very wrong), it would be handy to be able to set X percentage of the cache for a improved read cache algorithm. Ideally one that keep a history of the blocks accessed over time, like nearly any of the so called "Intelligent Cache" solutions.

Also, maybe worth looking at other solutions like PLC-cache.
InquiringMind
Level SS
Level SS
Posts: 477
Joined: Wed Oct 06, 2010 11:10 pm

Re: Improved Cache Algorithm

Post by InquiringMind »

PrimoCache currently uses an LRU (Least Recently Used) algorithm to determine which blocks to discard when full.

Older versions (2.x if I recall correctly) gave the choice between LRU and LFU (Least Frequently Used) algorithms. It would be interesting to hear from support why LFU was removed, as there are certain cases where it could be useful.
steveb
Level 4
Level 4
Posts: 21
Joined: Fri Sep 17, 2021 7:58 am

Re: Improved Cache Algorithm

Post by steveb »

InquiringMind wrote: Mon Sep 20, 2021 10:47 am PrimoCache currently uses an LRU (Least Recently Used) algorithm to determine which blocks to discard when full.

Older versions (2.x if I recall correctly) gave the choice between LRU and LFU (Least Frequently Used) algorithms. It would be interesting to hear from support why LFU was removed, as there are certain cases where it could be useful.
Thanks for the clarification regarding LRU. With the configuration option of being able to split your read vs write cache, LFU could be handy in some cases for the read cache.
User avatar
Support
Support Team
Support Team
Posts: 3123
Joined: Sun Dec 21, 2008 2:42 am

Re: Improved Cache Algorithm

Post by Support »

InquiringMind wrote: Mon Sep 20, 2021 10:47 am PrimoCache currently uses an LRU (Least Recently Used) algorithm to determine which blocks to discard when full.

Older versions (2.x if I recall correctly) gave the choice between LRU and LFU (Least Frequently Used) algorithms. It would be interesting to hear from support why LFU was removed, as there are certain cases where it could be useful.
Not exactly. LFU, as well as other algorithms, is also be used internally. We try to implement an intelligent caching algorithm based on detected data patterns. So the explicit option for choosing algorithm has been removed. Besides, this keeps the UI simple for users.
steveb
Level 4
Level 4
Posts: 21
Joined: Fri Sep 17, 2021 7:58 am

Re: Improved Cache Algorithm

Post by steveb »

Support wrote: Tue Sep 21, 2021 2:12 pm
InquiringMind wrote: Mon Sep 20, 2021 10:47 am PrimoCache currently uses an LRU (Least Recently Used) algorithm to determine which blocks to discard when full.

Older versions (2.x if I recall correctly) gave the choice between LRU and LFU (Least Frequently Used) algorithms. It would be interesting to hear from support why LFU was removed, as there are certain cases where it could be useful.
Not exactly. LFU, as well as other algorithms, is also be used internally. We try to implement an intelligent caching algorithm based on detected data patterns. So the explicit option for choosing algorithm has been removed. Besides, this keeps the UI simple for users.
Does this mean your current intelligent caching algorithm keep a history of blocks accessed over a reasonable period of time?
User avatar
Support
Support Team
Support Team
Posts: 3123
Joined: Sun Dec 21, 2008 2:42 am

Re: Improved Cache Algorithm

Post by Support »

steveb wrote: Tue Sep 21, 2021 3:28 pm Does this mean your current intelligent caching algorithm keep a history of blocks accessed over a reasonable period of time?
I'm sorry but I don't know such details.
Post Reply