Tag memory consumption and SetSize #602
Closed
tomwarner13
started this conversation in
General
Replies: 2 comments
-
|
.....and now I see there's a |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
It does appear that setting |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We're migrating a huge application which was previously using a hand-rolled L2 cache system that got put together in haste some time in the mid-2010s, to FusionCache. Overall it's been a good experience (I especially appreciate the comprehensize docs!), but there is something we're running into that I want to understand.
To preserve some of the legacy compatibility, we are currently using a LOT of tags. Like, potentially 10-12 tags per every "bucket" of a few dozen entries, to grotesquely oversimplify. We noticed that the application using FusionCache on production servers will consistently chew through all its available memory and start thrashing to disk if not restarted regularly. We attempted to set up a SizeLimit on the MemoryCache object that FusionCache is using, and set a default size of 1 on every FusionCache entry, but this had no effect.
I've been investigating more and I think the issue is our tagging implementation. We do ultimately plan to refactor out most of the tagging logic and consolidate down to far fewer tags, but that is a longer-term effort.
Meanwhile, what I have been seeing is that every time we set a tag, FusionCache adds this as a new entry to the MemoryCache with a Size of 0 (even when the default size for other entries is >0), a long absolute expiration (like 2 weeks in the future), and a priority of NeverRemove. If I understand what I'm seeing correctly, this means that memcache is continuing to fill its capacity up with tag items as the application runs, and even when we attempt to compact items out due to memory pressure, none of these tags will ever be evicted and eventually we have to restart the server and start over.
So I have a few questions around this:
Beta Was this translation helpful? Give feedback.
All reactions