You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ragini <ra...@gmail.com> on 2012/08/09 11:51:05 UTC
Profiling tomcat with java profiler
Hi experts,
I try to profile tomcat server with java profiler. The profiler I use is
not widely used. It is jp2.1 profiler. I use tomcat 7.0_29 version on
ubuntu 12.04. My jvm is 1.6 (oracle). What I do is as following.
1) I start the script ./startup.sh which starts profiling the server.
I have already put web application(war file) in webApps directory. Web
application I use is, insecure web.
(https://www.owasp.org/index.php/Category:OWASP_Insecure_Web_App_Project).
Please note that I have created setenv.sh file to add parameters to
profile tomcat.
2) I open the browser and type following to open the application's homepage:
http://localhost:8080/insecure/
3) then I run shutdown.sh script to stop the server. After running of
this script the profiler gives me output of profiling in xml files.
what my profiler profiles:- It gives me xml file containing list of
methods in a proper sequence in which they were executed while running
the server.
*My question:* I do the above 3 steps 2 times in exactly same manner. So
I have two output files say file1 and file2. I expected these files to
be exactly same because I start the server, access the same application
and stop the serever. But it seems that both files differ. I don't
understand why. Could you please tell me why does it differ ? Are not
methods of tomcat executed in exactly same manner for a same action ?
Please find the files attach which I get two different files (file1.xml)
and (file2.xml). I have attached differences also which it gives. I find
these differences by parsing files.
I look forward to your reply.
Thanking You.
Kind Regards.
Ragini
Re: Profiling tomcat with java profiler
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ragini,
On 8/10/12 4:25 AM, Ragini wrote:
> On 08/09/2012 08:43 PM, Christopher Schultz wrote: Ragini,
>
> On 8/9/12 5:51 AM, Ragini wrote:
>>>> what my profiler profiles:- It gives me xml file containing
>>>> list of methods in a proper sequence in which they were
>>>> executed while running the server.
>>>>
>>>> *My question:* I do the above 3 steps 2 times in exactly
>>>> same manner. So I have two output files say file1 and file2.
>>>> I expected these files to be exactly same because I start the
>>>> server, access the same application and stop the serever. But
>>>> it seems that both files differ. I don't understand why.
>>>> Could you please tell me why does it differ ? Are not methods
>>>> of tomcat executed in exactly same manner for a same action
>>>> ?
>>>>
>>>> Please find the files attach which I get two different files
>>>> (file1.xml) and (file2.xml). I have attached differences also
>>>> which it gives. I find these differences by parsing files.
> Instead of dropping two files on the list, why don't you tell us
> what the differences are (in general). It's fine to provide full
> the full data to us, but don't make us wade-through it just ti get
> our bearings.
>
> -chris
>>
>> ---------------------------------------------------------------------
>>
>>
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
> Hi Chris,
>
> Actually I could not understand the exact differences and why they
> exist. But in general it seems that sequence of methods which
> starts from org/apache/catalina/startup/HostConfig$DeployWar;"
> name="run", and org/hsqldb/store/HashIndex;" name="getNextLookup
> differes in both the files. I have uploaded the differences file
> ("abranchdifferences") also. So If you kindly have look on few of
> it, you might get some idea.
The JVM is threaded and therefore nondeterministic when it comes to
the exact order of calls, etc. across the whole JVM. If you are
talking about the ordering of certain calls from a /single thread/,
then those ought to be entirely deterministic and I would not expect
to see any deviation between two runs of the same
container/webapp/configuration.
If you'd like to call our attention to a specific thread of execution
that seems to behave differently in the two separate traces, I might
consider looking. But I'm not even going to open those files until you
get me that far: I'm simply not going to stare at two complete JVM
call traces generated by a "not widely used" profiler for academic
interest.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAlAlHtsACgkQ9CaO5/Lv0PDrcwCeIhQir52hFfhSqphRp/C0Mwqb
hXAAoKBrD6Avrm3OEZAKFMJ4W0ikV0cH
=6QXF
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Profiling tomcat with java profiler
Posted by Ragini <ra...@gmail.com>.
On 08/09/2012 08:43 PM, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Ragini,
>
> On 8/9/12 5:51 AM, Ragini wrote:
>> what my profiler profiles:- It gives me xml file containing list
>> of methods in a proper sequence in which they were executed while
>> running the server.
>>
>> *My question:* I do the above 3 steps 2 times in exactly same
>> manner. So I have two output files say file1 and file2. I expected
>> these files to be exactly same because I start the server, access
>> the same application and stop the serever. But it seems that both
>> files differ. I don't understand why. Could you please tell me why
>> does it differ ? Are not methods of tomcat executed in exactly same
>> manner for a same action ?
>>
>> Please find the files attach which I get two different files
>> (file1.xml) and (file2.xml). I have attached differences also which
>> it gives. I find these differences by parsing files.
> Instead of dropping two files on the list, why don't you tell us what
> the differences are (in general). It's fine to provide full the full
> data to us, but don't make us wade-through it just ti get our bearings.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAlAkBM4ACgkQ9CaO5/Lv0PABkwCgwBrx7e3igfv6LC+hANm67WB+
> 9/EAnj6epnxfOnlATp5IJmkotFXFQtDB
> =n8DM
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
Hi Chris,
Actually I could not understand the exact differences and why they
exist. But in general it seems that sequence of methods which starts
from org/apache/catalina/startup/HostConfig$DeployWar;" name="run", and
org/hsqldb/store/HashIndex;" name="getNextLookup differes in both the
files. I have uploaded the differences file ("abranchdifferences") also.
So If you kindly have look on few of it, you might get some idea.
Thanks and Regards.
Ragini.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Profiling tomcat with java profiler
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ragini,
On 8/9/12 5:51 AM, Ragini wrote:
> what my profiler profiles:- It gives me xml file containing list
> of methods in a proper sequence in which they were executed while
> running the server.
>
> *My question:* I do the above 3 steps 2 times in exactly same
> manner. So I have two output files say file1 and file2. I expected
> these files to be exactly same because I start the server, access
> the same application and stop the serever. But it seems that both
> files differ. I don't understand why. Could you please tell me why
> does it differ ? Are not methods of tomcat executed in exactly same
> manner for a same action ?
>
> Please find the files attach which I get two different files
> (file1.xml) and (file2.xml). I have attached differences also which
> it gives. I find these differences by parsing files.
Instead of dropping two files on the list, why don't you tell us what
the differences are (in general). It's fine to provide full the full
data to us, but don't make us wade-through it just ti get our bearings.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAlAkBM4ACgkQ9CaO5/Lv0PABkwCgwBrx7e3igfv6LC+hANm67WB+
9/EAnj6epnxfOnlATp5IJmkotFXFQtDB
=n8DM
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org