All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about the performance of LTTng-UST
@ 2012-07-25  9:38 changz
  0 siblings, 0 replies; 3+ messages in thread
From: changz @ 2012-07-25  9:38 UTC (permalink / raw)
  To: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 673 bytes --]

Hi All,

I wrote a very simple test code like this:

         for (i = 0; i < 0xffffff; i++) {
                 tracepoint(sample_component, message, "This is a 
performance test:","main",i);
         }

And then I started lttng and ran the test code:
time  ./test
real0m16.120s
user0m8.280s
sys0m7.789s

 From the result of time output, you can see sys time is about half of 
the whole run-time. I wondered where the cost was from.
So I used strace to track it and found amount of system calls (get_cpu 
and clock_gettime) during the run-time.
I know these system calls are used for ring-buffer. But I just think the 
cost is a little heavy.

What do you think?

BR
Zheng

[-- Attachment #1.2: Type: text/html, Size: 8052 bytes --]

[-- Attachment #2: Type: text/plain, Size: 155 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question about the performance of LTTng-UST
       [not found] ` <20120725132937.GA14530@Krystal>
@ 2012-07-26  4:54   ` changz
  0 siblings, 0 replies; 3+ messages in thread
From: changz @ 2012-07-26  4:54 UTC (permalink / raw)
  To: Mathieu Desnoyers; +Cc: lttng-dev

On 7/25/2012 21:29 PM, Mathieu Desnoyers wrote:
> * changz (zheng.chang@emc.com) wrote:
>> Hi All,
>>
>> I wrote a very simple test code like this:
>>
>>          for (i = 0; i < 0xffffff; i++) {
>>                  tracepoint(sample_component, message, "This is a
>> performance test:","main",i);
>>          }
>>
>> And then I started lttng and ran the test code:
>> time  ./test
>> real0m16.120s
> This is indeed very high (96 microsecond per event). There is something
> wrong with your system (what architecture, kernel version do you use ?
> Getting you dmesg log would be useful too, especially to find out which
> clock source your kernel uses. Also, are you in a virtualized
> environment ? If yes, which ?)
Mathieu,

My OS is a X86 linux kernel 2.6.38 running on Vmware workstation for 
windows.
linux-gate.so was linked to my test code.
And here is a message found in dmesg output:
[2.228750] Switching to clocksource tsc

I found a benchmark data about vmware system call. It says the 
virtualization can cause ten times delay than it runs on host directly.
So I guess that's the reason why my test code ran slowly.

Could you provide more info about the impact introduced by different 
clock sources?

Thanks
Zheng
>> user0m8.280s
>> sys0m7.789s
>>
>>  From the result of time output, you can see sys time is about half of
>> the whole run-time. I wondered where the cost was from.
>> So I used strace to track it and found amount of system calls (get_cpu
>> and clock_gettime) during the run-time.
>> I know these system calls are used for ring-buffer. But I just think the
>> cost is a little heavy.
>>
>> What do you think?
> On x86, these calls are done through a kernel vDSO. Having those showing
> up in strace tells me that you kernel might be quite old, or use use an
> architecture that implements those as standard system calls rather than
> vDSO.
>
> Thanks,
>
> Mathieu
>
>> BR
>> Zheng
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev@lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question about the performance of LTTng-UST
       [not found] <500FBEB3.8070106@emc.com>
@ 2012-07-25 13:29 ` Mathieu Desnoyers
       [not found] ` <20120725132937.GA14530@Krystal>
  1 sibling, 0 replies; 3+ messages in thread
From: Mathieu Desnoyers @ 2012-07-25 13:29 UTC (permalink / raw)
  To: changz; +Cc: lttng-dev

* changz (zheng.chang@emc.com) wrote:
> Hi All,
>
> I wrote a very simple test code like this:
>
>         for (i = 0; i < 0xffffff; i++) {
>                 tracepoint(sample_component, message, "This is a  
> performance test:","main",i);
>         }
>
> And then I started lttng and ran the test code:
> time  ./test
> real0m16.120s

This is indeed very high (96 microsecond per event). There is something
wrong with your system (what architecture, kernel version do you use ?
Getting you dmesg log would be useful too, especially to find out which
clock source your kernel uses. Also, are you in a virtualized
environment ? If yes, which ?)

> user0m8.280s
> sys0m7.789s
>
> From the result of time output, you can see sys time is about half of  
> the whole run-time. I wondered where the cost was from.
> So I used strace to track it and found amount of system calls (get_cpu  
> and clock_gettime) during the run-time.
> I know these system calls are used for ring-buffer. But I just think the  
> cost is a little heavy.
>
> What do you think?

On x86, these calls are done through a kernel vDSO. Having those showing
up in strace tells me that you kernel might be quite old, or use use an
architecture that implements those as standard system calls rather than
vDSO.

Thanks,

Mathieu

>
> BR
> Zheng

> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-26  4:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-25  9:38 Question about the performance of LTTng-UST changz
     [not found] <500FBEB3.8070106@emc.com>
2012-07-25 13:29 ` Mathieu Desnoyers
     [not found] ` <20120725132937.GA14530@Krystal>
2012-07-26  4:54   ` changz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.