1

We have a system on java that uses glassfish and because in some small pc the system goes slow we decide to use the netbeans profiler and it showed us the following information:

Threads: 91    
Loaded Classes: 14.186 (max)    
Total Memory: 282 MB    
Used Memory: 194 MB    
Time Spent in GC: 0%    
Surviving Generations: 79%    

Detail:    
Total bytes: 109.430.481    
Total classes: 14.603    
Total instances: 1.655.029    
Classloaders: 433    
GC roots: 3.757    
Number of objects pending for finalization: 0    

Environment:    
OS: Windows Vista (6.0) Service Pack 2    
Architecture: x86 32bit    
Java Home: C:\Program Files\Java\jdk1.7.0_03\jre    
Java Version: 1.7.0_03    
JVM: Java HotSpot(TM) Client VM (22.1-b02, mixed mode)    
Java Vendor: Oracle Corporation    

Head Walker: (High Value)    
Class: String    
Instances: 237.083    
Instance size: 24    
Total size: 5.689.992    
Retained size: 22.755.966

the libraries that use our system are:

Struts 2.3.1    
Spring 3.0.6    
AspectJ 1.7.3    
Jasper Report 5.1    
Cors Filter    
Poi 3.7    
Itext 2.1.7    
Postgresql 9.1    
commons-lang 3-3.1   
commons-pool 1.5.5    
commons-dbcp 1.4

also we follow the string class in the memory chart and most memory consumption is in the classes that are using by Xwork (struts) and Aspectj libraries

our questions are:

1- How I can lower the CPU and memory consumption when most of the consumption is in the libraries?

2- What other speed improvements I can do on the system?

Aegis
  • 113
  • 7
  • 27
  • 1
    For your question 1, the way to reduce time consumption is to find ways to make fewer calls to the libraries. [*This discusses how to find out where they are.*](http://stackoverflow.com/a/2425217/23771) Then when you reduce time consumption, memory consumption usually goes down with it, because often much of the time consumption is in memory management. – Mike Dunlavey Aug 10 '13 at 14:41

0 Answers0