Re: [aqm] Gathering Queue Length Statistics

Toke Høiland-Jørgensen <toke@toke.dk> Thu, 26 February 2015 10:36 UTC

Return-Path: <toke@toke.dk>
X-Original-To: aqm@ietfa.amsl.com
Delivered-To: aqm@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BDFBD1A1EE8 for <aqm@ietfa.amsl.com>; Thu, 26 Feb 2015 02:36:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.693
X-Spam-Level:
X-Spam-Status: No, score=-0.693 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HELO_EQ_DK=1.009, MIME_8BIT_HEADER=0.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id unFy5pi33sFr for <aqm@ietfa.amsl.com>; Thu, 26 Feb 2015 02:36:12 -0800 (PST)
Received: from mail2.tohojo.dk (mail2.tohojo.dk [77.235.48.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B612B1A3BA4 for <aqm@ietf.org>; Thu, 26 Feb 2015 02:36:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at mail2.tohojo.dk
Sender: toke@toke.dk
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toke.dk; s=201310; t=1424946964; bh=j7cgQgXK0BuaL84JKzxMiQwjqZEb3CpQLjtNAf902h0=; h=From:To:Cc:Subject:References:Date:In-Reply-To; b=j7nlp90+PApOhil1aKBaERvUWgTZDOPsNdVd+84WhGdzmEGRSwiancLyqsiFhcRMi Yhbd2dfertyD4rQrfVG9ssBxwxaZ1CkLp/7YzR8Ps0jQj/E9P1XqCrGPZSB4YTkddN Kzw1zdvBqE79YDw60KXkpXswG3ZV++0mqiuONSw0=
Received: by alrua-kau.kau.toke.dk (Postfix, from userid 1000) id EBF033E3766; Thu, 26 Feb 2015 11:36:03 +0100 (CET)
From: Toke Høiland-Jørgensen <toke@toke.dk>
To: Mikael Abrahamsson <swmike@swm.pp.se>
References: <BAY176-W35105790F5BC047AA12309A5170@phx.gbl> <CAA93jw5dPhLmamcSHxD92b50XxmkkZNy28SWMkOSRFzBY3keBA@mail.gmail.com> <alpine.DEB.2.02.1502261125510.4007@uplift.swm.pp.se>
Date: Thu, 26 Feb 2015 11:36:03 +0100
In-Reply-To: <alpine.DEB.2.02.1502261125510.4007@uplift.swm.pp.se> (Mikael Abrahamsson's message of "Thu, 26 Feb 2015 11:30:00 +0100 (CET)")
Message-ID: <87k2z5ot7w.fsf@toke.dk>
MIME-Version: 1.0
Content-Type: text/plain
Archived-At: <http://mailarchive.ietf.org/arch/msg/aqm/-Ts6gHfMSQVKA5Zpxx5bsYjGKFs>
Cc: Dave Taht <dave.taht@gmail.com>, "aqm@ietf.org" <aqm@ietf.org>
Subject: Re: [aqm] Gathering Queue Length Statistics
X-BeenThere: aqm@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Discussion list for active queue management and flow isolation." <aqm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/aqm>, <mailto:aqm-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/aqm/>
List-Post: <mailto:aqm@ietf.org>
List-Help: <mailto:aqm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/aqm>, <mailto:aqm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 26 Feb 2015 10:36:13 -0000

Mikael Abrahamsson <swmike@swm.pp.se> writes:

> I don't know how the Linux AQM system works, but exposing some of
> these counters through the proc subsystem (or something else), might
> work, and then a userspace daemon could poll this data as often as it
> wanted, then you don't even need the kernel to do averaging and
> keeping the data.

It's exposed via the Netlink interface, which is what `tc -s` shows:

qdisc fq_codel 110: dev enp2s0 parent 1:10 limit 1000p flows 1014 quantum 500 target 5.0ms interval 100.0ms ecn 
 Sent 16981968691 bytes 17816348 pkt (dropped 8, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 
  maxpacket 13216 drop_overlimit 0 new_flow_count 6502039 ecn_mark 0
  new_flows_len 1 old_flows_len 5

The 'backlog 0b 0p' shows that the queue is currently empty, while the
lines below show qdisc-specific stats. But as Dave said, getting the
statistics has some locking issues that may (or will, probably) cause
trouble if trying to poll it too frequently...

-Toke