How to understand, what userland program does in kernel?

Andriy Gapon avg at FreeBSD.org
Wed May 4 13:18:16 UTC 2011


on 04/05/2011 15:49 Lev Serebryakov said the following:
> Hello, Freebsd-stable.
> 
>   I have userland program (transmission BT client), which spent 100%
> of one core of E4500 CPU when it has many peers. It is surprises me,
> as channel is only 35Mbit, and my "Linux" friends can upload much more
> on comparable hardware.
> 
>   But what surprises me even more, that 50% of this time it spends as
> System time.
> 
>   Is here any way to understand, what transmission does in kernel for
> so much time? It seems, that userland profiling doesn't help me, am I
> right?

ktrace can easily show you what system calls are made by your program and how much
time they take.  Maybe that would be sufficient for you.

-- 
Andriy Gapon


More information about the freebsd-stable mailing list