modelmesh icon indicating copy to clipboard operation
modelmesh copied to clipboard

fix: Allow continously used caches to be scaled to 2 copies

Open haiminh2001 opened this issue 1 year ago • 2 comments

Motivation

  • The earlierUseIteration (i1) is updated when i1 are not in range, including two cases: i1 is smaller than the lower bound (40m ago) and larger than the upper bound (7m ago).
  • Therefore, if a model is used continously, the earlierUseIteration (i1) will always be larger than the upper bound and will never be in range. To be scaled to 2 copies, the model has to be used once, wait for 7 minutes WITHOUT ANY other usage, if any other usage appear, it will interrupt (update the earlierUseIteration to the lastUsedIteration).

Modifications

  • Only update the earlierUseIteration if i1 is smaller than the lower bound, not when i1 is larger than the upper bound.

Results:

  • A model that is continuously used will be able to two copies, maintain the HA of that model.

haiminh2001 avatar Nov 23 '24 14:11 haiminh2001

Thanks for the fix, will this be part of the next release?

Legion2 avatar Feb 19 '25 15:02 Legion2

@Legion2 thank you for noticing my PR, it has been around for quite a while :)). I have also applied this fix in my company 2 months ago, it works just as what I expect. If you need further elaboration on this logic, please ask. I would be so happy if this fix can be part of the next release so that I will no longer have to maintain a custom build of modelmesh in my company.

haiminh2001 avatar Feb 19 '25 16:02 haiminh2001