You probably should do some GC tuning to avoid massive GCs which can
lock up the VM. Look here:
http://ch.sun.com/sunnews/events/2009/apr/adworkshop/pdf/5-1-Java-Performance.pdf
You can probably stand to do parallel GCs with something like this:
-Xms1024m -Xmx2048m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:
+UseConcMarkSweepGC -XX:+UseParNewGC -XX:PermSize=128m -
XX:MaxPermSize=128m
And if you have a real leak in your app, you're going to have to fix
it. Try using jmap & jhat to see what object references you have
dangling-- I'm pretty confident that the mongo java driver isn't
leaking memory with normal fetching and saving operations.
Tony
On Apr 26, 8:10 pm, niedhui <
nied...@gmail.com> wrote:
> thanks , continue to check the issue :)
>
> On Apr 27, 2010, at 9:46 AM, Eliot Horowitz wrote:
>
>
>
>
>
> > There aren't any relevant changes between 1.3 and 1.4, so that
> > shouldn't make a difference.
>
> > On Mon, Apr 26, 2010 at 9:40 PM, niedhui <
nied...@gmail.com> wrote:
> >> our server config is like
> >> -Xmx2048m -Xms2048m -Xmn768m -XX:PermSize=80m
> >> and i googled ,likely the Direct buffer memory is non-heap memory,i'm not
> >> quite familiar with java-nio...
> >> i use jstat,and see there is enough heap memory left ,
> >> although the -Xmx is 2048,but the jvm will use almost 4G memory,i don't
> >> figure out why
> >> i chang to the java-driver 1.3,and it likely be better than driver-1.4,still
> >> watching ...
> >> On Apr 26, 2010, at 9:47 PM, Eliot Horowitz wrote:
>
> >> Not quite.
> >> The reason for the System.gc() in simple pool is to see if anyone didn't
> >> correctly release a connection.
> >> I think the root problem is you just don't have enough memory allocated.
> >> Can you try setting -Xmx to something higher?
>
> > For more options, visit this group athttp://
groups.google.com/group/mongodb-user?hl=en.
> For more options, visit this group athttp://
groups.google.com/group/mongodb-user?hl=en.