Friday, August 25, 2006

PF HFSC part I

## Notes on HFSC #
##################
* real-time: guarantee service curves of all leaf classes
* link-sharing: guarantee service curves of interior classes and distribute excess service fairly
* whenever there is a potential of conflict, real-time criteria is used

if (there is an eligible packet)
/* real-time criteria */
send eligible packet with min. deadline d ;
else
/* link-sharing criteria */
send packet with min. virtual time v ;

e - eligible time \ d - deadline \ v - virtual time
#referances that helped me (and the above quotes came from):
http://www-2.cs.cmu.edu/~hzhang/HFSC/TALK/sld038.htm (keep reading till sld045.htm)
http://www-2.cs.cmu.edu/~hzhang/HFSC/intro.html

##Notes on HFSC in PF:
* realtime values cannot add up to be higher than 75% total interface bandwidth, and are calculated for the entire interface instead of parent queues. linkshare values max at 100% as per normal and are calculated within their parent queues
* qlimit is the limit of packets that are waiting in-queue to be sent. if the qlimit is reached an additional packets are dropped. this is in an effort to keep the traffic flowing smoothly instead of backing up causing delays. I assign high queue limits to traffic which i want to be reliable if slow. I assign low qlimits to ensure smooth flow at expense of dropped packets.
* bandwidth (other than on the altq on line itself) is just a fallback value for linkshare. it should not even be neccesary to specify it on newer versions of pf.

#Outgoing Queues on External Bridge Interface (from local to internet) Traffic Conditioning/Shaping

#768kbit upload, using hfsc (78kB/s 624kbit/s max via ftp, pftop shows 85kB/s or 680kbit/s)
altq on $ext hfsc bandwidth 768Kb qlimit 150 queue {root_out }
#only give out 95% of the bandwidth, this helps improve overall queue handling, esp latency
queue root_out bandwidth 95% hfsc(linkshare 89% upperlimit 89{oCtl,oAck,oDly,oBrst,\ oRel, oTput}

#icmp control traffic
queue oCtl bandwidth 16Kb qlimit 15 hfsc( realtime 16Kb linkshare 16Kb )

#tcp ack traffic
queue oAck bandwidth 32Kb qlimit 150 hfsc( realtime 64Kb linkshare 32Kb red )

#latency sens traffic
queue oDly bandwidth 160Kb qlimit 50 hfsc( realtime 164Kb linkshare 160Kb )

#burst-prone traffic
queue oBrst bandwidth 84Kb qlimit 50 hfsc( realtime (256Kb 6000 94Kb) linkshare(2Kb 6000 84Kb))

#reliable traffic
queue oRel bandwidth 128Kb qlimit 100 hfsc(linkshare 128Kb ) { oRelTCP, oRelUDP }
queue oRelTCP bandwidth 64Kb qlimit 50 hfsc (linkshare 64Kb default red )
queue oRelUDP bandwidth 64Kb qlimit 50 hfsc(linkshare 64Kb)

#throughput-oriented traffic
queue oTput bandwidth 100Kb qlimit 25 hfsc(linkshare 100Kb red )

### Outgoing Queues on Internal Bridge Interface (from internet to local) Traffic Conditioning/Shaping
altq on $int hfsc bandwidth 1240Kb queue {root_in }
queue root_in hfsc(linkshare 95%) {iCtl, iAck, iDly, iBrst, iRel,iTput}
queue iCtl bandwidth 3% qlimit 15 hfsc( realtime 16Kb linkshare 16Kb)
queue iAck bandwidth 20% qlimit 1000 hfsc( realtime 64Kb linkshare 64Kb red)
queue iDly bandwidth 20% qlimit 25 hfsc( realtime 128Kb linkshare 128Kb)
queue iBrst bandwidth 20% qlimit 25 hfsc( realtime (256Kb 8000 128Kb)linkshare(512Kb 8000 128Kb)
queue iRel bandwidth 20% qlimit 150 hfsc( realtime 512Kb linkshare 256Kb default)
queue iTput bandwidth 10% qlimit 50 hfsc(linkshare 128Kb)

0 Comments:

Post a Comment

<< Home

Click here to join IndoWLI
Click to join IndoWLI