Ok thanks... so here's the trace of the 3 biggest org.apache.jasper.servlet.JspServletWrapper objects.
I'm just showing the path of the objects that retain the biggest sizes at each nested level to save from overkill on detail. There are references to parent objects at some levels which show a larger retained size but I expect that's normal. If it would be useful to see all nested objects at each level, no problem, but here's a first look... 1) + org.apache.jasper.servlet.JspServletWrapper (1,608,752) =+ ctxt org.apache.jasper.JspCompilationContext (1,602,384) ==+ jspCompiler org.apache.jasper.compiler.JDTCompiler (1,601,032) ===+ pageNodes org.apache.jasper.compiler.Node$Nodes (1,600,952) ====+ root org.apache.jasper.compiler.Node$Root (1,600,840) =====+ body org.apache.jasper.compiler.Node$Nodes (1,501,368) ======+ list java.util.Vector (1,501,344) =======+ elementData java.lang.Object[160] (1,501,312) ========+ [0] org.apache.jasper.compiler.Node$IncludeDirective (32,464) =========+ body org.apache.jasper.compiler.Node$Nodes (31,776) ==========+ list java.util.Vector (31,752) ===========+ elementData java.lang.Object[10] (31,720) ============+ [0] org.apache.jasper.compiler.Node$Root (31,664) =============+ body org.apache.jasper.compiler.Node$Nodes (27,432) ==============+ list java.util.Vector (27,408) ===============+ elementData java.lang.Object[80] (27,376) ================+ [0] org.apache.jasper.compiler.Node$PageDirective (1,480) =================+ attrs org.apache.jasper.util.UniqueAttributesImpl (1,176) ==================+ <class> org.apache.jasper.util.UniqueAttributesImpl (936) ==================+ data java.lang.String[25] (464) ==================+ qNames java.util.HashSet (304) ==================+ length = int 5 0x00000005 ==================+ pageDirective = boolean true 2) + org.apache.jasper.servlet.JspServletWrapper (1,534,320) =+ ctxt org.apache.jasper.JspCompilationContext (1,406,208) ==+ jspCompiler org.apache.jasper.compiler.JDTCompiler (1,404,944) ===+ pageNodes org.apache.jasper.compiler.Node$Nodes (1,404,864) ====+ root org.apache.jasper.compiler.Node$Root (1,404,752) =====+ body org.apache.jasper.compiler.Node$Nodes (1,303,480) ======+ list java.util.Vector (1,303,456) =======+ elementData java.lang.Object[320] (1,303,424) ========+ [0] org.apache.jasper.compiler.Node$IncludeDirective (32,464) =========+ body org.apache.jasper.compiler.Node$Nodes (31,776) ==========+ list java.util.Vector (31,752) ===========+ elementData java.lang.Object[10] (31,720) ============+ [0] org.apache.jasper.compiler.Node$Root (31,664) =============+ body org.apache.jasper.compiler.Node$Nodes (27,432) ==============+ list java.util.Vector (27,408) ===============+ elementData java.lang.Object[80] (27,376) ================+ [0] org.apache.jasper.compiler.Node$PageDirective (1,480) =================+ attrs org.apache.jasper.util.UniqueAttributesImpl (1,176) ==================+ <class> org.apache.jasper.util.UniqueAttributesImpl (936) ==================+ data java.lang.String[25] (464) ==================+ qNames java.util.HashSet (304) ==================+ length = int 5 0x00000005 ==================+ pageDirective = boolean true 3) + org.apache.jasper.servlet.JspServletWrapper (1,454,520) =+ ctxt org.apache.jasper.JspCompilationContext (1,381,656) ==+ jspCompiler org.apache.jasper.compiler.JDTCompiler (1,380,136) ===+ pageNodes org.apache.jasper.compiler.Node$Nodes (1,380,056) ====+ root org.apache.jasper.compiler.Node$Root (1,379,944) =====+ body org.apache.jasper.compiler.Node$Nodes (1,220,552) ======+ list java.util.Vector (1,220,528) =======+ elementData java.lang.Object[2560] (1,220,496) ========+ [2] org.apache.jasper.compiler.Node$IncludeDirective (22,744) =========+ body org.apache.jasper.compiler.Node$Nodes (22,040) ==========+ list java.util.Vector (22,016) ===========+ elementData java.lang.Object[10] (21,984) ============+ [0] org.apache.jasper.compiler.Node$Root (21,928) =============+ body org.apache.jasper.compiler.Node$Nodes (18,680) ==============+ list java.util.Vector (18,656) ===============+ elementData java.lang.Object[40] (18,624) ================+ [1] org.apache.jasper.compiler.Node$TemplateText (808) =================+ parent org.apache.jasper.compiler.Node$Root (21,928) =================+ <class> org.apache.jasper.compiler.Node$TemplateText (856) =================+ extraSmap java.util.ArrayList (496) =================+ startMark org.apache.jasper.compiler.Mark (144) =================+ text java.lang.String " " (96) =================+ beginJavaLine = int 103 0x00000067 =================+ endJavaLine = int 125 0x0000007D =================+ isDummy = boolean false Hopefully these are a good examples of what's being held. It is a very similar story for the other objects, with varying sizes and array lengths at the relevant levels etc. There are 3,772 org.apache.jasper.servlet.JspServletWrapper objects in total, the top 6 retain... 1) 1,608,752 bytes 2) 1,534,320 bytes 3) 1,454,520 bytes 4) 1,236,048 bytes 5) 1,176,048 bytes 6) 1,167,592 bytes ...the rest fall below 1,000,000 bytes and gradually drop in retained size until YourKit says "and more..." after, I would guess, the top 500 objects. One thing that has been apparent in the objects I have looked at is that there is eventually a mention of either a <% page ... %> or <% taglib ... %> directive. We have a common file that is included on many other JSP pages that looks as follows... <%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" trimDirectiveWhitespaces="true" contentType="text/html;charset=utf-8" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-bean-el.tld" prefix="bean-el" %> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <%@ taglib uri="/WEB-INF/struts-logic-el.tld" prefix="logic-el" %> <%@ taglib uri="/WEB-INF/taglibs-random.tld" prefix="rand" %> <%@ taglib uri="/WEB-INF/c.tld" prefix="c" %> ... Could including this file in multiple places cause an issue? Ian On 28 July 2011 17:46, Mark Thomas <ma...@apache.org> wrote: > On 28/07/2011 12:29, Ian Marsh wrote: >> Right, I have taken a memory snapshot using YourKit of the system >> running Tomcat-7.0.10 after about 1 hour, when the Old Gen memory was >> beginning to reach its maximum. > > OK. I think a little more digging is required but this might be heading > somewhere useful. > >> So I looked into the "Selected Objects" of the >> java.util.concurrent.ConcurrentHashMap$Segment[16]. This contains... >> >> + java.util.concurrent.ConcurrentHashMap$Segment[16] (732,561,032) >> =+ [14] java.util.concurrent.ConcurrentHashMap$Segment (55,193,864) >> ==+ table java.util.concurrent.ConcurrentHashMap$HashEntry[512] (55,193,792) >> ===+ [16] java.util.concurrent.ConcurrentHashMap$HashEntry (496,712) >> ====+ value org.apache.jasper.servlet.JspServletWrapper (496,448) > > Filter for objects of org.apache.jasper.servlet.JspServletWrapper and > trace where the bulk of the retained size is for the few largest. That > should move things forward a little. > > The level of detail in here is about right. Enough to see where to go > next, not so much it takes ages to analyse. > > Mark > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org