From owner-freebsd-dtrace@FreeBSD.ORG Wed Jun 17 22:20:40 2015 Return-Path: Delivered-To: freebsd-dtrace@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1E258AF for ; Wed, 17 Jun 2015 22:20:40 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qg0-x231.google.com (mail-qg0-x231.google.com [IPv6:2607:f8b0:400d:c04::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B79A1DD for ; Wed, 17 Jun 2015 22:20:40 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by qgf75 with SMTP id 75so20565829qgf.1 for ; Wed, 17 Jun 2015 15:20:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=b+iipNzLu1Vaav4lEEdmxxyKUrGqJM5zGgf5EmaTO0U=; b=bMPx5UMxKXpsBKdceXcvk5H9UMaWBncAbyJmGT2fjt5ssqM04NBjRf+XFNSQbQsQoH Qz73SNZmElw2nvqx984DJ+myg7hK+ZuBWrRfw9M3fsCbzgpgDpl/QWKrkEB3QcdUULte hwtWGoI891HkKGeec4jlVrCqoGXbN/1oetPAMW8ZvQkyY52vwZKTRr+e6cEUYuIpMAWX /t7uE3ICCOO6bY3Nh+1v8IKuw/cSQU6xrRSfJO30kpr9z/gxUbNHaStur43bcoZe+Jay r/Gg8qMR3FCaQq3T6PQrKB/BbVyBjwyqHiYm+UXLC8zoCyN7Xj9QadFQl+JDkA7qTmdx S4FA== X-Received: by 10.55.53.70 with SMTP id c67mr18205825qka.62.1434579638983; Wed, 17 Jun 2015 15:20:38 -0700 (PDT) Received: from muskytusk ([104.236.250.12]) by mx.google.com with ESMTPSA id p84sm2885268qkh.10.2015.06.17.15.20.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jun 2015 15:20:37 -0700 (PDT) Sender: Mark Johnston Date: Wed, 17 Jun 2015 22:20:04 +0000 From: Mark Johnston To: abhishek kulkarni Cc: freebsd-dtrace@freebsd.org Subject: Re: Aggregation in Dtrace Script Causing performance issues Message-ID: <20150617222004.GB34351@muskytusk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2015 22:20:40 -0000 On Wed, Jun 17, 2015 at 02:59:50PM -0700, abhishek kulkarni wrote: > Hello All, > > Iam Working on a Dtrace Script for the ping utility. The purpose is to > measure the CPU time for the current thread which is PING.We tried doing it > using an aggregation function and once while avoiding it.We observed the > times for a ping response, for both scripts. The response was roughly > taking thrice the time ( around 3.519 ms ) when an aggregation function > was used as against a script not using aggregation ( which took around > 0.219 ms ) . Could this be explained in detail.I believe, Dtrace , being > considered a lightweight tool shouldnt affect the performance upto such an > extent. I tried both scripts on an otherwise mostly-idle system and didn't observe any significant latency difference between the two, or with ping latency when DTrace is not in use at all. Does your experiment produce the same result reliably?