Skip to contentSkip to conversation

Measuring per thread CPU consumption & others statistics for NPTL

DISCUSSION Peter Zaitsev 3 participants 4 messages Nov 16, 2003 – Nov 20, 2003

lore
Share & tools
lore
#0 lore raw

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.

Signature · 4 lines
Peter Zaitsev, Full-Time Developer
MySQL AB, www.mysql.com

Are you MySQL certified?  www.mysql.com/certification
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Zaitsev <[email protected]> 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

#2 lore raw
Quoted 7 lines · Peter Chubb

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 ?

Signature · 4 lines
Peter Zaitsev, Full-Time Developer
MySQL AB, www.mysql.com

Are you MySQL certified?  www.mysql.com/certification
#3 lore raw
In reply to Peter Chubb
Quoted 6 lines · Peter Chubb
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Zaitsev <[email protected]> writes:

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

Quoted 6 lines

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

Quoted 6 lines

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