Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » piAgent don't scale
piAgent don't scale [message #10577] Thu, 17 March 2005 12:40 Go to next message
Luca Di Stefano is currently offline Luca Di Stefano
Messages: 41
Registered: July 2009
Member
Hi,

I should trace the execution time of an api (call we that method
'doIt'). If this method, inside call 1 other method, you get from
piAgent an execution time of 100ms. If calls 100 methods, the execution
time is 1000ms.
The problem is that the execution time taken without piAgent (using
currenttimemillis) for first case is higher than the second, because the
100 calls are faster that the single one (obviously very different
implementation).

It seems that there is a great overhead that is linear on the number of
the method invocations.

Note that I tried filtering only the 'doIt' method, but the overhead
still remains.

So is impossible to compare api that uses behind different architectures
with hyades?

best regards,

Luca
Re: piAgent don't scale [message #12487 is a reply to message #10577] Tue, 29 March 2005 10:47 Go to previous messageGo to next message
Luca Di Stefano is currently offline Luca Di Stefano
Messages: 41
Registered: July 2009
Member
Hi,

Luca Di Stefano wrote:
> Hi,
>
> I should trace the execution time of an api (call we that method
> 'doIt'). If this method, inside call 1 other method, you get from
> piAgent an execution time of 100ms. If calls 100 methods, the execution
> time is 1000ms.
> The problem is that the execution time taken without piAgent (using
> currenttimemillis) for first case is higher than the second, because the
> 100 calls are faster that the single one (obviously very different
> implementation).
>
> It seems that there is a great overhead that is linear on the number of
> the method invocations.
>
> Note that I tried filtering only the 'doIt' method, but the overhead
> still remains.
>
> So is impossible to compare api that uses behind different architectures
> with hyades?
>
> best regards,
>
> Luca
>

I said something wrong? No one have comments for that?

thanks anyway,

Luca
Re: piAgent don't scale [message #12528 is a reply to message #12487] Tue, 29 March 2005 20:42 Go to previous messageGo to next message
Samson Wai is currently offline Samson Wai
Messages: 46
Registered: July 2009
Member
Hmm... I am having some trouble understanding the problem. Correct me if I
am wrong.

When running with "-XrunpiAgent":
doIt() -> call 1 method -> total time reported for doIt() is 100ms
doIt() -> call 100 method -> total time reported for doIt() is 1000ms

When running without "-XrunpiAgent" (and use currenttimemillis() instead):
doIt() -> call 1 method -> total time reported for doIt() is "x"ms
doIt() -> call 100 method -> total time reported for doIt() is "y"ms where
(y < x)? This doesn't sound right...

Samson

"Luca Di Stefano" <luca.distefano@wuerth-phoenix.com> wrote in message
news:d2bbpa$t12$2@news.eclipse.org...
> Hi,
>
> Luca Di Stefano wrote:
> > Hi,
> >
> > I should trace the execution time of an api (call we that method
> > 'doIt'). If this method, inside call 1 other method, you get from
> > piAgent an execution time of 100ms. If calls 100 methods, the execution
> > time is 1000ms.
> > The problem is that the execution time taken without piAgent (using
> > currenttimemillis) for first case is higher than the second, because the
> > 100 calls are faster that the single one (obviously very different
> > implementation).
> >
> > It seems that there is a great overhead that is linear on the number of
> > the method invocations.
> >
> > Note that I tried filtering only the 'doIt' method, but the overhead
> > still remains.
> >
> > So is impossible to compare api that uses behind different architectures
> > with hyades?
> >
> > best regards,
> >
> > Luca
> >
>
> I said something wrong? No one have comments for that?
>
> thanks anyway,
>
> Luca
Re: piAgent don't scale [message #12549 is a reply to message #12528] Tue, 29 March 2005 21:29 Go to previous messageGo to next message
Andy Kaylor is currently offline Andy Kaylor
Messages: 23
Registered: July 2009
Junior Member
If I understand Luca correctly, the problem is that the overhead of the
profiler makes it impossible to evaluate algorithms that involve large
numbers of method invocations.

I that right?

"Samson Wai" <samwai@ca.ibm.com> wrote in message
news:d2celk$j2v$1@news.eclipse.org...
> Hmm... I am having some trouble understanding the problem. Correct me if I
> am wrong.
>
> When running with "-XrunpiAgent":
> doIt() -> call 1 method -> total time reported for doIt() is 100ms
> doIt() -> call 100 method -> total time reported for doIt() is 1000ms
>
> When running without "-XrunpiAgent" (and use currenttimemillis() instead):
> doIt() -> call 1 method -> total time reported for doIt() is "x"ms
> doIt() -> call 100 method -> total time reported for doIt() is "y"ms where
> (y < x)? This doesn't sound right...
>
> Samson
>
> "Luca Di Stefano" <luca.distefano@wuerth-phoenix.com> wrote in message
> news:d2bbpa$t12$2@news.eclipse.org...
> > Hi,
> >
> > Luca Di Stefano wrote:
> > > Hi,
> > >
> > > I should trace the execution time of an api (call we that method
> > > 'doIt'). If this method, inside call 1 other method, you get from
> > > piAgent an execution time of 100ms. If calls 100 methods, the
execution
> > > time is 1000ms.
> > > The problem is that the execution time taken without piAgent (using
> > > currenttimemillis) for first case is higher than the second, because
the
> > > 100 calls are faster that the single one (obviously very different
> > > implementation).
> > >
> > > It seems that there is a great overhead that is linear on the number
of
> > > the method invocations.
> > >
> > > Note that I tried filtering only the 'doIt' method, but the overhead
> > > still remains.
> > >
> > > So is impossible to compare api that uses behind different
architectures
> > > with hyades?
> > >
> > > best regards,
> > >
> > > Luca
> > >
> >
> > I said something wrong? No one have comments for that?
> >
> > thanks anyway,
> >
> > Luca
>
>
Re: piAgent don't scale [message #12630 is a reply to message #12528] Wed, 30 March 2005 13:22 Go to previous messageGo to next message
Luca Di Stefano is currently offline Luca Di Stefano
Messages: 41
Registered: July 2009
Member
Hi,

Samson Wai wrote:
> Hmm... I am having some trouble understanding the problem. Correct me if I
> am wrong.
>
> When running with "-XrunpiAgent":
> doIt() -> call 1 method -> total time reported for doIt() is 100ms
> doIt() -> call 100 method -> total time reported for doIt() is 1000ms
>
> When running without "-XrunpiAgent" (and use currenttimemillis() instead):
> doIt() -> call 1 method -> total time reported for doIt() is "x"ms
> doIt() -> call 100 method -> total time reported for doIt() is "y"ms where
> (y < x)? This doesn't sound right...
>
it is so.
I should say that in the first case (doit() with 1 method invocation)
jni functions are involved, in the second is all 100% pure java. Maybe
that is the problem?

thanks,

Luca
> Samson
>
> "Luca Di Stefano" <luca.distefano@wuerth-phoenix.com> wrote in message
> news:d2bbpa$t12$2@news.eclipse.org...
>
>>Hi,
>>
>>Luca Di Stefano wrote:
>>
>>>Hi,
>>>
>>>I should trace the execution time of an api (call we that method
>>>'doIt'). If this method, inside call 1 other method, you get from
>>>piAgent an execution time of 100ms. If calls 100 methods, the execution
>>>time is 1000ms.
>>>The problem is that the execution time taken without piAgent (using
>>>currenttimemillis) for first case is higher than the second, because the
>>>100 calls are faster that the single one (obviously very different
>>>implementation).
>>>
>>>It seems that there is a great overhead that is linear on the number of
>>>the method invocations.
>>>
>>>Note that I tried filtering only the 'doIt' method, but the overhead
>>>still remains.
>>>
>>>So is impossible to compare api that uses behind different architectures
>>>with hyades?
>>>
>>>best regards,
>>>
>>>Luca
>>>
>>
>>I said something wrong? No one have comments for that?
>>
>>thanks anyway,
>>
>>Luca
>
>
>
Re: piAgent don't scale [message #12649 is a reply to message #12549] Wed, 30 March 2005 13:24 Go to previous messageGo to next message
Luca Di Stefano is currently offline Luca Di Stefano
Messages: 41
Registered: July 2009
Member
Hi,
Andy Kaylor wrote:
> If I understand Luca correctly, the problem is that the overhead of the
> profiler makes it impossible to evaluate algorithms that involve large
> numbers of method invocations.
>
> I that right?
>

it seems to be so.

thanks,

Luca
> "Samson Wai" <samwai@ca.ibm.com> wrote in message
> news:d2celk$j2v$1@news.eclipse.org...
>
>>Hmm... I am having some trouble understanding the problem. Correct me if I
>>am wrong.
>>
>>When running with "-XrunpiAgent":
>>doIt() -> call 1 method -> total time reported for doIt() is 100ms
>>doIt() -> call 100 method -> total time reported for doIt() is 1000ms
>>
>>When running without "-XrunpiAgent" (and use currenttimemillis() instead):
>>doIt() -> call 1 method -> total time reported for doIt() is "x"ms
>>doIt() -> call 100 method -> total time reported for doIt() is "y"ms where
>>(y < x)? This doesn't sound right...
>>
>>Samson
>>
>>"Luca Di Stefano" <luca.distefano@wuerth-phoenix.com> wrote in message
>>news:d2bbpa$t12$2@news.eclipse.org...
>>
>>>Hi,
>>>
>>>Luca Di Stefano wrote:
>>>
>>>>Hi,
>>>>
>>>>I should trace the execution time of an api (call we that method
>>>>'doIt'). If this method, inside call 1 other method, you get from
>>>>piAgent an execution time of 100ms. If calls 100 methods, the
>
> execution
>
>>>>time is 1000ms.
>>>>The problem is that the execution time taken without piAgent (using
>>>>currenttimemillis) for first case is higher than the second, because
>
> the
>
>>>>100 calls are faster that the single one (obviously very different
>>>>implementation).
>>>>
>>>>It seems that there is a great overhead that is linear on the number
>
> of
>
>>>>the method invocations.
>>>>
>>>>Note that I tried filtering only the 'doIt' method, but the overhead
>>>>still remains.
>>>>
>>>>So is impossible to compare api that uses behind different
>
> architectures
>
>>>>with hyades?
>>>>
>>>>best regards,
>>>>
>>>>Luca
>>>>
>>>
>>>I said something wrong? No one have comments for that?
>>>
>>>thanks anyway,
>>>
>>>Luca
>>
>>
>
>
Re: piAgent don't scale [message #12761 is a reply to message #12630] Thu, 31 March 2005 20:58 Go to previous messageGo to next message
Samson Wai is currently offline Samson Wai
Messages: 46
Registered: July 2009
Member
You are right about the JNI overhead. From the stats, the first call always
take the longest. The piAgent uses an internal hash table for storing
profiling information such as stacks, class loads, method, etc. and all
these are being populated when a class is first loaded and/or a method is
first called. That's why it is showing the first method took 100ms to
complete while the other 99 subsequent method takes (900/99) = 9.09ms to
complete.

Samson


"Luca Di Stefano" <luca.distefano@wuerth-phoenix.com> wrote in message
news:d2e99f$vee$1@news.eclipse.org...
> Hi,
>
> Samson Wai wrote:
> > Hmm... I am having some trouble understanding the problem. Correct me if
I
> > am wrong.
> >
> > When running with "-XrunpiAgent":
> > doIt() -> call 1 method -> total time reported for doIt() is 100ms
> > doIt() -> call 100 method -> total time reported for doIt() is 1000ms
> >
> > When running without "-XrunpiAgent" (and use currenttimemillis()
instead):
> > doIt() -> call 1 method -> total time reported for doIt() is "x"ms
> > doIt() -> call 100 method -> total time reported for doIt() is "y"ms
where
> > (y < x)? This doesn't sound right...
> >
> it is so.
> I should say that in the first case (doit() with 1 method invocation)
> jni functions are involved, in the second is all 100% pure java. Maybe
> that is the problem?
>
> thanks,
>
> Luca
> > Samson
> >
> > "Luca Di Stefano" <luca.distefano@wuerth-phoenix.com> wrote in message
> > news:d2bbpa$t12$2@news.eclipse.org...
> >
> >>Hi,
> >>
> >>Luca Di Stefano wrote:
> >>
> >>>Hi,
> >>>
> >>>I should trace the execution time of an api (call we that method
> >>>'doIt'). If this method, inside call 1 other method, you get from
> >>>piAgent an execution time of 100ms. If calls 100 methods, the execution
> >>>time is 1000ms.
> >>>The problem is that the execution time taken without piAgent (using
> >>>currenttimemillis) for first case is higher than the second, because
the
> >>>100 calls are faster that the single one (obviously very different
> >>>implementation).
> >>>
> >>>It seems that there is a great overhead that is linear on the number of
> >>>the method invocations.
> >>>
> >>>Note that I tried filtering only the 'doIt' method, but the overhead
> >>>still remains.
> >>>
> >>>So is impossible to compare api that uses behind different
architectures
> >>>with hyades?
> >>>
> >>>best regards,
> >>>
> >>>Luca
> >>>
> >>
> >>I said something wrong? No one have comments for that?
> >>
> >>thanks anyway,
> >>
> >>Luca
> >
> >
> >
Re: piAgent don't scale [message #12783 is a reply to message #12761] Fri, 01 April 2005 09:52 Go to previous message
Luca Di Stefano is currently offline Luca Di Stefano
Messages: 41
Registered: July 2009
Member
Hi Samson,

Samson Wai wrote:
> You are right about the JNI overhead. From the stats, the first call always
> take the longest. The piAgent uses an internal hash table for storing
> profiling information such as stacks, class loads, method, etc. and all
> these are being populated when a class is first loaded and/or a method is
> first called. That's why it is showing the first method took 100ms to
> complete while the other 99 subsequent method takes (900/99) = 9.09ms to
> complete.
>
Thanks for your clear answer.
There is a way to avoid this behavior for tracing java using JNI?

Thanks,

Luca

> Samson
>
>
> "Luca Di Stefano" <luca.distefano@wuerth-phoenix.com> wrote in message
> news:d2e99f$vee$1@news.eclipse.org...
>
>>Hi,
>>
>>Samson Wai wrote:
>>
>>>Hmm... I am having some trouble understanding the problem. Correct me if
>
> I
>
>>>am wrong.
>>>
>>>When running with "-XrunpiAgent":
>>>doIt() -> call 1 method -> total time reported for doIt() is 100ms
>>>doIt() -> call 100 method -> total time reported for doIt() is 1000ms
>>>
>>>When running without "-XrunpiAgent" (and use currenttimemillis()
>
> instead):
>
>>>doIt() -> call 1 method -> total time reported for doIt() is "x"ms
>>>doIt() -> call 100 method -> total time reported for doIt() is "y"ms
>
> where
>
>>>(y < x)? This doesn't sound right...
>>>
>>
>>it is so.
>>I should say that in the first case (doit() with 1 method invocation)
>>jni functions are involved, in the second is all 100% pure java. Maybe
>>that is the problem?
>>
>>thanks,
>>
>>Luca
>>
>>>Samson
>>>
>>>"Luca Di Stefano" <luca.distefano@wuerth-phoenix.com> wrote in message
>>>news:d2bbpa$t12$2@news.eclipse.org...
>>>
>>>
>>>>Hi,
>>>>
>>>>Luca Di Stefano wrote:
>>>>
>>>>
>>>>>Hi,
>>>>>
>>>>>I should trace the execution time of an api (call we that method
>>>>>'doIt'). If this method, inside call 1 other method, you get from
>>>>>piAgent an execution time of 100ms. If calls 100 methods, the execution
>>>>>time is 1000ms.
>>>>>The problem is that the execution time taken without piAgent (using
>>>>>currenttimemillis) for first case is higher than the second, because
>
> the
>
>>>>>100 calls are faster that the single one (obviously very different
>>>>>implementation).
>>>>>
>>>>>It seems that there is a great overhead that is linear on the number of
>>>>>the method invocations.
>>>>>
>>>>>Note that I tried filtering only the 'doIt' method, but the overhead
>>>>>still remains.
>>>>>
>>>>>So is impossible to compare api that uses behind different
>
> architectures
>
>>>>>with hyades?
>>>>>
>>>>>best regards,
>>>>>
>>>>>Luca
>>>>>
>>>>
>>>>I said something wrong? No one have comments for that?
>>>>
>>>>thanks anyway,
>>>>
>>>>Luca
>>>
>>>
>>>
>
>
Previous Topic:How can I start?
Next Topic:Porting Custom Test Exec Demo to TPTP 4.0
Goto Forum:
  


Current Time: Sat Oct 25 11:32:34 GMT 2014

Powered by FUDForum. Page generated in 0.11206 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software