Sum of children - using percentages and lowering



  • 2.3.1-RELEASE-p5

    I have a 100Mb connection and have my WAN and LAN shaped to 99Mb and 98Mb respectively. All of my HFSC settings are in percentages. My ISP is rolling out upgrades and I was trying to see if I got upgraded yet so I set my Interfaces to 1000Mb. Unfortunately I have not been upgraded.

    Here comes the rub. I went to set my interfaces back to 99 and 98, but then I got the dreaded "Sum of children greater than parent" or whatever error. After looking everything over, I saw no issues with my settings, so I gave this a try

    Instead of percentages, I switched to Mbit. Suddenly it worked and I could set my interfaces down to 99Mb. So then I switched them back to percentages, and it still worked. Then I increased my Interface to 100Mb, and that still worked. Then I tried to set my interface back down to 99, and I got the error again.

    My guess is the UI is translating the percentages into actual Units. So when I increased my interface bandwidth, it just recalculates the percentages. BUT.. If I try to lower the bandwidth of the Interface, it looks at the current units assigned and says "Hell no" because the interface would be too slow. eg 20% of 1000Mb is 200Mb, so when I change the Interface from 1Gb to 100Mb, it says 200Mb cannot fit in 100Mb, when in reality it should be a percentage and should dynamically calculate the values for me.

    In short, I think the validation logic is using the current interface bandwidth when calculating percentages for validation instead of the desired interface bandwidth.

    edit: I think this only applies to queues directly under the root because child queues were still using percentages and didn't seem to care.



  • pf itself accepts percentages so the GUI is probably not translating them.

    You could SSH in and run "pfctl -s queue" to see what values are actually being used by pf, which will quickly confirm/deny your theory.



  • Yeah, looks like the UI or some layer between is converting percentages into actual values.

    queue root_igb0 on igb0 bandwidth 100Mb priority 0 {qACK, qUnclassified, qClassified}
    queue  qACK on igb0 bandwidth 20Mb qlimit 1024
    queue  qUnclassified on igb0 bandwidth 30Mb {qUDP, qDefault}
    queue  qUDP on igb0 bandwidth 13.20Mb qlimit 1024 hfsc( codel linkshare(16.50Mb 5 13.20Mb) )
    queue  qDefault on igb0 bandwidth 13.20Mb qlimit 1024 hfsc( codel default )
    queue  qClassified on igb0 bandwidth 49Mb {qNormal, qHigh}
    queue  qNormal on igb0 bandwidth 21.56Mb qlimit 1024 hfsc( codel )
    queue  qHigh on igb0 bandwidth 21.56Mb qlimit 1024 hfsc( codel linkshare(26.95Mb 5 21.56Mb) )
    queue root_igb1 on igb1 bandwidth 99Mb priority 0 {qACK, qUnclassified, qClassified}
    queue  qACK on igb1 bandwidth 19.80Mb qlimit 1024
    queue  qUnclassified on igb1 bandwidth 29.70Mb {qUDP, qDefault}
    queue  qUDP on igb1 bandwidth 13.07Mb qlimit 1024 hfsc( codel linkshare(16.34Mb 5 13.07Mb) )
    queue  qDefault on igb1 bandwidth 13.07Mb qlimit 1024 hfsc( codel default upperlimit 23.76Mb )
    queue  qClassified on igb1 bandwidth 48.51Mb {qNormal, qHigh}
    queue  qNormal on igb1 bandwidth 21.34Mb qlimit 1024 hfsc( codel )
    queue  qHigh on igb1 bandwidth 21.34Mb qlimit 1024 hfsc( codel linkshare(26.68Mb 5 21.34Mb) )



  • After the last post I noticed my WAN was 100Mb. I set it to 99Mb and it worked.. I was like… Hmmm.. I'm using percentages and just decreased the rate and it worked. So I tried 98Mb and I got the error again. If you look at the actual numbers for the parent queues, they only add up to 99Mb even though the Interface is 100Mb. That's because the UI does not like real numbers. So setting it to 99Mb was fine. But trying to set to 98Mb was right-out. Tallied values are now 98.01Mb. If only I could use real-numbers  :p

    queue root_igb0 on igb0 bandwidth 99Mb priority 0 {qACK, qUnclassified, qClassified}
    queue  qACK on igb0 bandwidth 19.80Mb qlimit 1024
    queue  qUnclassified on igb0 bandwidth 29.70Mb {qUDP, qDefault}
    queue  qUDP on igb0 bandwidth 13.07Mb qlimit 1024 hfsc( codel linkshare(16.34Mb 5 13.07Mb) )
    queue  qDefault on igb0 bandwidth 13.07Mb qlimit 1024 hfsc( codel default )
    queue  qClassified on igb0 bandwidth 48.51Mb {qNormal, qHigh}
    queue  qNormal on igb0 bandwidth 21.34Mb qlimit 1024 hfsc( codel )
    queue  qHigh on igb0 bandwidth 21.34Mb qlimit 1024 hfsc( codel linkshare(26.68Mb 5 21.34Mb) )
    queue root_igb1 on igb1 bandwidth 99Mb priority 0 {qACK, qUnclassified, qClassified}
    queue  qACK on igb1 bandwidth 19.80Mb qlimit 1024
    queue  qUnclassified on igb1 bandwidth 29.70Mb {qUDP, qDefault}
    queue  qUDP on igb1 bandwidth 13.07Mb qlimit 1024 hfsc( codel linkshare(16.34Mb 5 13.07Mb) )
    queue  qDefault on igb1 bandwidth 13.07Mb qlimit 1024 hfsc( codel default upperlimit 23.76Mb )
    queue  qClassified on igb1 bandwidth 48.51Mb {qNormal, qHigh}
    queue  qNormal on igb1 bandwidth 21.34Mb qlimit 1024 hfsc( codel )
    queue  qHigh on igb1 bandwidth 21.34Mb qlimit 1024 hfsc( codel linkshare(26.68Mb 5 21.34Mb) )


Log in to reply