0

I'm building a enterprise scale MVC ASP.NET application which store large objects on to memory cache using enterprise library 4.1.

The object sizes range from 18-22MB for each user. There could be 530 concurrent users at any time. I'm bit worried about the size of objects in memory. Could anyone please suggest any pattern I can use to compress the objects in memory? I've not seen any article which mentions on whether Ent Lib 4.1 support compressed memory cache out of box.

Reducing the data size of the cached objects is not an option as we must store 3 years worth of data on to memory to avoid round trip call to web service.

Thanks.

Nil Pun
  • 17,035
  • 39
  • 172
  • 294
  • 1
    I know it sounds a bit flippant, but... make sure your server has plenty of RAM? 22MB x 530 users is less than 12GB, and RAM is (relatively) cheap. Also, any compression necessarily requires decompression before use, meaning an overhead you wouldn't normally get. It might be better to get 20% more RAM than try to decrease the size of the objects by 20%. – Damovisa Jan 09 '13 at 05:12
  • 1
    You can still use a local disk cache on the web server or even a local cache database (e.g. SQL Server Compact 4.0: http://www.microsoft.com/en-us/download/details.aspx?id=17876) or something like memcached (or, dare I say, AppFabric Caching). Then again, 530 * 22MB is only ~11.5 Gigabytes, so a modern Web Server with 16 or 24 GB RAM shouldn't have any issues, as long as you're running 64-Bit ASP.net and don't exceed the 2 GB Object Limit (which can be tweaked, but I think that GC performance eventually takes a nosedive) – Michael Stum Jan 09 '13 at 05:15

1 Answers1

1

The Entlib cache block does not support in-memory (or on disk, for that matter) compression.

Chris Tavares
  • 29,165
  • 4
  • 46
  • 63