public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Measuring per thread CPU consumption & others statistics for NPTL
@ 2003-11-16 16:10 Peter Zaitsev
  2003-11-17  0:27 ` Peter Chubb
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Zaitsev @ 2003-11-16 16:10 UTC (permalink / raw)
  To: linux-kernel

Dear Kernel developers,

I would wish to add to MySQL profiling of CPU and system usage, which
would allow for example to see amount of system/user CPU needed to
process particular query as well as amount of IO needed.

With LinuxThreads I probably can use times() or getrusage() for this
purpose, as Threads share a lot of infrastructure with processes. 

This however would not work with NPTL threads.


Are there any ways to get similar information for thread rather than
process ?

Second question is about accuracy -  Is any way to get system/user CPU
consumption information with more than 1/100 sec accuracy ?

Thank you for your advices.

-- 
Peter Zaitsev, Full-Time Developer
MySQL AB, www.mysql.com

Are you MySQL certified?  www.mysql.com/certification


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

* Re: Measuring per thread CPU consumption & others statistics for NPTL
  2003-11-16 16:10 Peter Zaitsev
@ 2003-11-17  0:27 ` Peter Chubb
  2003-11-17  9:25   ` Peter Zaitsev
  2003-11-20 18:02   ` Herbert Poetzl
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Chubb @ 2003-11-17  0:27 UTC (permalink / raw)
  To: Peter Zaitsev; +Cc: linux-kernel

>>>>> "Peter" == Peter Zaitsev <peter@mysql.com> writes:


Peter> Are there any ways to get similar information for thread rather
Peter> than process ?

Peter> Second question is about accuracy - Is any way to get
Peter> system/user CPU consumption information with more than 1/100
Peter> sec accuracy ?

If you apply my microstate accounting patch, you can get nanosecomnd
resolution per thread.

Peter C

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

* Re: Measuring per thread CPU consumption & others statistics for NPTL
  2003-11-17  0:27 ` Peter Chubb
@ 2003-11-17  9:25   ` Peter Zaitsev
  2003-11-20 18:02   ` Herbert Poetzl
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Zaitsev @ 2003-11-17  9:25 UTC (permalink / raw)
  To: Peter Chubb; +Cc: linux-kernel

On Mon, 2003-11-17 at 03:27, Peter Chubb wrote:

> 
> Peter> Second question is about accuracy - Is any way to get
> Peter> system/user CPU consumption information with more than 1/100
> Peter> sec accuracy ?
> 
> If you apply my microstate accounting patch, you can get nanosecomnd
> resolution per thread.

Great Peter,

Is it planned to be included in the kernel at some point ?
For me it is the most important not to get things working on some
particular test systems, but to allow customers, which run generic or
vendor provided kernels to use the functionality.

Does your patch only computes statistics on per process basics or per
thread as well ?


-- 
Peter Zaitsev, Full-Time Developer
MySQL AB, www.mysql.com

Are you MySQL certified?  www.mysql.com/certification


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

* Re: Measuring per thread CPU consumption & others statistics for NPTL
       [not found]   ` <SNSi.6vN.39@gated-at.bofh.it>
@ 2003-11-17 16:36     ` John Reiser
  0 siblings, 0 replies; 5+ messages in thread
From: John Reiser @ 2003-11-17 16:36 UTC (permalink / raw)
  To: peter; +Cc: linux-kernel

Peter Zaitsev wrote:
> On Mon, 2003-11-17 at 03:27, Peter Chubb wrote:
>>If you apply my microstate accounting patch, you can get nanosecomnd
>>resolution per thread.
> 
> Is it planned to be included in the kernel at some point ?
> For me it is the most important not to get things working on some
> particular test systems, but to allow customers, which run generic or
> vendor provided kernels to use the functionality.

The current 2.6.0-test9-bk22 has no microsecond-or-finer per-thread
accounting, so based on current policy and past experience you may
have to wait two years.

A leading contender for x86 and x86_64 is the perfctr patches
http://www.csd.uu.se/~mikpe/linux/perfctr/  which have been maintained
for a number of years (v1.0 at 2000-01-31 for Linux 2.2.14/2.3.41) and
have a following, including  http://icl.cs.utk.edu/projects/papi/ .
A recent patched, ready-to-install NPTL kernel happens to reside at
http://www.BitWagon.com/ftp/kernel-smp-2.4.20-20.9.perfctr2.5.5.i686.rpm .

For a complete profiler:  http://www.BitWagon.com/tsprof/tsprof.html
which also will run on a generic kernel in "-wallclock" mode
(TSC cycle accuracy, but not virtualized.)

-- 




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

* Re: Measuring per thread CPU consumption & others statistics for NPTL
  2003-11-17  0:27 ` Peter Chubb
  2003-11-17  9:25   ` Peter Zaitsev
@ 2003-11-20 18:02   ` Herbert Poetzl
  1 sibling, 0 replies; 5+ messages in thread
From: Herbert Poetzl @ 2003-11-20 18:02 UTC (permalink / raw)
  To: Peter Chubb; +Cc: Peter Zaitsev, linux-kernel

On Mon, Nov 17, 2003 at 11:27:17AM +1100, Peter Chubb wrote:
> >>>>> "Peter" == Peter Zaitsev <peter@mysql.com> writes:
> 
> 
> Peter> Are there any ways to get similar information for thread rather
> Peter> than process ?
> 
> Peter> Second question is about accuracy - Is any way to get
> Peter> system/user CPU consumption information with more than 1/100
> Peter> sec accuracy ?
> 
> If you apply my microstate accounting patch, you can get nanosecomnd
> resolution per thread.

is there a version for 2.4 available?

TIA,
Herbert

> Peter C
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

end of thread, other threads:[~2003-11-20 18:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <SxNf.4R.13@gated-at.bofh.it>
     [not found] ` <SFro.3ee.13@gated-at.bofh.it>
     [not found]   ` <SNSi.6vN.39@gated-at.bofh.it>
2003-11-17 16:36     ` Measuring per thread CPU consumption & others statistics for NPTL John Reiser
2003-11-16 16:10 Peter Zaitsev
2003-11-17  0:27 ` Peter Chubb
2003-11-17  9:25   ` Peter Zaitsev
2003-11-20 18:02   ` Herbert Poetzl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox