The pfSense Store

Author Topic: Shaper Bug  (Read 4385 times)

0 Members and 1 Guest are viewing this topic.

Offline sharingzee

  • Newbie
  • *
  • Posts: 8
    • View Profile
Shaper Bug
« on: November 29, 2005, 09:52:20 am »
This otherwise great firewall, Pfsense, as we have tested, in all its releases has a serious bug with Upload Shaping.

For example, you have an ADSL with an up of 4Mbit. If you have 4 Queues for UpLoad and establishes the TOTAL Upload Limit as 4Mbits, it will apply a limit of 4MBits for EACH one of the Queues.

The shaper, in the end, "thinks" that ur Up Limit is "16MBits", messing up your connection.

So you may think, put 1MBit for each queue and you are done. A mistake! If you do this, no more you will have a dynamic sharing between Queues, and each queue will be hard limited at 1MBits, what is no good.

Anyone knows what's happening, tell us.

Att, SharingZee.

Offline billm

  • Administrator
  • Hero Member
  • *****
  • Posts: 731
    • View Profile
    • UCSecurity - Technology discovery and ramblings
Re: Shaper Bug
« Reply #1 on: November 29, 2005, 12:30:24 pm »
Care to send us the rule file?  The wizard doesn't generate 4 upload queues, it generates one master queue with a limit of what you gave it.  The subqueues can then be individually limited (or guaranteed) at your leisure.

--Bill
pfSense core developer
blog - http://www.ucsecurity.com/
twitter - billmarquette

Offline sharingzee

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Shaper Bug
« Reply #2 on: November 29, 2005, 02:06:53 pm »
Well, let me correct myself. It's not 4 UpLoad Queues. Its 4 Queues that r used to address the upload, e.g.: Bulk, and High Prio.

So I put in the MAIN upload a hard limit of 4MBits. Then each one of the Queues that r used for Upload will use 4MBits, summing up 16MBits.

Example: Bulk Queue will take advantage of 4MBits and High Prio Queue more 4MBits, simultaneously. This happens, despite the fact that 4MBits SHOULD be the hard limit shared by every and all Queues.

Again, this fenomenon happens just for UPLOAD, the DownLoad shaping is working right.

Perhaps for this reason so many users report a messed Shaping, as according to various tests we conducted, the pfsense shaper performs mostly very well.

Att, SharingZee.

Offline charincol

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
Re: Shaper Bug
« Reply #3 on: December 02, 2005, 02:17:55 am »
Where are you seeing this?  In the queue graphs?

The main purpose of the "sub"-queues that are a part of the main queues is to guarantee or restrict bandwidth for a certain type of traffic withing the main queue.

Offline billm

  • Administrator
  • Hero Member
  • *****
  • Posts: 731
    • View Profile
    • UCSecurity - Technology discovery and ramblings
Re: Shaper Bug
« Reply #4 on: December 03, 2005, 06:12:11 pm »
Well, let me correct myself. It's not 4 UpLoad Queues. Its 4 Queues that r used to address the upload, e.g.: Bulk, and High Prio.

So I put in the MAIN upload a hard limit of 4MBits. Then each one of the Queues that r used for Upload will use 4MBits, summing up 16MBits.

Example: Bulk Queue will take advantage of 4MBits and High Prio Queue more 4MBits, simultaneously. This happens, despite the fact that 4MBits SHOULD be the hard limit shared by every and all Queues.

Hrm...the *up queues are setup identical to the *down queues and the way ALTQ works, a subqueue can't possibly exceed the bandwidth assigned to the parent queue.  If the parent is set to 4Mbit, no child should ever be able to exceed 4Mbit.  I'm not sure why (or how) you're seeing this.

--Bill

PS. if your line speed is 4Mbit, no way in hell can ALTQ let you upload at 8Mbit - this feels more like a display bug if you're seeing this.
pfSense core developer
blog - http://www.ucsecurity.com/
twitter - billmarquette

Offline sharingzee

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Shaper Bug
« Reply #5 on: December 08, 2005, 07:44:51 am »
No, no, no. My Upload connection is 40MBit, and the Upload Shaper is really screwed. It IS pushing 16MBit Upload.

Offline sharingzee

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Shaper Bug
« Reply #6 on: December 08, 2005, 07:49:02 am »
Well, let me correct myself. It's not 4 UpLoad Queues. Its 4 Queues that r used to address the upload, e.g.: Bulk, and High Prio.

So I put in the MAIN upload a hard limit of 4MBits. Then each one of the Queues that r used for Upload will use 4MBits, summing up 16MBits.

Example: Bulk Queue will take advantage of 4MBits and High Prio Queue more 4MBits, simultaneously. This happens, despite the fact that 4MBits SHOULD be the hard limit shared by every and all Queues.

Hrm...the *up queues are setup identical to the *down queues and the way ALTQ works, a subqueue can't possibly exceed the bandwidth assigned to the parent queue.  If the parent is set to 4Mbit, no child should ever be able to exceed 4Mbit.  I'm not sure why (or how) you're seeing this.

--Bill

PS. if your line speed is 4Mbit, no way in hell can ALTQ let you upload at 8Mbit - this feels more like a display bug if you're seeing this.



There is no child queue exceeding 4MBit. The sum of them all: 4x 4MBit, exceeds 4MBit, since 4x4=16, right? There is the bug, they r being SUMMED UP.

Offline sullrich

  • Hero Member
  • *****
  • Posts: 5110
    • View Profile
    • pfSense
Re: Shaper Bug
« Reply #7 on: December 08, 2005, 10:40:29 am »
There is no child queue exceeding 4MBit. The sum of them all: 4x 4MBit, exceeds 4MBit, since 4x4=16, right? There is the bug, they r being SUMMED UP.

No, these are child queues of a parent queue which holds the bandwidth settings.

Offline billm

  • Administrator
  • Hero Member
  • *****
  • Posts: 731
    • View Profile
    • UCSecurity - Technology discovery and ramblings
Re: Shaper Bug
« Reply #8 on: December 08, 2005, 05:51:58 pm »
No, no, no. My Upload connection is 40MBit, and the Upload Shaper is really screwed. It IS pushing 16MBit Upload.

So what's the download being shaped at?  And is it working as advertised?

--Bill
pfSense core developer
blog - http://www.ucsecurity.com/
twitter - billmarquette

Offline sharingzee

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Shaper Bug
« Reply #9 on: December 08, 2005, 07:28:05 pm »
So, lets put it another way:
How can the pfSense user limit the TOTAL UPLOAD to 4MBit? Who has achieved this feat (for REAL)?

Att, SharingZee.


PS.: Of course: 4MBit dinamically shared by the children Queues.

Offline sullrich

  • Hero Member
  • *****
  • Posts: 5110
    • View Profile
    • pfSense
Re: Shaper Bug
« Reply #10 on: December 08, 2005, 09:16:41 pm »
So, lets put it another way:
How can the pfSense user limit the TOTAL UPLOAD to 4MBit? Who has achieved this feat (for REAL)?

Att, SharingZee.


PS.: Of course: 4MBit dinamically shared by the children Queues.


We just found a major bug that has been present since 0.94ish.

The bug is in the kernel and really wrecks traffic shaping.  Please wait until the next version and test again.

Offline sharingzee

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Shaper Bug
« Reply #11 on: December 18, 2005, 01:14:41 pm »
Yeah, I've tested 0.96.4. The bug remains intact.

Offline sullrich

  • Hero Member
  • *****
  • Posts: 5110
    • View Profile
    • pfSense
Re: Shaper Bug
« Reply #12 on: December 18, 2005, 01:40:34 pm »
Uh, it wasn't fixed in 0.96.4.