From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-03-ewr.dyndns.com (mxout-060-ewr.mailhop.org [216.146.33.60]) by lists.bufferbloat.net (Postfix) with ESMTP id 34F2C2E0079 for ; Mon, 28 Feb 2011 16:30:03 -0800 (PST) Received: from scan-01-ewr.mailhop.org (scanner [10.0.141.223]) by mail-03-ewr.dyndns.com (Postfix) with ESMTP id 72C2478824D for ; Tue, 1 Mar 2011 00:29:26 +0000 (UTC) X-Spam-Score: -8.0 (--------) X-Mail-Handler: MailHop by DynDNS X-Originating-IP: 171.68.10.86 Received: from sj-iport-4.cisco.com (sj-iport-4.cisco.com [171.68.10.86]) by mail-03-ewr.dyndns.com (Postfix) with ESMTP id 076F0788016 for ; Tue, 1 Mar 2011 00:29:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=fred@cisco.com; l=2130; q=dns/txt; s=iport; t=1298939366; x=1300148966; h=subject:mime-version:from:in-reply-to:date:cc: content-transfer-encoding:message-id:references:to; bh=jfQTYjyGIZo+DPEt0zt3phLWDV2Wig9T8SQU1CygKHo=; b=Wl5HOnFng2VncBYvoNSkdj6/BqTjlFIIUknIHH3bbA7vQOdWBES7VFJ/ mcp7v9j6ixeqjjGdNY1rzO+SUFGgDnz5tTuaUG+0mTXeAZ4xVaPJ+YjA8 wYA8ofJiTmZER6FBvaiaKjZxIA+KT1uWqXvPu/2gAcMWWw9PJYcWN5814 U=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAKXMa02rRN+J/2dsb2JhbACmR3SfXJtphWEEhRKHDQ X-IronPort-AV: E=Sophos;i="4.62,244,1297036800"; d="scan'208";a="266766832" Received: from sj-core-3.cisco.com ([171.68.223.137]) by sj-iport-4.cisco.com with ESMTP; 01 Mar 2011 00:29:25 +0000 Received: from stealth-10-32-244-219.cisco.com (stealth-10-32-244-219.cisco.com [10.32.244.219]) by sj-core-3.cisco.com (8.13.8/8.14.3) with ESMTP id p210TODk012745; Tue, 1 Mar 2011 00:29:25 GMT Subject: Re: Getting current interface queue sizes Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Fred Baker In-Reply-To: Date: Mon, 28 Feb 2011 16:29:24 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <7A1666CF-3E98-4668-A265-F89B50D23909@cisco.com> References: To: Justin McCann X-Mailer: Apple Mail (2.1082) Cc: bloat X-BeenThere: bloat-devel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Developers working on AQM, device drivers, and networking stacks" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2011 00:30:03 -0000 On Feb 28, 2011, at 2:26 PM, Justin McCann wrote: > This may be well-known, but how does one retrieve the current outgoing = and incoming queue sizes from the link-layer interfaces? I mean the = number of packets/bytes in the various queues, not the size of the = buffers (potential queue size). I've mucked around with ethtool and = netlink to grab other statistics, but haven't found any way to pull the = current queue sizes into userspace.=20 When the SNMP MIB was first developed, they originally specified = ifOutQLen as "The length of the output packet queue (in packets)." One = problem: Cisco implements that as "how many packets can I put into the = queue in the deepest possible case". The outfit I worked for before = Cisco implemented it as "what is the current depth of the output queue". = Interoperable implementation... There are a few issues with the "current" model. Suppose you are in this = network +---+ +------+ |NMS| |Target| +-+-+ +---+--+ | | ---+--------------+---- and you ask the target what the length of its Ethernet queue is. When = you get the answer, what is the length of its Ethernet queue? To determine the answer, think through the process. - NMS sends a question to Target - Target thinks about it, concocts an answer, and puts it in the = Ethernet queue - Packets ahead of response in Ethernet queue drain - response packet is transmitted. - NMS receives response At the time the NMS receives the response, there's a reasonable chance = that the queue is absolutely empty. Or that it is twice as full as it = was before. Or some other number. All you can really say is that at the = time the agent answered the question, the queue had ifOutQLen packets in = it. The object got deprecated on the grounds that it didn't make a lot of = sense. When I try to measure queue lengths, I do so by trying to pass a message = though the queue. That lets me measure the impact of the queue on delay, = which is actually far more interesting.=