Re: wierd performance in tomcat/java: help consult

2007-08-22 Thread dr_pompeii

Hello Christopher 
thanks for the reply

>>This sounds like a memory leak.
it could be, but

>>Are you sure that you always close your connections, statements, and
>>ResultSets in "finally" blocks (or are using a library that does this)?
>>This is sometimes the cause of memory leaks.
i work with hibernate and spring, so it is manged by them and i use too
JdbcTemplate, so ResultSets
is not used

>>One thing you can do (if you're getting an OutOfMemoryException, which
>>it sounds like you are)
i had other type of exception, already resolved in the link that i wrote

no exceptions i have or recieve . 

>>This will (at least, on the Sun JVM) give you a heap dump if you get an
>>OOME. You should be able to look through that to see what types of
>>objects are taking up all the space. Once you have that information, you
>>can either make your own guesses or come back to us for some additional
>>direction. 
before to work in production area, i used the thread dump in windows, and of
course i saw the wonderful
problem of resources not closed, already fixed now

more ideas are appreciate

regards


Christopher Schultz-2 wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Ash,
> 
> dr_pompeii wrote:
>> 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
> 
> [snip]
> 
>> 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
> 
> This sounds like a memory leak.
> 
>> BTW: i am using pool connections related with the db area 
> 
> Are you sure that you always close your connections, statements, and
> ResultSets in "finally" blocks (or are using a library that does this)?
> 
> This is sometimes the cause of memory leaks.
> 
> One thing you can do (if you're getting an OutOfMemoryException, which
> it sounds like you are) is set this in your environment:
> 
> JAVA_OPTS=-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp
> 
> This will (at least, on the Sun JVM) give you a heap dump if you get an
> OOME. You should be able to look through that to see what types of
> objects are taking up all the space. Once you have that information, you
> can either make your own guesses or come back to us for some additional
> direction.
> 
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFGzE409CaO5/Lv0PARAuiBAJ0QZz7Z4AhLJl6Hcb7I2s3Vt61VRACgiDYG
> 5etY/5MvSa1Ww6hN1oSB/R4=
> =sS9W
> -END PGP SIGNATURE-
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/wierd-performance-in-tomcat-java%3A-help-consult-tf4311308.html#a12277145
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wierd performance in tomcat/java: help consult

2007-08-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ash,

dr_pompeii wrote:
> 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

[snip]

> 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

This sounds like a memory leak.

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

Are you sure that you always close your connections, statements, and
ResultSets in "finally" blocks (or are using a library that does this)?

This is sometimes the cause of memory leaks.

One thing you can do (if you're getting an OutOfMemoryException, which
it sounds like you are) is set this in your environment:

JAVA_OPTS=-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp

This will (at least, on the Sun JVM) give you a heap dump if you get an
OOME. You should be able to look through that to see what types of
objects are taking up all the space. Once you have that information, you
can either make your own guesses or come back to us for some additional
direction.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGzE409CaO5/Lv0PARAuiBAJ0QZz7Z4AhLJl6Hcb7I2s3Vt61VRACgiDYG
5etY/5MvSa1Ww6hN1oSB/R4=
=sS9W
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wierd performance in tomcat/java: help consult

2007-08-22 Thread dr_pompeii

hi David

thanks so much for the information

>>2)Some part of your web application is not releasing the memory it uses.
i dont think so, i am working with Hibernate and jdbcTemplate(when i work
with jasperreports) and i use c3p0
but to clear some doubt, i see this

Also look at JProbe, or OptimizeIt, or other profiling tools.
the first is for J2EE so, it seems this cant help me
and the second is not free

can you suggest me one of your preference? (free of course)

it can detect in which part in my code the resources is not releasing?
i never used before in my live a profile 

now about point 1
if i dont bad remember when i start tomcat i see in the "perfomance control"
almost 350 in ram used
so the correct value should be 512-350=162 instead of 400 right?

i hope your help

i am doom in this

thanks so much for advanced





David Delbecq-2 wrote:
> 
> Well, i see two performance bottlenecks in your description
> 
> 1) You gave a max memory to your tomcat jvm that is above what your
> server supports. You shouldn't give jvm more memory thant what is really
> available without swapping (that is 512M minus all that is used by other
> applications in your case). Swapping is a big performance bottlneck.
> 
> 2) Whatever the memory you give your tomcat application, it seems it eat
> more and more of it. Some part of your web application is not releasing
> the memory it uses. See http://tomcat.apache.org/faq/memory.html for
> more informations.
> 
> 
> En l'instant précis du 22/08/07 14:37, dr_pompeii s'exprimait en ces
> termes:
>> 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.
>> [/quote]
>> 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 
>>   
> 
> 
> -- 
> http://www.noooxml.org/
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/wierd-performance-in-tomcat-java%3A-help-consult-tf4311308.html#a12276431
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wierd performance in tomcat/java: help consult

2007-08-22 Thread David Delbecq
Well, i see two performance bottlenecks in your description

1) You gave a max memory to your tomcat jvm that is above what your
server supports. You shouldn't give jvm more memory thant what is really
available without swapping (that is 512M minus all that is used by other
applications in your case). Swapping is a big performance bottlneck.

2) Whatever the memory you give your tomcat application, it seems it eat
more and more of it. Some part of your web application is not releasing
the memory it uses. See http://tomcat.apache.org/faq/memory.html for
more informations.


En l'instant précis du 22/08/07 14:37, dr_pompeii s'exprimait en ces
termes:
> 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.
> [/quote]
> 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 
>   


-- 
http://www.noooxml.org/


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



wierd performance in tomcat/java: help consult

2007-08-22 Thread dr_pompeii

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.
[/quote]
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 
-- 
View this message in context: 
http://www.nabble.com/wierd-performance-in-tomcat-java%3A-help-consult-tf4311308.html#a12273635
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]