views:

136

answers:

1

Pardon if this is more serverfault vs. stackoverflow. It seems to be on the border.

We have an application that caches a large amount of product data for an e-commerce application using ASP.NET caching. This is a dictionary object with 65K elements, and our calculations put the object's size at ~10GB.
Problem:

  1. The amount of memory the object consumes seems to be far in excess of our 10GB calculation.

  2. BIGGEST CONCERN: We can't seem to use over 60% of the 32GB in the server.

What we've tried so far:

In machine.config/system.web (sf doesn't allow the tags, pardon the formatting):

processModel autoConfig="true" memoryLimit="80"

In web.config/system.web/caching/cache (sf doesn't allow the tags, pardon the formatting):

 privateBytesLimit = "20000000000" (and 0, the default of course)
 percentagePhysicalMemoryUsedLimit = "90" 

Environment: Windows 2008R2 x64 32GB RAM IIS7

Nothing seems to allow us to exceed the 60% value. See screenshot of taskman.

http://www.freeimagehosting.net/image.php?7a42144e03.jpg

A: 

Have you considered using a different caching strategy? The in built caching is not all that feature rich and you will struggle to get it to do much more (unless some IIS guru has some clever work about).

We spent a lot of time working on this and gave up. We actually use slimmer objects to store in the cache and get the fuller objects as needed.

When we have needed to contemplate this we investigated Memcached and Velocity but retreated from deploying them just yet. They are more feature rich though.

Also how are you storing the items in the cache through code? Are you putting them in there at application start or after the first request for each? The reason I ask is whether your cache keys are effective and that actually you are populating the cache over and over and not retrieving anything (this may be the case of just one object type). We managed to do this once by appending the time to a date specific cache key for example.

ArtificialGold
We're definitely exploring other caches. We're just populating the cache one time, when the application starts, and it doesn't change. We have been looking at the above, in addition to nCache. Thanks!
evilknot