Low memory environments

Topics: Business Logic Layer
Jun 11, 2008 at 1:54 PM
I'm running BE 1.3 on a low memory server (384mb of memory).  I didn't have any issues, so everything was cool.  But then I had to put another app on that web server.  BE still appeared from the outside to be chugging along nicely, but the other app was having major memory issues.  Specifically, I would get out of memory exceptions when the site was attempting to load assemblies into memory.

I looked into it and saw that BE was gobbling up as much memory as possible.  So I changed its app pool to limit the total memory to 192 mb.  Now my other app is happy, and BE still appears from the outside to be chugging along without any problems.

But I did notice that in the system log IIS is reporting that BE's app pool is being recycled every two minutes due to memory pressure.  This seems a little odd to me.  I know the XML data provider loads all posts into memory the first time it is instantiated, but why wouldn't that cause a recycle immediately?

Also, is there any word on lazy loading in the next version?
Jun 11, 2008 at 3:07 PM
BE uses heavy caching. It pretty much caches everything. I am not sure, but I think there is a cache limit you can set in your web.config file. The lazy loading as far as I understand only helps out with the front aggregate page. It will help with it, but low memory systems most likely will need to limit the cache size somewhere.
Jun 11, 2008 at 10:40 PM
Correct! BE.N caches everything. If you have 1000 posts, assuming each post is 100KB in size, you'll need 1000*100KB memory just to cache the posts. This is not mentioning the comments, categories, tags, and all custom controls that BE.N creates.

I agree to perform cache on demand strategy instead of cache all.

I also has mentioned the concurrency problem that may be caused by the use of singleton objects for caching, that should be addressed carefully: http://www.codeplex.com/blogengine/Thread/View.aspx?ThreadId=28441.

Regards,
Agus Suhanto
Jun 16, 2008 at 8:07 PM
We have a Blog Engine site that has consumed over 600 MB of memory at one point. Presenting it's using around 150 MB.  The architecture needs to be overhauled, big time.

Aaron