All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: lartc@vger.kernel.org
Subject: [LARTC] Re: HFSC
Date: Mon, 01 Mar 2004 04:06:43 +0000	[thread overview]
Message-ID: <4042B6D3.2010600@trash.net> (raw)
In-Reply-To: <873c8v3vbk.fsf@iki.fi>

Nuutti Kotivuori wrote:
> Patrick McHardy wrote:
> 
>>This is currently all there is. If you have some specific questions,
>>just ask (but please CC lartc). If anyone wants to write some
>>documentation I'd be happy to help, but I don't have time for it
>>myself.
> 
> 
> I am not sure if the original poster has specific questions, but I
> sure do.
> 
> I just recently got into this HFSC mess myself, so I'm a bit fuzzy in
> all the terms and differences in implementation. I read the paper
> (SIGCOM97) on HFSC and I think I understood most of it. But there are
> some things in the implementation that I couldn't really realize.
> 
> I'll quote the usage here for reference:
> 
> ,----
> | Usage: ... hfsc [ rt SC ] [ ls SC ] [ ul SC ]
> |  
> | SC := [ [ m1 BPS ] [ d SEC ] m2 BPS
> |  
> |  m1 : slope of first segment
> |  d  : x-coordinate of intersection
> |  m2 : slope of second segment
> `----
> 
> Okay, the SC parameters I think I understand rather well - they are
> there to define the service curve itself. But the way hfsc takes three
> optional parameters of service curves puzzles me.
> 
> I believe 'rt' referes to 'Real-Time Service Curve', 'ls' to 'Link
> Sharing Service Curve' and 'ul' to 'Upper Limit Service Curve'. If I
> understand correctly, the SIGCOM97 paper mentioned that the link
> sharing selection need not be the same as the real time selection, but
> in examples assumed for simplicity that they were. Also, from the
> source I conclude that 'Upper Limit Service Curve' cannot be specified
> without 'Link Sharing Service Curve'.

Correct so far.

> So, this, all in all, baffles me :-)
> 
> The possible combinations I can make here are:
> 
>   Real-Time
>   Link-Sharing
>   Real-Time, Link-Sharing
>   Link-Sharing, Upper-Limit
>   Real-Time, Link-Sharing, Upper-Limit
> 
> How do these behave? If I specify *only* the real-time curve, what is
> used for the link-sharing part? Or does that mean that there is no
> sharing? Or if I only specify the link-sharing curve, does that mean
> that no specific deadlines are for packets, just that they are sent
> based on the link-sharing model? And what actually is the upper-limit
> service curve? I take it that it is some kind of a packet drop curve,
> but I don't know how it would behave - nor why it would require the
> link-sharing curve.

The combinations you list are correct. Real-time curves are only valid
for leaf-classes, whereas link-sharing and upper-limit curves are valid
for all classes in the heirarchy. When multiple curves are used, the
following must hold: rt <= ls <= ul

To understand why there are two (forgetting about upper-limit curves
for now) different curves your need to know that scheduling in HFSC is
based on two criteria: the real-time criterion which ensures that the
guarantees of leaf-classes are met and the link-sharing criterion which
tries to satisfy the service curves of intermediate classes and
distributes excess bandwidth fairly. The reason why there are two
different criteria is that in the Fair Service Link-sharing model that
is approximated by HFSC it is not always possible to guarantee the
service of all classes simultaneously at all times (with non-linear
service curves). HFSC chooses to guarantee the service curves of
(real-time) leaf-classes (because only leaves carry packets), and
uses the link-sharing criterion to minimize the discrepancy between
the actual service received and the service defined by the Fair Service
Link-sharing Model.

The upper-limit curve is used to limit the link-sharing curve. Without
an upper-limit curve, packets are dequeued at the speed the underlying
device is capable of. For example in the case of software devices,
this is not very desireable, so you can limit the total output rate.


For your other questions:
- If you specify only a real-time service curve the class will not
   participate in link-sharing. This means it can only send at it's
   configured rate. The difference two a link-share+upper-limit curve
   is that the service is guaranteed.

- If you specify only a link-share curve their are no deadlines and
   no guarantees can be given.


Some other notes you might find helpful:
- The sum of all real-time curves must not exceed 100%.

- The actual bandwidth assigned to link-sharing classes doesn't matter,
   only the relative difference between sibling-classes is important

> 
> So, any pointers on these would be helpful, or if you manage to get
> the time to explain it specifically.
> 
> I will probably cook up atleast an example script using HFSC for
> normal QoS if I manage to understand how it works, perhaps even some
> documentation.

Great! I started some documentation last year, but never got to
finishing it. I can send it to you in private, but I don't want
to publish it as long as it's unfinished.

Regards
Patrick

> 
> -- Naked
> 

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

  reply	other threads:[~2004-03-01  4:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-28 18:36 [LARTC] Re: HFSC Nuutti Kotivuori
2004-03-01  4:06 ` Patrick McHardy [this message]
2004-03-01 12:27 ` syrius.ml
2004-03-01 19:58 ` Nuutti Kotivuori
2004-03-21 17:37 ` Patrick McHardy
2004-03-21 20:38 ` Nuutti Kotivuori
2004-03-21 21:07 ` Patrick McHardy
2004-03-21 21:33 ` Nuutti Kotivuori

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=4042B6D3.2010600@trash.net \
    --to=kaber@trash.net \
    --cc=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.