Re: [aqm] PIE departure rate estimation

"Rong Pan (ropan)" <ropan@cisco.com> Thu, 02 April 2015 17:31 UTC

Return-Path: <ropan@cisco.com>
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 08ECD1AD05C for <aqm@ietfa.amsl.com>; Thu, 2 Apr 2015 10:31:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -13.91
X-Spam-Level:
X-Spam-Status: No, score=-13.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, J_CHICKENPOX_84=0.6, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham
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 ZMqnEAbNvoEs for <aqm@ietfa.amsl.com>; Thu, 2 Apr 2015 10:31:38 -0700 (PDT)
Received: from rcdn-iport-5.cisco.com (rcdn-iport-5.cisco.com [173.37.86.76]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7B19D1A014D for <aqm@ietf.org>; Thu, 2 Apr 2015 10:31:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=29931; q=dns/txt; s=iport; t=1427995898; x=1429205498; h=from:to:subject:date:message-id:references:in-reply-to: mime-version; bh=HEO9fLQ7tW5ghnWHyThzA868Vu8riSrJsyAUYR8LPNI=; b=JhD7nLW3/pgDwlT+BaiP/2GaqAT7zKRFspr1pivvnf5SzOpfF8L1xB3F dhaMpa+x8fZFJiPKfjGcTClc4qqYMbTH8PdjLWZSyVeOjbGQ9b3pYG9MD II32y/EEuAv21l4pGkY4ydi6qDdyBMjbh/Gi0uiIgZN46f+lY3l/hgghi M=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0ClBgC9ex1V/4cNJK1cgkVDUlwFw1qCA4VzAoFKTAEBAQEBAX6EHgEBAQQMIUAcAgEIDgMDAQEBIQcHMhQJCAIEARIfiA8BDc4LAQEBAQEBAQEBAQEBAQEBAQEBAQEBF4oqf4RoDQoBhC0FkGqDdYYLgR2DNIJehhyDNYNIIoNubwGBQ38BAQE
X-IronPort-AV: E=Sophos;i="5.11,512,1422921600"; d="scan'208,217";a="408748843"
Received: from alln-core-2.cisco.com ([173.36.13.135]) by rcdn-iport-5.cisco.com with ESMTP; 02 Apr 2015 17:31:37 +0000
Received: from xhc-rcd-x12.cisco.com (xhc-rcd-x12.cisco.com [173.37.183.86]) by alln-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id t32HVbho009159 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Thu, 2 Apr 2015 17:31:37 GMT
Received: from xmb-aln-x15.cisco.com ([169.254.9.109]) by xhc-rcd-x12.cisco.com ([173.37.183.86]) with mapi id 14.03.0195.001; Thu, 2 Apr 2015 12:31:37 -0500
From: "Rong Pan (ropan)" <ropan@cisco.com>
To: Dave Dolson <ddolson@sandvine.com>, "aqm@ietf.org" <aqm@ietf.org>
Thread-Topic: [aqm] PIE departure rate estimation
Thread-Index: AQHQbMIGW+ot0iZ1OU6OZ2/eKhmRQZ04qyFA///v6gCAARmgAIAAJgQA
Date: Thu, 02 Apr 2015 17:31:36 +0000
Message-ID: <D142C6AE.D9F1%ropan@cisco.com>
References: <D141ACCB.D99D%ropan@cisco.com> <E8355113905631478EFF04F5AA706E9830BB0BF4@wtl-exchp-2.sandvine.com> <D141BCEA.D9C1%ropan@cisco.com> <E8355113905631478EFF04F5AA706E9830BB34D5@wtl-exchp-2.sandvine.com>
In-Reply-To: <E8355113905631478EFF04F5AA706E9830BB34D5@wtl-exchp-2.sandvine.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/14.4.7.141117
x-originating-ip: [171.70.247.185]
Content-Type: multipart/alternative; boundary="_000_D142C6AED9F1ropanciscocom_"
MIME-Version: 1.0
Archived-At: <http://mailarchive.ietf.org/arch/msg/aqm/a14PkURL7jpaFaiF1Xf2nbTLog4>
Subject: Re: [aqm] PIE departure rate estimation
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, 02 Apr 2015 17:31:42 -0000

Dave,

Thanks for your time and effort in reviewing the PIE draft. We really appreciate it and we will update according to many of your valuable comments (your other emails). For the ones that I think need clarification, I try to explain below.

Best Regards,

Rong

From: Dave Dolson <ddolson@sandvine.com<mailto:ddolson@sandvine.com>>
Date: Thursday, April 2, 2015 8:28 AM
To: rong <ropan@cisco.com<mailto:ropan@cisco.com>>, "aqm@ietf.org<mailto:aqm@ietf.org>" <aqm@ietf.org<mailto:aqm@ietf.org>>
Subject: RE: [aqm] PIE departure rate estimation

Rong,
(Please keep in mind I am only trying to provide constructive criticism, as someone new to the PIE algorithm.)

>>>>>>>>>>>>>>RP: There are two calculations in the PIE algorithm: one is for p update and one is for calculate the rate. They are independent from each other. If there are not enough packets in the buffer, we simply don't update depart rate estimation,  instead we use the previous value. However, the drop probability calculation is always updated. Hence, the "p" in your example will go down to 0.

I didn’t get this point from the draft, that ‘p’ is periodically updated regardless of whether rate measurements are available.
May I suggest a statement in section 4.3: “Note that p is updated per section 4.2 even when not in a measurement cycle; in this case the previously latched value of depart_rate is used.”

>>>>>>>>>>>>>>>RP: will do.


[Sorry, the following is really pedantic, but I couldn’t help myself…]

I tried to prove to myself that “p” will go down to 0 when the queue size is below a certain size.
I found that it will not go down to 0 in a contrived situation when packet arrival rate equals transmit rate, keeping qlen constant
target_del * depart_rate <= qlen <= dq_threshold


>>>>>>>>>>>>>>>RP: if arrival rate = departure rate and p is not equal to 0, the net arrival rate to the queue = arrival rate *(1-p) < departure rate, the queue will goes to zero until p = 0. In any case, there is one safeguard clause where p will exponentially go to 0 when queue is empty, which is accidentally deleted in the pseudo code, which I will update.

In this range, depart_rate is never recomputed, so it might have latched any arbitrary value, making the lower bound a constant.

In this range, p is not reduced because the beta*(est_del - est_del_old) term is zero (constant qlen) and the alpha*(est_del-target_del) is zero or positive.

I didn’t work out the details, but because it takes a while for ‘p’ to get to zero, I think there are a variety of traffic patterns that can allow ‘p’ to meander around in non-zero space even though the queue is nearly empty. (p could be fairly large, which is the reason the queue is nearly empty).

The key to this scenario is latching a low value of depart_rate and never updating it.

In practice this might never happen, but also in practice anything that can happen will. At least it probably won’t be reproducible :-)

Is there a fix? I think it is to remove the restriction that a minimum queue size is required for a measurement cycle. It’s better to measure the actual rate (even if it is not the potential rate) than have a bad estimate. Then depart_rate is allowed to increase to the actual rate, and the estimated delay is allowed to decrease.

-Dave



From: Rong Pan (ropan) [mailto:ropan@cisco.com]
Sent: Wednesday, April 01, 2015 6:28 PM
To: Dave Dolson; aqm@ietf.org<mailto:aqm@ietf.org>
Subject: Re: [aqm] PIE departure rate estimation

Please see inline…

Rong

From: Dave Dolson <ddolson@sandvine.com<mailto:ddolson@sandvine.com>>
Date: Wednesday, April 1, 2015 2:43 PM
To: rong <ropan@cisco.com<mailto:ropan@cisco.com>>, "aqm@ietf.org<mailto:aqm@ietf.org>" <aqm@ietf.org<mailto:aqm@ietf.org>>
Subject: RE: [aqm] PIE departure rate estimation

Inline [DD]

From: Rong Pan (ropan) [mailto:ropan@cisco.com]
Sent: Wednesday, April 01, 2015 5:23 PM
To: Dave Dolson; aqm@ietf.org<mailto:aqm@ietf.org>
Subject: Re: [aqm] PIE departure rate estimation

Dave,

Thanks for the valuable comments. We will see how we can incorporate them. For the comments below, please see inline.

Regards,

Rong


From: Dave Dolson <ddolson@sandvine.com<mailto:ddolson@sandvine.com>>
Date: Wednesday, April 1, 2015 1:22 PM
To: "aqm@ietf.org<mailto:aqm@ietf.org>" <aqm@ietf.org<mailto:aqm@ietf.org>>
Subject: [aqm] PIE departure rate estimation

In https://tools.ietf.org/html/draft-ietf-aqm-pie-00#section-4.3,

it says, “We only measure the departure rate when there are sufficient data in the buffer”

Why can’t departure rate be estimated regardless of queue size? Just count packets leaving over time? I’m wondering how to avoid the estimate getting stuck at the last value sampled when the queue had a certain quantity in it.

>>>>>>>>>>>>RP: We need to make sure that there are enough data in the queue to guarantee a rate sample. The reason is that if a queue is empty from time to time, we can't measure its true draining rate. The time when the queue empty should be cut out of the drain time calculation. For simplicity, it is better to make sure we have enough data in the queue to ensure accurate rate measurement sample.
[DD] I understand the rationale, but supposing p=0.1, but the queue has very few items in it, too few to obtain a rate calculation. What causes p to go to zero, since an update is not permitted? It isn’t obvious to me that the algorithm always stops for all input traffic patterns.

>>>>>>>>>>>>>>RP: There are two calculations in the PIE algorithm: one is for p update and one is for calculate the rate. They are independent from each other. If there are not enough packets in the buffer, we simply don't update depart rate estimation,  instead we use the previous value. However, the drop probability calculation is always updated. Hence, the "p" in your example will go down to 0.


Section 4.2 cites Little’s Law as “est_del = qlen/depart_rate”,
but according to Wikipedia<http://en.wikipedia.org/wiki/Little%27s_law>, the law uses arrival rate, not departure rate.
I don’t know if it matters (I didn’t read Little’s proof), but this gives credence to the suggestion in section 6 that the algorithm could use arrival rate.
And I think it might be easier to measure when the queue has few items in it.

>>>>>>>>>>>>RP: what you mentioned is to calculate average number of customers in a system using the arrival. http://en.wikipedia.org/wiki/Little's_law Wikipedia also mentions that mean responseTime = MeanNumberInSystem / MeanThroughput. What we measure is the mean response time (latency). Hence, it is correct in our draft.
[DD] Arrival (post drop) and departure rates are almost never the same at any instant. I guess they must average to the same value. Practically, it might not matter which is used, but I thought Little’s law should be cited correctly. In Wikipedia the law is cited one way and the example is shown another way. Furthermore there is this ominous comment: “When exploring Little’s law and learning to trust it, be aware of the common mistakes of using arrivals(work arriving) when throughput(work completed) is called for…”

>>>>>>>>>>>>>RP: I understand the concern. But I think we have used it in the right way. Arrival is related to how many customers/packets in a system. However, given #of customers/packets in a system, the wait time is directly related to the service time (inverse of throughput), not arrival rate any more.

David Dolson
Senior Software Architect, Sandvine Inc.