[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Specific HFSC questions



On Sun, Jan 09, 2005 at 11:59:00PM -0800, John Ricardo wrote:
> --- jared r r spiegel <[email protected]> wrote:
> 
> > On Mon, Jan 03, 2005 at 02:33:37PM -0800, John Ricardo wrote:
> > 
> >   to directly answer your question, yes, the bandwidth specified is
> >   unused unless the queue sees packets, and no, it is not *simply* 
> 
> So, to summarize, if I had one queue with a 128 KB/s realtime
> specification and all other queues did not have a realtime
> specification, I would only pass traffic at (max_upload_rate - 128
> KB/s) if the realtime queue was empty (and thus not using the full
> upload bandwidth available)?
  if one queue has 128 KB/s realtime and the others don't have
  realtime, if all data being queued was going into the other queues
  you would see traffic limited to probably whatever those other
  queues' upperlimits/linkshares/bandwith is set to.  not having realtime
  on a queue simply removes the _guarantee_ that data in that queue
  will always be able to receive XYZ bandwidth and makes it subject 
  to any leftover bandwidth at any given time.
 
  in other words, a realtime declaraion specifies the bandwidth that
  will be available if A) the queue wants it and possibly B) saturation exists
  if a queue does not have a realtime declaration, there exists a possibilty
  that under saturation conditions, that queue might not get much bandwith
  at all, possibly none.
> This applies only when specifying things as percentages, and not in the
> case where absolute transfer rates are provided, correct?
  nope, percentages are there as a user-interface (eg: editing pf.conf)
  convenience.  afaict, you should think that from pf's perspective, 
  the percentages are converted into absolute values (calculated against
  the "altq on whatever _bandwidth_") when actually in the processing
  engines of pf itself. 
  eg:
------------------------------------------------------------------------------
$ sudo egrep "^(altq on|queue)" /etc/pf.conf &&\
> echo && sudo pfctl -nvf /etc/pf.conf | egrep "^(altq on|queue)" &&\
> echo && sudo pfctl -vsq
altq on $e hfsc bandwidth 100Mb queue {q-nfs q-yp q-smb q-bulk q-ack}
queue q-nfs     bandwidth 20% hfsc( realtime(0% 4000 40%) linkshare(0% 1000 40%) upperlimit 90%) qlimit 10000
queue q-yp      bandwidth 20% hfsc( realtime(25% 500 1%) linkshare(10% 2000 1%) upperlimit 90%) qlimit 1000
queue q-smb     bandwidth 20% hfsc( realtime(10% 1000 1%) linkshare(30% 1000 5%) upperlimit 90%) qlimit 1000
queue q-bulk    bandwidth 20% hfsc( default realtime(0% 10000 15%) linkshare (0% 10000 30%) upperlimit 90%) qlimit 1000
queue q-ack     bandwidth 20% hfsc( realtime(20% 2000 5%) linkshare(50% 500 5%) upperlimit 5%) qlimit 2000
altq on fxp0 hfsc bandwidth 100Mb tbrsize 12000 queue { q-nfs q-yp q-smb q-bulk q-ack }
queue q-nfs bandwidth 20% qlimit 10000 hfsc( realtime(0 b 4000 40%) linkshare(0 b 1000 40%) upperlimit 90% )
queue q-yp bandwidth 20% qlimit 1000 hfsc( realtime(25% 500 1%) linkshare(10% 2000 1%) upperlimit 90% )
queue q-smb bandwidth 20% qlimit 1000 hfsc( realtime(10% 1000 1%) linkshare(30% 1000 5%) upperlimit 90% )
queue q-bulk bandwidth 20% qlimit 1000 hfsc( default realtime(0 b 10000 15%) linkshare(0 b 10000 30%) upperlimit 90% )
queue q-ack bandwidth 20% qlimit 2000 hfsc( realtime(20% 2000 5%) linkshare(50% 500 5%) upperlimit 5% )
queue root_fxp0 bandwidth 100Mb priority 0 {q-nfs, q-yp, q-smb, q-bulk, q-ack}
  [ pkts:          0  bytes:          0  dropped pkts:      0 bytes:      0 ]
  [ qlength:   0/ 50 ]
queue  q-nfs bandwidth 20Mb qlimit 10000 hfsc( realtime(0 b 4000 40Mb) linkshare(0 b 1000 40Mb) upperlimit 90Mb )
  [ pkts:      23682  bytes:    7406368  dropped pkts:      0 bytes:      0 ]
  [ qlength:   0/10000 ]
queue  q-yp bandwidth 20Mb qlimit 1000 hfsc( realtime(25Mb 500 1Mb) linkshare(10Mb 2000 1Mb) upperlimit 90Mb )
  [ pkts:          0  bytes:          0  dropped pkts:      0 bytes:      0 ]
  [ qlength:   0/1000 ]
queue  q-smb bandwidth 20Mb qlimit 1000 hfsc( realtime(10Mb 1000 1Mb) linkshare(30Mb 1000 5Mb) upperlimit 90Mb )
  [ pkts:        334  bytes:      49355  dropped pkts:      0 bytes:      0 ]
  [ qlength:   0/1000 ]
queue  q-bulk bandwidth 20Mb qlimit 1000 hfsc( default realtime(0 b 10000 15Mb) linkshare(0 b 10000 30Mb) upperlimit 90Mb )
  [ pkts:      27968  bytes:   28051893  dropped pkts:      0 bytes:      0 ]
  [ qlength:   0/1000 ]
queue  q-ack bandwidth 20Mb qlimit 2000 hfsc( realtime(20Mb 2000 5Mb) linkshare(50Mb 500 5Mb) upperlimit 5Mb )
  [ pkts:          0  bytes:          0  dropped pkts:      0 bytes:      0 ]
  [ qlength:   0/2000 ]
------------------------------------------------------------------------------
  i'm not sure at exactly which point the %s get changed into raw numbers
( based upon on the bandwidth value specified in the 'altq on whatever 
  bandwidth whatever' line. ) -- i thought it was when pfctl parsed the
  pf.conf file, but in the output of the '-nvf' line i can still see percents;
  but in the actual output of '-vsq' they're raw numbers.  so percentages 
  are just there to make it easier when writing the altq setup in pf.conf, 
  afaict.
  eg, if you have a standard altq policy for the queues, but need to apply
  that onto several different hosts with different interface bandwidths, 
  using simple percentages can make that an easier task from a typing and
  editing standpoint.
  jared
-- 
[ openbsd 3.6 GENERIC ( dec 11 ) // i386 ]