Jazz Register Log in
Jazz Forum Welcome to the Jazz Community Forum

Welcome to the Jazz Community Forum

Connect and collaborate with IBM Engineering experts and users

Message re: MaxDirectMemorySize in Jazz logs / Change needed?

We just a couple weeks back upgraded all our environment to 4.0.7 and moved it into WebSphere (8.5.5.2 base).  We followed the information with respect to configuration of WebSphere especially with respect to the "generic jvm arguments"

-XmxNg -XmsNg -XmnN/8m -Xgcpolicy:gencon -Xnocompressedrefs -XX:MaxDirectMemorySize=1G


Now I sometimes see errors mentioning:

Direct buffer memory::Please use appropriate '<size>' via -XX:MaxDirectMemorySize
[ very large stack trace omitted for brevity ]

Is there any action that ought to be considered here ?

0 votes



One answer

Permanent link
Did you see the final cause in the stack as "out of memory"? If so, the server ran out of native memory. To provide an appropriate solution, it is necessary to analyze the GC verbose log file (to determine whether there were GC storms or excessive system GC). If you still see this error message, please contact Support.

0 votes

Comments

There is no "caused by" in the stack trace.  It does, however, start:

java.lang.OutOfMemoryError: Direct buffer memory::Please use appropriate '<size>' via -XX:MaxDirectMemorySize=<size>
        at java.nio.Bits.reserveMemory(Bits.java:705)
        at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:109)
        at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:299)
        at com.ibm.ws.buffermgmt.impl.WsByteBufferPoolManagerImpl.allocateBufferDirect(WsByteBufferPoolManagerImpl.java:706)
        at com.ibm.ws.buffermgmt.impl.WsByteBufferPoolManagerImpl.allocateCommon(WsByteBufferPoolManagerImpl.java:612)
        at com.ibm.ws.buffermgmt.impl.WsByteBufferPoolManagerImpl.allocateDirect(WsByteBufferPoolManagerImpl.java:527)
        at

It's indeed OutOfMemoryError. I would not suggest you increase MaxDirectMemorySize blindly. As mentioned earlier, please contact Support and get the GC verbose log analyzed.

This pre-supposes GC is turned on.  

Yes. To diagnose memory/heap related issues, GC verbose has to be turned on. In fact, you can keep it on all the time and it only has little performance impact.


<gc-start id="91223" type="scavenge" contextid="91222" timestamp="2014-09-25T11:04:44.465">
<gc-start id="91235" type="scavenge" contextid="91234" timestamp="2014-09-25T11:04:49.598">
<gc-start id="91247" type="scavenge" contextid="91246" timestamp="2014-09-25T11:04:57.482">
<gc-start id="91259" type="scavenge" contextid="91258" timestamp="2014-09-25T11:05:08.605">
<gc-start id="91271" type="scavenge" contextid="91270" timestamp="2014-09-25T11:05:16.264">
<gc-start id="91283" type="scavenge" contextid="91282" timestamp="2014-09-25T11:05:24.033">
<gc-start id="91295" type="scavenge" contextid="91294" timestamp="2014-09-25T11:05:31.610">

Seems to be happening very frequently, that's just the tail end.  Almost 8K occurrences.

That's quite normal for an active system. We are more interested with those with type="global". It will not be efficient to analyze a log file in a forum post and I suggest you open a tick with Support if you have not done so.

Adding the custom property described under Out of Memory in this article https://jazz.net/library/article/1430 has since Friday evening past and Saturday morning past relieved the occurrence of the Out of Memory exception ( i.e. none so far ).


showing 5 of 7 show 2 more comments

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Sep 11 '14, 2:46 p.m.

Question was seen: 5,472 times

Last updated: Oct 14 '14, 12:32 p.m.

Confirmation Cancel Confirm