J
Jason.Herald
I am having an issue where a struts based application continually
uses more and more ram. I get the available memory on each pass and
manually call gc which has slowed the issue but not fixed it.
I.e:
public ActionForward view (ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {
Session ses = new SessionManager().getSession();
Rooms rooms = new Rooms(ses);
Posts posts = new Posts(ses);
HttpSession session = request.getSession();
List room_list = rooms.find_all();
request.setAttribute("rooms", room_list);
List post_list = posts.full_set(new
Long(session.getAttribute("room_id").toString()));
request.setAttribute("posts", post_list);
rooms = null;
posts = null;
/* runtime variable r is declared above */
r.gc();
return mapping.findForward("done");
}
The memory usage follows this pattern:
Pass 1: (before gc) 231.4797 (after gc) 242.2315
Pass 2: (before gc) 232.2050 (after gc) 241.6035
Pass 3: (before gc) 231.8197 (after gc) 241.2478
JVM is started using (although I have tried many different
combinations of the arguments):
-server -XX:+CMSClassUnloadingEnabled -XXermSize=128M -
XX:MaxPermSize=128M -Xconcurrentio -XX:+UseConcMarkSweepGC -
XX:NewRatio=30 -XX:+UseParNewGC -XX:NewSize=8m -XX:MaxNewSize=8m -
Xms256m -Xmx256m -XX:MinHeapFreeRatio=70 -XX:MaxHeapFreeRatio=90
Any ideas would be greatly appreciated and if you want to see any of
the other files let me know.
Thanks in advance!
Jason
uses more and more ram. I get the available memory on each pass and
manually call gc which has slowed the issue but not fixed it.
I.e:
public ActionForward view (ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {
Session ses = new SessionManager().getSession();
Rooms rooms = new Rooms(ses);
Posts posts = new Posts(ses);
HttpSession session = request.getSession();
List room_list = rooms.find_all();
request.setAttribute("rooms", room_list);
List post_list = posts.full_set(new
Long(session.getAttribute("room_id").toString()));
request.setAttribute("posts", post_list);
rooms = null;
posts = null;
/* runtime variable r is declared above */
r.gc();
return mapping.findForward("done");
}
The memory usage follows this pattern:
Pass 1: (before gc) 231.4797 (after gc) 242.2315
Pass 2: (before gc) 232.2050 (after gc) 241.6035
Pass 3: (before gc) 231.8197 (after gc) 241.2478
JVM is started using (although I have tried many different
combinations of the arguments):
-server -XX:+CMSClassUnloadingEnabled -XXermSize=128M -
XX:MaxPermSize=128M -Xconcurrentio -XX:+UseConcMarkSweepGC -
XX:NewRatio=30 -XX:+UseParNewGC -XX:NewSize=8m -XX:MaxNewSize=8m -
Xms256m -Xmx256m -XX:MinHeapFreeRatio=70 -XX:MaxHeapFreeRatio=90
Any ideas would be greatly appreciated and if you want to see any of
the other files let me know.
Thanks in advance!
Jason