All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gregory Maxwell greg@linuxpower.cx
To: lartc@vger.kernel.org
Subject: [LARTC] SFQ clarification
Date: Sat, 10 Feb 2001 04:04:18 +0000	[thread overview]
Message-ID: <marc-lartc-98373940416999@msgid-missing> (raw)
In-Reply-To: <marc-lartc-98373940416997@msgid-missing>

<PRE>On Fri, Feb 09, 2001 at 05:38:18PM -0800, Don Cohen wrote:
&gt;<i> <A HREF="http://www.linuxdoc.org/HOWTO/Adv-Routing-HOWTO.html">http://www.linuxdoc.org/HOWTO/Adv-Routing-HOWTO.html</A>
</I>&gt;<i> 9.2 Stochastic Fairness Queueing 
</I>&gt;<i> says:
</I>&gt;<i>  SFQ however cannot determine interactive flows from bulk ones -- one
</I>&gt;<i>  usually needs to do the selection with CBQ before, and then direct the
</I>&gt;<i>  bulk traffic into SFQ.  
</I>&gt;<i> 
</I>&gt;<i> I don't understand this.  You want to give preference to the non-bulk
</I>&gt;<i> traffic, right?  And this is what you get if you just put it all into
</I>&gt;<i> the same SFQ, right?  All the small flows get fast service and the 
</I>&gt;<i> large flows fairly share what's left.  That seems like what you want.
</I>&gt;<i> So it's true that SFQ does not distinguish bulk from interactive flows
</I>&gt;<i> but there's no need to.
</I>
No, in the context of network queue management bulk means non-interactive,
batch might be a better word. 

SFQ classfies packets by computing hash(shost,dhost,sport,dport,proto,seed)
where hash produces an output of 0-1023. The system then creates 1024 queues
(virtually) and pulls a single packet from each one in a round-robin fashion.
(roughly)

Thus each of these 1024 buckets gets an equal chance at bandwidth. As the
number of flows approaches 1024 the probability of two flows ending up in
the same bucket approaches 100%. Two flows in the same bucket fight over
bandwidth as do flows in a classic tail-drop router.  At a regular interval
the 'seed' is changed to cause differnt flows to be batched togeather.

Notice above I said, 'equal chance' at bandwith. That doesn't mean equal
bandwidth. Consider 3 active buckets, one with your slogin text, two with
outbound file transfers. It will transmit one character (perhaps, depends on
nagle) of your slogin, then two ~1500byte file transfer packets, then
another few bytes of telnet, then it has to wait for another two 1500byte
file transfer packets. Not exactly fair..

So SFQ is only fair when all the needs are simmlar..

So, the preferable queue arrangement could be something like something like:

             1[TBF]-[TOS: Minimize delay]
[eth]-[PRIO]/2[SFQ]-[EVERYTHING ELSE]
            \3[SFQ]-[TOS: Lowest cost]

The TBF on the minimize delay is just prudence to prevent 'wow, if I check
minimize delay I can transfer big files FAST'

Unfortunatly, Linux currently doesn't have any SF red queues (or SFB) which
would have improved performance over SFtail-drop (which is what SFQ is).
Additionally, Linux doesn't allow you do specify the hash size for your SFQ,
which could make it less useful in some situations.


</PRE>

  reply	other threads:[~2001-02-10  4:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-10  1:38 [LARTC] SFQ clarification Don
2001-02-10  4:04 ` Gregory [this message]
2001-02-10  5:14 ` Don

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-98373940416999@msgid-missing \
    --to=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.