Caching and the GC

Topics: Caching Application Block
Apr 13, 2008 at 6:08 AM
Hello, was wondering if anyone had any thoughts on the impact of Garbage Collection and the Caching Blocks. It seems for very large caches (lets say 25M max elements with a 5M scavenger policy), the GC can lock up the machine in Gen 1+ GC for quite some time. Has anyone encountered this and if so any thoughts on resolution?

TIA
Apr 17, 2008 at 9:18 AM

MattDev wrote:
Hello, was wondering if anyone had any thoughts on the impact of Garbage Collection and the Caching Blocks. It seems for very large caches (lets say 25M max elements with a 5M scavenger policy), the GC can lock up the machine in Gen 1+ GC for quite some time. Has anyone encountered this and if so any thoughts on resolution?

TIA


Hi, bumping this as I see this is a real problem to enterprise development. As a cache is suppose to alleviate performance issues, it's a bit counterproductive to have the GC consume a majority of your savings as a lump sum. In general, are caches bad candidates (mostly due to their usage patterns) for managed code implementations. That is, you have several allocations that will most likely survive to gen2 state then expiration causes lump sum compaction. Is this something better done in C/C++/CLI?