From patchwork Fri Sep 2 21:58:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil McKee X-Patchwork-Id: 665351 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3sQtL93TbMz9s8x for ; Sat, 3 Sep 2016 07:58:41 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=inmon-com.20150623.gappssmtp.com header.i=@inmon-com.20150623.gappssmtp.com header.b=tFdbv4U3; dkim-atps=neutral Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 0112C10C3B; Fri, 2 Sep 2016 14:58:40 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e4.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 8DB9510C3A for ; Fri, 2 Sep 2016 14:58:38 -0700 (PDT) Received: from bar5.cudamail.com (unknown [192.168.21.12]) by mx1e4.cudamail.com (Postfix) with ESMTPS id ED3511E049E for ; Fri, 2 Sep 2016 15:58:37 -0600 (MDT) X-ASG-Debug-ID: 1472853517-09eadd335739e020001-byXFYA Received: from mx1-pf1.cudamail.com ([192.168.24.1]) by bar5.cudamail.com with ESMTP id BgJnB4FNsgG5ljGH (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 02 Sep 2016 15:58:37 -0600 (MDT) X-Barracuda-Envelope-From: neil.mckee@inmon.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.1 Received: from unknown (HELO mail-yb0-f173.google.com) (209.85.213.173) by mx1-pf1.cudamail.com with ESMTPS (AES128-SHA encrypted); 2 Sep 2016 21:58:36 -0000 Received-SPF: pass (mx1-pf1.cudamail.com: SPF record at _netblocks.google.com designates 209.85.213.173 as permitted sender) X-Barracuda-RBL-Trusted-Forwarder: 209.85.213.173 Received: by mail-yb0-f173.google.com with SMTP id x93so44160036ybh.1 for ; Fri, 02 Sep 2016 14:58:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inmon-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=eWMa7UkB70vDpMs9/abtBdV/T0OjPT0mXJtaCXkSopk=; b=tFdbv4U3hE1Ynu9Iqz79fFnKrQuQBLoEAuAoKMyO9Q8/MlixxFho11z2UefXVi3M8S o+kVl9FU/+hty0acI2DpIkJwPCSvx5tZNTPfytoxtyx241pkvqI+XW1AgUCVDSa2Hkbp vpydsqKUQyR8pOAW8BpmQLKbksvRd+5YBCOZBxEP2XcWKlg3kTcwkPC6O3o1bfY0WOwH vuSsCHkH/0Qu+pTxYv4Azzk4ftAvcG5slOHCAMCLA2Nev5eTqemIk+TVoD7rbevI/jIr k3k8CziIVQD/hTP5kZL2Cxu5puRdCQpp+DXK3JetzNFjaz4aRiH4ECivJdVYNAvamupG IzeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=eWMa7UkB70vDpMs9/abtBdV/T0OjPT0mXJtaCXkSopk=; b=Gkg2TcClA3QAUUkaWcn9DTn076NQN0qHkLktPJnFYdxMrWoQ9kDcY7iHobxlwHiMky BcPdtgxtexnO39wDHz7iMOEO4DTucCwQ8HSG1FUgSbrmO8ZXuktA39funDNHCzj2e1p9 /lb27BUojefxxBLlkkIwYI30wmE86cy0kEgocvM933jgp3ItlgSWyke1w9ZbA6NoJjCc 8NPQ2J/YFyUQx5zZyuV3kUMwhN9mE9xNOf1QGpsYPBnd/nHoZKaDH27O0VPyvcUliaU0 eCpyoMbD28znWJG0GWXtuJCn7bkm2Yt+MY/CUVPPDXpFnK5hSJZtrDLkkBENXSHN91DX NEZw== X-Gm-Message-State: AE9vXwPeMf2h301JgCG7XmIvQXUuM7+v5+NAKXUyG+5Idz/VgIrmgDx0iY2uarHD96ltRuMIg/JlSrH/j+4RBQ== X-Received: by 10.37.38.141 with SMTP id m135mr1580282ybm.145.1472853515624; Fri, 02 Sep 2016 14:58:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.163.131 with HTTP; Fri, 2 Sep 2016 14:58:15 -0700 (PDT) X-Originating-IP: [38.128.195.34] In-Reply-To: <20160902195146.GP16586@ovn.org> References: <20160902184742.GO16586@ovn.org> <20160902195146.GP16586@ovn.org> X-CudaMail-Envelope-Sender: neil.mckee@inmon.com From: Neil McKee Date: Fri, 2 Sep 2016 14:58:15 -0700 Message-ID: X-CudaMail-MID: CM-E1-901063230 X-CudaMail-DTE: 090216 X-CudaMail-Originating-IP: 209.85.213.173 To: Ben Pfaff X-ASG-Orig-Subj: [##CM-E1-901063230##]Re: [ovs-dev] [PATCH] Flush freshly-polled sFlow counters promptly. X-Barracuda-Connect: UNKNOWN[192.168.24.1] X-Barracuda-Start-Time: 1472853517 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.10 X-Barracuda-Spam-Status: No, SCORE=0.10 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_SC0_MISMATCH_TO, DKIM_SIGNED, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.32567 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 BSF_SC0_MISMATCH_TO Envelope rcpt doesn't match header 0.00 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS Cc: "dev@openvswitch.org" Subject: Re: [ovs-dev] [PATCH] Flush freshly-polled sFlow counters promptly. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@openvswitch.org Sender: "dev" Yes, the output is OK. In fact, if you change the time/warp in ofproto-dpif.at so that it only advances the monotonic clock by 2 seconds during the test instead of 3 (see below), then it flushes out the same number of counter samples, and the only differences that appear in tests/testsuite.dir/1075/testsuite.log are to the datagram sequence numbers for the counter samples. Very much as expected. ------ Neil McKee InMon Corp. http://www.inmon.com On Fri, Sep 2, 2016 at 12:51 PM, Ben Pfaff wrote: > I see the failing tests. > > If you can read the new results of the tests and verify for me that > they're still a correct set of results, then I'll push a fix that > updates the expected results. > > On Fri, Sep 02, 2016 at 12:03:21PM -0700, Neil McKee wrote: >> This one perturbs the output ordering just enough to fail two of the >> sflow unit tests. Sorry I didn't notice that before. I'll post >> another patch for that. >> >> Neil >> ------ >> Neil McKee >> InMon Corp. >> http://www.inmon.com >> >> >> On Fri, Sep 2, 2016 at 11:47 AM, Ben Pfaff wrote: >> > On Mon, Aug 29, 2016 at 03:32:41PM -0700, Neil McKee wrote: >> >> This patch changes the order of the steps that are followed >> >> every second in the sFlow agent. By moving the receiver_tick() >> >> step to the end, we ensure that any counters that were polled >> >> during the poller_tick() step are flushed immediately to the >> >> sFlow collector. This eliminates what was a variable time-delay >> >> between counters being polled and being flushed. >> >> >> >> The variable time-delay that this eliminates could be up to >> >> a second because counters lingering in the output buffer could be >> >> flushed at any time by the arrival of random packet-samples. >> >> >> >> Since the sFlow standard does not require that a poll-timestamp be sent >> >> along with the counters the collector must use his receive-time as the >> >> timestamp, so that extra second of variable delay was "stretching or >> >> shrinking" the time between successive counter readings. This >> >> affected any counter-rate calculation that was based only on the delta >> >> between sucessive samples. The effect was small with a polling >> >> interval of 60 seconds: just +/- 2%. But the effect grew larger >> >> when faster polling was configured. For example, if the counters >> >> were pushed every 5 seconds then the instantaneous rate >> >> calculations could wander by +/- 20%. For a thorough analysis >> >> of this problem, see Rick Jones' paper: >> >> >> >> "High Frequency sFlow v5 Counter Sampling" >> >> ftp://ftp.netperf.org/papers/high_freq_sflow/hf_sflow_counters.pdf >> >> >> >> So this patch makes it possible to obtain usable results even >> >> when high-frequency polling is configured. >> >> >> >> Signed-off-by: Neil McKee >> > >> > Thanks, applied to master and branch-2.6. diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index 8e5fde6..143c868 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -5267,7 +5267,7 @@ m4_define([CHECK_SFLOW_SAMPLING_PACKET], dnl sleep long enough to get more than one counter sample dnl from each datasource so we can check sequence numbers - ovs-appctl time/warp 3000 100 + ovs-appctl time/warp 2000 100 OVS_VSWITCHD_STOP OVS_APP_EXIT_AND_WAIT([test-sflow])