Thanks for this Andrea. Would you venture to suggest a setting for heap memory using Tomcat7?

Garey

On 8/24/2012 11:29 PM, Andrea Aime wrote:
On Fri, Aug 24, 2012 at 8:41 PM, Garey Mills <gmi...@library.berkeley.edu <mailto:gmi...@library.berkeley.edu>> wrote:

    Here is the jmap histogram run after tomcat is started.


    [tcatmgr2@dlab-gis bin]$ jmap -histo:live 14521 | head -25

     num     #instances         #bytes  class name
    ----------------------------------------------
       1:       1778378      120016288  [C
       2:       1786752       57176064  java.lang.String
       3:       1673932       40174368
    org.apache.tomcat.util.bcel.classfile.ConstantUtf8
       4:        197231       25615968  [B
       5:        811557       19477368
    org.apache.tomcat.util.bcel.classfile.LineNumber
       6:        458385       18335400
    org.apache.tomcat.util.bcel.classfile.LocalVariable
       7:         25341       12455776
    [Lorg.apache.tomcat.util.bcel.classfile.Constant;
       8:        187014       11968896
    org.apache.tomcat.util.bcel.classfile.Code
       9:        514281       11817520
    [Lorg.apache.tomcat.util.bcel.classfile.Attribute;
      10:        422252       10134048
    org.apache.tomcat.util.bcel.classfile.ConstantNameAndType
      11:        212125        8485000
    org.apache.tomcat.util.bcel.classfile.Method
      12:        305713        7337112
    org.apache.tomcat.util.bcel.classfile.ConstantMethodref
      13:        157452        6298080
    org.apache.tomcat.util.bcel.classfile.LineNumberTable
      14:        258174        6196176
    org.apache.tomcat.util.bcel.classfile.ConstantClass
      15:        157452        6183776
    [Lorg.apache.tomcat.util.bcel.classfile.LineNumber;
      16:        148378        5935120
    org.apache.tomcat.util.bcel.classfile.LocalVariableTable
      17:        167932        4929680
    [Lorg.apache.tomcat.util.bcel.classfile.LocalVariable;
      18:         25497        3678120  <constMethodKlass>
      19:         89801        3592040
    org.apache.tomcat.util.bcel.classfile.Field
      20:         25497        3477224  <methodKlass>
      21:         78548        3141920
    org.apache.tomcat.util.bcel.classfile.StackMapTableEntry
      22:        187014        3122112
    [Lorg.apache.tomcat.util.bcel.classfile.CodeException;


If I use the same startup options as you I get the same problem, from what I can see it is a Tomcat 7 specific issue (I used 7.0.29), if I use the same options in Tomcat 6 GeoServer starts
up fine.

Most of the above is related to bytecode manipulation (don't know what all those strings are at the top), one thing I've noticed is that if I increase the heap memory allowed to Tomcat 7 the startup completes and the memory usage goes down to a level similar
to Tomcat 6, that is:

jmap -histo:live 14897 | head -25

 num     #instances         #bytes  class name
----------------------------------------------
   1:         27446       22004616  [B
   2:        111839       17312272  <constMethodKlass>
   3:        134189       16593000  [C
   4:        111839       15225912  <methodKlass>
   5:         11120       13148816  <constantPoolKlass>
   6:         13382       12328728  [I
   7:         11120        9105688  <instanceKlassKlass>
   8:          8929        7064064  <constantPoolCacheKlass>
   9:        147909        4733088  java.lang.String
  10:         76410        3056400  org.hsqldb.DiskNode
  11:         66163        2117216  java.util.HashMap$Entry
  12:         30232        1993960  [Ljava.lang.Object;
  13:         22091        1884912  [Ljava.util.HashMap$Entry;
  14:          2890        1621080  <methodDataKlass>
  15:         11878        1460640  java.lang.Class
  16:         16589        1327120  java.lang.reflect.Method
  17:         16231        1065800  [S
  18:         17802         874552  [[I
  19:         16229         778992  java.util.HashMap
20: 24216 774912 java.util.concurrent.ConcurrentHashMap$HashEntry
  21:          9561         611904  java.net.URL
22: 11654 559392 org.apache.catalina.loader.ResourceEntry

So, it seems that Tomcat 7 is requiring more heap to perform the startup of
a large application such as GeoServer

Cheers
Andrea

--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:   +39 0584 962313
mob:   +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------


--
Garey Mills
Library Systems Office
UC Berkeley

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to