Skip to main content

weird performance java/tomcat help consult! after to test my project in tomcat 5.5.23 and jdk 5 update 12 wierd

1 reply [Last post]
dr_pompeii
Offline
Joined: 2006-02-07

hello

after to test my project in tomcat 5.5.23 and jdk 5 update 12
in network(intranet-only until now with 2 clients) i see that this is fast, after of a some time i can see a wonderful exception
related with java heap exception thrown by the tomcat

after to search in google, i found the solution for windows
(server works with windows XP SP2) related to give some values
for memory ram values to the tomcat5w.exe

http://computerlabsolutions.com/supp...hp#performance
i only did the second step

according to this

Quote:

Click on the Java tab, and enter 128 in the Initial Memory Pool, and 350 or 400 in the Maximum Memory Pool.Leave the other field blank.

so my values are
128 in the Initial Memory Pool
400mb Maximum Memory Pool

the point is that the server is a intel dual core with 3ghz for each , and has DDR2 512 MB of ram

ok, its works, the point is that after to restart the server, the system is fast again,
but then again after of some time the performance go to very slow

if i do ctrl+ alt+ del to see the performance of the pc related with the ram
i taked a picture when start the wierd performance
my ram go to 645MB and swap 46200KB

i thought if i stop to use the system/application(5 minutes),
i can give the chance to the java or tomcat to get and free
some resources

well not the ram go to 640MB and swap to 45276KB

of course if i shutdown my tomcat
i have now these values
RAM 319MB and swap 44564KB

is normal this?,
i dont think so
some important suggestion/advice by our members??

BTW: i am using pool connections related with the db area

thanks so much for advanced

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
briand
Offline
Joined: 2005-07-11

With -Xmx400m (which is what's getting set for the 'Maximum Memory Pool' setting),
you are telling the JVM to reserve 400m of address space for the Java heap. As
the heap grows from 128m (the 'Initial Memory Pool' setting, which corresponds to
-Xms), more an more of the java heap is committed to real RAM. As you approach
400m of committed memory, you are using 400m+ of a total of 512m of RAM.

Since the java heap is only a (large) portion of the java address space, there's
still more RAM that the process will use. There's the perm gen, the code cache,
JVM text and data, loaded shared libraries (dlls), etc. Furthermore, the operating
system itself uses RAM to function, and also uses some RAM as a file system page
cache.

Basically, you have likely driven the system into paging. You need to reduce
the size of your java heap, probably down to 300m or so, or you need to add
more RAM to your system.

HTH
Brian