From: Eric Dumazet <hidden> Date: 2012-08-31 13:50:31
On Thu, 2012-08-30 at 23:55 -0700, Eric Dumazet wrote:
On locally generated TCP traffic (host), we can override the 100 ms
interval value using the more accurate RTT estimation maintained by TCP
stack (tp->srtt)
Datacenter workload benefits using shorter feedback (say if RTT is below
1 ms, we can react 100 times faster to a congestion)
Idea from Yuchung Cheng.
Linux patch would be the following :
I'll do tests next week, but I am sending a raw patch right now if
anybody wants to try it.
Presumably we also want to adjust target as well.
To get more precise srtt values in the datacenter, we might avoid the
'one jiffie slack' on small values in tcp_rtt_estimator(), as we force
m to be 1 before the scaling by 8 :
if (m == 0)
m = 1;
We only need to force the least significant bit of srtt to be set.
net/sched/sch_fq_codel.c | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
@@ -211,6 +213,14 @@ static int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch)returnNET_XMIT_SUCCESS;}+/* Given TCP srtt evaluation, return codel interval.+*srttisgiveninjiffies,scaledby8.+*/+staticcodel_time_ttcp_srtt_to_codel(unsignedintsrtt)+{+returnsrtt*((NSEC_PER_SEC>>(CODEL_SHIFT+3))/HZ);+}+/* This is the specific function called from codel_dequeue()*todequeueapacketfromqueue.Note:backlogishandledin*codel,wedontneedtoreduceithere.
From: Eric Dumazet <hidden> Date: 2012-08-31 13:57:46
On Fri, 2012-08-31 at 06:50 -0700, Eric Dumazet wrote:
On Thu, 2012-08-30 at 23:55 -0700, Eric Dumazet wrote:
quoted
On locally generated TCP traffic (host), we can override the 100 ms
interval value using the more accurate RTT estimation maintained by TCP
stack (tp->srtt)
Datacenter workload benefits using shorter feedback (say if RTT is below
1 ms, we can react 100 times faster to a congestion)
Idea from Yuchung Cheng.
Linux patch would be the following :
I'll do tests next week, but I am sending a raw patch right now if
anybody wants to try it.
Presumably we also want to adjust target as well.
To get more precise srtt values in the datacenter, we might avoid the
'one jiffie slack' on small values in tcp_rtt_estimator(), as we force
m to be 1 before the scaling by 8 :
if (m == 0)
m = 1;
We only need to force the least significant bit of srtt to be set.
Hmm, I also need to properly init default_interval after
codel_params_init(&q->cparams) :
net/sched/sch_fq_codel.c | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
@@ -211,6 +213,14 @@ static int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch)returnNET_XMIT_SUCCESS;}+/* Given TCP srtt evaluation, return codel interval.+*srttisgiveninjiffies,scaledby8.+*/+staticcodel_time_ttcp_srtt_to_codel(unsignedintsrtt)+{+returnsrtt*((NSEC_PER_SEC>>(CODEL_SHIFT+3))/HZ);+}+/* This is the specific function called from codel_dequeue()*todequeueapacketfromqueue.Note:backlogishandledin*codel,wedontneedtoreduceithere.
On Fri, Aug 31, 2012 at 6:57 AM, Eric Dumazet [off-list ref] wrote:
On Fri, 2012-08-31 at 06:50 -0700, Eric Dumazet wrote:
quoted
On Thu, 2012-08-30 at 23:55 -0700, Eric Dumazet wrote:
quoted
On locally generated TCP traffic (host), we can override the 100 ms
interval value using the more accurate RTT estimation maintained by TCP
stack (tp->srtt)
Datacenter workload benefits using shorter feedback (say if RTT is below
1 ms, we can react 100 times faster to a congestion)
Idea from Yuchung Cheng.
Linux patch would be the following :
I'll do tests next week, but I am sending a raw patch right now if
anybody wants to try it.
Presumably we also want to adjust target as well.
To get more precise srtt values in the datacenter, we might avoid the
'one jiffie slack' on small values in tcp_rtt_estimator(), as we force
m to be 1 before the scaling by 8 :
if (m == 0)
m = 1;
We only need to force the least significant bit of srtt to be set.
Just curious: tp->srtt is a very rough estimator, e.g., Delayed-ACks
can easily add 40 - 200ms fuzziness. Will this affect short flows?
quoted hunk
Hmm, I also need to properly init default_interval after
codel_params_init(&q->cparams) :
net/sched/sch_fq_codel.c | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
@@ -211,6 +213,14 @@ static int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch)returnNET_XMIT_SUCCESS;}+/* Given TCP srtt evaluation, return codel interval.+*srttisgiveninjiffies,scaledby8.+*/+staticcodel_time_ttcp_srtt_to_codel(unsignedintsrtt)+{+returnsrtt*((NSEC_PER_SEC>>(CODEL_SHIFT+3))/HZ);+}+/* This is the specific function called from codel_dequeue()*todequeueapacketfromqueue.Note:backlogishandledin*codel,wedontneedtoreduceithere.
From: Eric Dumazet <hidden> Date: 2012-09-01 12:51:24
On Fri, 2012-08-31 at 18:37 -0700, Yuchung Cheng wrote:
Just curious: tp->srtt is a very rough estimator, e.g., Delayed-ACks
can easily add 40 - 200ms fuzziness. Will this affect short flows?
Good point
Delayed acks shouldnt matter, because they happen when flow had been
idle for a while.
I guess we should clamp the srtt to the default interval
if (srtt)
q->cparams.interval = min(tcp_srtt_to_codel(srtt),
q->default_interval);
The idea of using srtt as interval makes sense to me if alongside we
also hash flows with similar RTTs into same bucket. But with just the
change in interval, I am not sure how codel is expected to behave.
My understanding is: the interval (usually set to worst case expected
RTT) is used to measure the standing queue or the "bad" queue. Suppose
1ms and 100ms RTT flows get hashed to same bucket, then the interval
with this patch will flip flop between 1ms and 100ms. How is this
expected to measure a standing queue? In fact I think the 1ms flow may
land up measuring the burstiness or the "good" queue created by the
long RTT flows, and this isn't desirable.
On Sat, Sep 1, 2012 at 5:51 AM, Eric Dumazet [off-list ref] wrote:
On Fri, 2012-08-31 at 18:37 -0700, Yuchung Cheng wrote:
quoted
Just curious: tp->srtt is a very rough estimator, e.g., Delayed-ACks
can easily add 40 - 200ms fuzziness. Will this affect short flows?
Good point
Delayed acks shouldnt matter, because they happen when flow had been
idle for a while.
I guess we should clamp the srtt to the default interval
if (srtt)
q->cparams.interval = min(tcp_srtt_to_codel(srtt),
q->default_interval);
From: Jonathan Morton <hidden> Date: 2012-09-04 15:25:18
I think that in most cases, a long RTT flow and a short RTT flow on the same interface means that the long RTT flow isn't bottlenecked here, and therefore won't ever build up a significant queue - and that means you would want to track over the shorter interval. Is that a reasonable assumption?
The key to knowledge is not to rely on others to teach you it.
On 4 Sep 2012, at 18:10, Nandita Dukkipati [off-list ref] wrote:
The idea of using srtt as interval makes sense to me if alongside we
also hash flows with similar RTTs into same bucket. But with just the
change in interval, I am not sure how codel is expected to behave.
My understanding is: the interval (usually set to worst case expected
RTT) is used to measure the standing queue or the "bad" queue. Suppose
1ms and 100ms RTT flows get hashed to same bucket, then the interval
with this patch will flip flop between 1ms and 100ms. How is this
expected to measure a standing queue? In fact I think the 1ms flow may
land up measuring the burstiness or the "good" queue created by the
long RTT flows, and this isn't desirable.
On Sat, Sep 1, 2012 at 5:51 AM, Eric Dumazet [off-list ref] wrote:
quoted
On Fri, 2012-08-31 at 18:37 -0700, Yuchung Cheng wrote:
quoted
Just curious: tp->srtt is a very rough estimator, e.g., Delayed-ACks
can easily add 40 - 200ms fuzziness. Will this affect short flows?
Good point
Delayed acks shouldnt matter, because they happen when flow had been
idle for a while.
I guess we should clamp the srtt to the default interval
if (srtt)
q->cparams.interval = min(tcp_srtt_to_codel(srtt),
q->default_interval);
From: Eric Dumazet <hidden> Date: 2012-09-04 15:34:15
On Tue, 2012-09-04 at 08:10 -0700, Nandita Dukkipati wrote:
The idea of using srtt as interval makes sense to me if alongside we
also hash flows with similar RTTs into same bucket. But with just the
change in interval, I am not sure how codel is expected to behave.
My understanding is: the interval (usually set to worst case expected
RTT) is used to measure the standing queue or the "bad" queue. Suppose
1ms and 100ms RTT flows get hashed to same bucket, then the interval
with this patch will flip flop between 1ms and 100ms. How is this
expected to measure a standing queue? In fact I think the 1ms flow may
land up measuring the burstiness or the "good" queue created by the
long RTT flows, and this isn't desirable.
Well, how things settle with a pure codel, mixing flows of very
different RTT then ?
It seems there is a high resistance on SFQ/fq_codel model because of the
probabilities of flows sharing a bucket.
So what about removing the stochastic thing and switch to a hash with
collision resolution ?
From: Eric Dumazet <hidden> Date: 2012-09-04 15:39:09
On Tue, 2012-09-04 at 18:25 +0300, Jonathan Morton wrote:
I think that in most cases, a long RTT flow and a short RTT flow on
the same interface means that the long RTT flow isn't bottlenecked
here, and therefore won't ever build up a significant queue - and that
means you would want to track over the shorter interval. Is that a
reasonable assumption?
This would be reasonable, but if we have a shorter interval, this means
we could drop packets of the long RTT flow sooner than expected.
Thats because the drop_next value is setup on the previous packet, and
not based on the 'next packet'
Re-evaluating drop_next at the right time would need more cpu cycles.
From: Dave Taht <hidden> Date: 2012-09-04 16:40:42
On Tue, Sep 4, 2012 at 8:34 AM, Eric Dumazet [off-list ref] wrote:
On Tue, 2012-09-04 at 08:10 -0700, Nandita Dukkipati wrote:
quoted
The idea of using srtt as interval makes sense to me if alongside we
also hash flows with similar RTTs into same bucket. But with just the
change in interval, I am not sure how codel is expected to behave.
My understanding is: the interval (usually set to worst case expected
RTT) is used to measure the standing queue or the "bad" queue. Suppose
1ms and 100ms RTT flows get hashed to same bucket, then the interval
with this patch will flip flop between 1ms and 100ms. How is this
expected to measure a standing queue? In fact I think the 1ms flow may
land up measuring the burstiness or the "good" queue created by the
long RTT flows, and this isn't desirable.
Experiments would be good.
Well, how things settle with a pure codel, mixing flows of very
different RTT then ?
Elephants are shot statistically more often than mice.
It seems there is a high resistance on SFQ/fq_codel model because of the
probabilities of flows sharing a bucket.
I was going to do this in a separate email, because it is a little off-topic.
fq_codel has a standing queue problem, based on the fact that when a
queue empties, codel.h resets. This made sense for the single FIFO
codel but not multi-queued fq_codel. So after we hit X high rate
flows, target can never be achieved, even straining mightily, and we
end up with a standing queue again.
Easily seen with like 150 bidirectional flows at 10 or 100Mbit.
(as queues go, it's still pretty good queue. And: I've fiddled with
various means of draining multi-queue behavior thus far, and they
ended up unstable/unfair)
So what about removing the stochastic thing and switch to a hash with
collision resolution ?
From: Eric Dumazet <hidden> Date: 2012-09-04 16:57:29
On Tue, 2012-09-04 at 09:40 -0700, Dave Taht wrote:
fq_codel has a standing queue problem, based on the fact that when a
queue empties, codel.h resets. This made sense for the single FIFO
codel but not multi-queued fq_codel. So after we hit X high rate
flows, target can never be achieved, even straining mightily, and we
end up with a standing queue again.
Easily seen with like 150 bidirectional flows at 10 or 100Mbit.
(as queues go, it's still pretty good queue. And: I've fiddled with
various means of draining multi-queue behavior thus far, and they
ended up unstable/unfair)
No idea of what you mean by "codel.h resets".
Please use small mails, one idea by mail.