General list for discussing Bufferbloat
 help / color / mirror / Atom feed
* [Bloat] sch_fq and sk->sk_pacing_rate
@ 2015-04-27 14:49 Bill Ver Steeg (versteb)
  2015-04-27 15:30 ` Eric Dumazet
  0 siblings, 1 reply; 4+ messages in thread
From: Bill Ver Steeg (versteb) @ 2015-04-27 14:49 UTC (permalink / raw)
  To: bloat

[-- Attachment #1: Type: text/plain, Size: 1929 bytes --]

Bloaters (and particularly Eric)

I will try to not confuse the list, as this question is about host behaviors rather than middlebox behaviors. Having said that......

I am playing around with some application code that would benefit from pacing. The example I have in mind is MPEG-DASH style vide, but any type of ABR flow would probably benefit from the scheme I have in mind. I have done some work with client based pacing via RWND, but it is very clunky.

I am thinking of having the server tell the kernel the rate at which it wants data delivered to the client. (The client would probably tell the server via an HTTP pragma, but that is a separate can of worms....) So, the HTTP server would tell the kernel that it wants to deliver the TCP data at or below a certain max rate. There are currently hooks in sch_fq for the TCP layer to set sk_pacing_rate. It seems that I would need to add another pacing variable and have the data sent at the min of q->flow_max_rate, skb->sk->sk_pacing_rate, and this new app_pacing_rate. In other words, the old code


rate<http://lxr.free-electrons.com/ident?i=rate> = q->flow_max_rate;

if (skb<http://lxr.free-electrons.com/ident?i=skb>->sk)

   rate<http://lxr.free-electrons.com/ident?i=rate> = min<http://lxr.free-electrons.com/ident?i=min>(skb<http://lxr.free-electrons.com/ident?i=skb>->sk->sk_pacing_rate, rate<http://lxr.free-electrons.com/ident?i=rate>);

would become


rate<http://lxr.free-electrons.com/ident?i=rate> = q->flow_max_rate;

if (skb<http://lxr.free-electrons.com/ident?i=skb>->sk)

{

    rate<http://lxr.free-electrons.com/ident?i=rate> = min<http://lxr.free-electrons.com/ident?i=min>(skb<http://lxr.free-electrons.com/ident?i=skb>->sk->sk_pacing_rate, rate<http://lxr.free-electrons.com/ident?i=rate>);

    if (skb->sk->app_pacing_rate)

        rate = (min(skb->sk->app_pacing_rate, rate);

}


Thoughts?

Bill VerSteeg

[-- Attachment #2: Type: text/html, Size: 5183 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: [Bloat] sch_fq and sk->sk_pacing_rate
@ 2015-04-27 14:56 Bill Ver Steeg (versteb)
  2015-04-27 15:15 ` Steinar H. Gunderson
  0 siblings, 1 reply; 4+ messages in thread
From: Bill Ver Steeg (versteb) @ 2015-04-27 14:56 UTC (permalink / raw)
  To: bloat

[-- Attachment #1: Type: text/plain, Size: 2355 bytes --]

Oops- I seem to have hit send too quickly. I think setsockopt(sockfd, SOL_SOCKET, SO_MAX_PACING_RATE, &val, sizeof(val)) is the call I am looking for. I was looking on an older kernel when I wrote the first note.

Comments still welcome on it use, though.

Bill VerSteeg


From: Bill Ver Steeg (versteb)
Sent: Monday, April 27, 2015 10:51 AM
To: bloat@lists.bufferbloat.net
Subject: sch_fq and sk->sk_pacing_rate

Bloaters (and particularly Eric)

I will try to not confuse the list, as this question is about host behaviors rather than middlebox behaviors. Having said that......

I am playing around with some application code that would benefit from pacing. The example I have in mind is MPEG-DASH style vide, but any type of ABR flow would probably benefit from the scheme I have in mind. I have done some work with client based pacing via RWND, but it is very clunky.

I am thinking of having the server tell the kernel the rate at which it wants data delivered to the client. (The client would probably tell the server via an HTTP pragma, but that is a separate can of worms....) So, the HTTP server would tell the kernel that it wants to deliver the TCP data at or below a certain max rate. There are currently hooks in sch_fq for the TCP layer to set sk_pacing_rate. It seems that I would need to add another pacing variable and have the data sent at the min of q->flow_max_rate, skb->sk->sk_pacing_rate, and this new app_pacing_rate. In other words, the old code


rate<http://lxr.free-electrons.com/ident?i=rate> = q->flow_max_rate;

if (skb<http://lxr.free-electrons.com/ident?i=skb>->sk)

   rate<http://lxr.free-electrons.com/ident?i=rate> = min<http://lxr.free-electrons.com/ident?i=min>(skb<http://lxr.free-electrons.com/ident?i=skb>->sk->sk_pacing_rate, rate<http://lxr.free-electrons.com/ident?i=rate>);

would become


rate<http://lxr.free-electrons.com/ident?i=rate> = q->flow_max_rate;

if (skb<http://lxr.free-electrons.com/ident?i=skb>->sk)

{

    rate<http://lxr.free-electrons.com/ident?i=rate> = min<http://lxr.free-electrons.com/ident?i=min>(skb<http://lxr.free-electrons.com/ident?i=skb>->sk->sk_pacing_rate, rate<http://lxr.free-electrons.com/ident?i=rate>);

    if (skb->sk->app_pacing_rate)

        rate = (min(skb->sk->app_pacing_rate, rate);

}


Thoughts?

Bill VerSteeg

[-- Attachment #2: Type: text/html, Size: 6835 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-27 15:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-27 14:49 [Bloat] sch_fq and sk->sk_pacing_rate Bill Ver Steeg (versteb)
2015-04-27 15:30 ` Eric Dumazet
2015-04-27 14:56 Bill Ver Steeg (versteb)
2015-04-27 15:15 ` Steinar H. Gunderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox