From owner-freebsd-performance@FreeBSD.ORG Wed Apr 15 10:30:37 2009 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2322B1065670 for ; Wed, 15 Apr 2009 10:30:37 +0000 (UTC) (envelope-from ntapfaq@gmail.com) Received: from mail-qy0-f132.google.com (mail-qy0-f132.google.com [209.85.221.132]) by mx1.freebsd.org (Postfix) with ESMTP id B5CA98FC13 for ; Wed, 15 Apr 2009 10:30:36 +0000 (UTC) (envelope-from ntapfaq@gmail.com) Received: by qyk38 with SMTP id 38so2631198qyk.3 for ; Wed, 15 Apr 2009 03:30:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=fmcD5wE7yVtDFXkVLmm00rdmnwF0PPDf9ujz/N/lCoE=; b=o2mDzJSQpvJVHnYj7Fvs1oxdDnFbiKjYsr4oBu5Gnk18M3anpusXdKP/xzTkfCk0+r Yzl74Gaw5E/D/6lJ6Mv7ei7WiIrCjQwD4li0VCfiNL5xvy6o3kQ9UIi90Koqz2vkg6oJ YTAs/n8zN9c4738B+M5mpsF0VTJTOQ63Su9VU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=MC/EY14NC80NotKRLrWB92wICn83I97ZeF5URaO4jpXA+Vict3h4asTrypXqQvNlUV LRN6p9ucBscJrTVuyFQU09L04WWjG7Rt/k6qzH7VFV5JVPpa+M4H2W9tsO2YcS+nmsoV bUj7tg/K4RE9Gb5V6GJvntJWvszC0L/gbLfs8= MIME-Version: 1.0 Received: by 10.229.85.21 with SMTP id m21mr8972qcl.9.1239789808958; Wed, 15 Apr 2009 03:03:28 -0700 (PDT) Date: Wed, 15 Apr 2009 15:33:28 +0530 Message-ID: <20ef3b320904150303x64c1665enf2aa2b24929ba86d@mail.gmail.com> From: ntap faq To: freebsd-performance@freebsd.org Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Q on Flat profiling X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2009 10:30:39 -0000 Hi, I am doing flat profiling for custom kernel code on hardware with multiple CPUs. Just wanted to verify if i am doing things correctly. If your=92e still interested, read on. The way I collect the gmon.* files i= s by doing: For each CPU [0..3] { #switch cpu by using sysctl=85. kgmon =96r # reset kgmon =96b # start } (sleep for 1min/10mins and let the code do its job) For each CPU [0..3] { #switch cpu by using sysctl=85. kgmon =96h # stop } #dumps the gmon.* files which I make sense with by using gprof. For 1 min delays, I get smooth , consistent sampling profiles: *Sampling when profiling ios done for 60 seconds/1min* gprof.out.0.4:granularity: each sample hit covers 16 byte(s) for 0.00% of 65.06 seconds gprof.out.1.4:granularity: each sample hit covers 16 byte(s) for 0.00% of 65.02 seconds gprof.out.2.4:granularity: each sample hit covers 16 byte(s) for 0.00% of 65.05 seconds gprof.out.3.4:granularity: each sample hit covers 16 byte(s) for 0.00% of 65.12 seconds It turns out that the sampling numbers are skewed once the sampling time goes to 10mins=85 *Sampling when profiling ios done for 600 seconds/10mins* gprof.out.0:granularity: each sample hit covers 16 byte(s) for 0.00% of 304.74 seconds gprof.out.1:granularity: each sample hit covers 16 byte(s) for 0.00% of 403.11 seconds gprof.out.2granularity: each sample hit covers 16 byte(s) for 0.00% of 501.55 seconds gprof.out.3:granularity: each sample hit covers 16 byte(s) for 0.00% of 206.47 seconds No I cant fathom why=85 if you do have any idea why, I=92d appreciate it. Thanks rohit