-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Large Object Heap and x64
PostPosted: Tue Jul 22, 2008 4:32 pm 
Senior
Senior

Joined: Sat Sep 03, 2005 12:54 am
Posts: 139
Related to this post, I have been communicating with someone at MS about extremely high memory usage of our application on x64 compared to x86.

Enabling 32 bit mode on the IIS7 application pool fixes the problem but obviously imposes a memory limit on your application.

They asked me to check with the NH folks to see if it is possible that NH is allocating a lot of objects on the Large Object Heap (LOH). This is the exact response I received:

Quote:
Again, the issue with the LOH is that its objects are only collected after a full GC. This is fine for long-lived objects. But short-lived objects, such as those allocated and released during execution of an ASPX page, are bad for the LOH. The GC performs well because Gen 0 is quick to collect, which means that short-lived objects are normally very easy to collect, and that memory can be used again. If however you exceed the current LOH threshold of 85000, your object won’t be collected until after Gen 0, Gen 1, and Gen 2 are collected. A full collection like this takes a long time and is expensive to do. If you allocate too many short-lived objects in the LOH, your Gen 0 to Gen 1 to Gen 2 ratio becomes flat (1:1:1), and your performance will be very bad. Unfortunately there’s no simple solution to this problem, and it seems the best we can do is alert people to the problem and possibly increase the threshold on x64 servers. In particular, framework builders and application service providers should be aware of this issue. The only solution for them is to chain smaller buffers together, and avoid exceeding the 85000 limit. And if it’s an object, not a buffer (byte array), that they’re allocating, they should consider redesigning that object to work around this LOH issue.


Apparently they are looking at the possibility of increasing the LOH threshold from 85000.

Anyone able to comment on this and provide feedback that I can pass back to MS?

Cheers,

Jason


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 23, 2008 3:06 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
Try the google nhibernate group for that. There're more developers watching that group:

http://groups.google.com/group/nhusers?hl=en

_________________
--Wolfgang


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.