From owner-freebsd-stable@FreeBSD.ORG Wed May 4 13:18:52 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F1721065754 for ; Wed, 4 May 2011 13:18:52 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 3E7CD8FC1E for ; Wed, 4 May 2011 13:18:52 +0000 (UTC) Received: from outgoing.leidinger.net (p5B155BB6.dip.t-dialin.net [91.21.91.182]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 2DEE0844010; Wed, 4 May 2011 15:18:38 +0200 (CEST) Received: from webmail.leidinger.net (webmail.Leidinger.net [IPv6:fd73:10c7:2053:1::2:102]) by outgoing.leidinger.net (Postfix) with ESMTP id 3B92D11DD; Wed, 4 May 2011 15:18:35 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.13.8/Submit) id p44DIZ3l054047; Wed, 4 May 2011 15:18:35 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Wed, 04 May 2011 15:18:35 +0200 Message-ID: <20110504151835.10858df55klyghf4@webmail.leidinger.net> Date: Wed, 04 May 2011 15:18:35 +0200 From: Alexander Leidinger To: lev@FreeBSD.org References: <455293202.20110504164901@serebryakov.spb.ru> In-Reply-To: <455293202.20110504164901@serebryakov.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.6) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 2DEE0844010.AFE34 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=0, required 6, autolearn=disabled) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1305119919.56075@3fBHYaJBMf6KqRqSZUMJBA X-EBL-Spam-Status: No Cc: freebsd-stable@FreeBSD.org Subject: Re: How to understand, what userland program does in kernel? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 13:18:52 -0000 Quoting Lev Serebryakov (from Wed, 4 May 2011 16:49:01 +0400): > 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 and dtrace are your friends. ktrace for a simple "it makes those syscalls/ioctls/..." type of information gathering, and dtrace for in-deep investigation. Bye, Alexander. -- The difference between a good haircut and a bad one is seven days. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137