• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Do queues get full, or do buffers?

Scheduled Pinned Locked Moved Traffic Shaping
7 Posts 4 Posters 4.1k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J
    JackTripper
    last edited by Feb 4, 2008, 3:49 PM

    i'm thinking about routers and how they need to have buffers.  A packet arrives on the ethernet at the "LAN" network card. The packet cannot be sent right away, so the pfSense box needs to store the packet in memory. This would be called a buffer.

    If packets arrive faster than they can be sent out to the ISP gateway, then the buffer fills up. Once the buffer is full any new packets arriving don't have anyplace to be stored (there is no free memory in the computer to copy them to) and suddenly all packets are dropped.

    Question 1: How big is pfSense's packet buffer? Where can i see how big it is? Can i configure how big it is? And most importantly: how can i see how full it is?

    Next, if you happen to have Traffic Shaping turned on, you can solve the problem where suddenly all packets are dropped, by having the router drop packets. This is done, in pfSense, with the concept of "queues" - incoming packets are classified into queues based on their IP/Port/Protocol. Each queue has it's own particular bandwith limits arbitrarily defined. As a "queue" get's more and more "full", packets in that queue are dropped (if you enable the option for a queue).

    Question 2: Does every queue have it's own buffer? For example, the default queue has 20MB of memory for it's buffer, the ACKs queue has a 5MB buffer, and so on. And when a particular queue's buffer is full, are there no room for more packets?  If you enable traffic shaping is the single global router buffer disabled, and is replaced by many smaller buffers? Can i see the size of each queue's packet buffer? Can i configure the size of each queue's packet buffer? And most importantly, can i see how full each queue's packet buffer is?

    Or are queues only a logical construct, the router has a single packet buffer, and that can be be in different stages of fullness. The queue screen shows a bar graph for each queue but queues aren't buffers (as demonstrated if i have traffic shaping disabled)

    Put it another way - how can i see how full my router's packet buffer(s) are?

    1 Reply Last reply Reply Quote 0
    • E
      eri--
      last edited by Feb 4, 2008, 6:36 PM

      You need to read a bit more and then come back and rethink the questions. :)

      1 Reply Last reply Reply Quote 0
      • J
        JackTripper
        last edited by Feb 5, 2008, 1:17 AM

        @eri--:

        You need to read a bit more and then come back and rethink the questions. :)

        Care to give me a hint?

        1 Reply Last reply Reply Quote 0
        • S
          sullrich
          last edited by Feb 5, 2008, 4:28 AM

          Well, if you wanna go as deep as eri– http://www.sonycsl.co.jp/~kjc/software.html

          Otherwise eri-- should summarize because that's a good question :)

          1 Reply Last reply Reply Quote 0
          • J
            JackTripper
            last edited by Feb 5, 2008, 4:35 PM Feb 5, 2008, 4:33 PM

            @sullrich:

            Well, if you wanna go as deep as eri– http://www.sonycsl.co.jp/~kjc/software.html

            Otherwise eri-- should summarize because that's a good question :)

            i'm going to try rephrasing the question, and asking in another group. Any idea which group would be best to ask the questions:

            Does pfSense buffer packets?
            Can i see the packet buffer's configured size?
            Can i see how full the packet buffer is?
            Can i configure the size of the packet buffer?
            Does the packet buffer automatically take up all available memory?
            Is the packet buffer's size dynamic?

            1 Reply Last reply Reply Quote 0
            • E
              eri--
              last edited by Feb 5, 2008, 5:30 PM Feb 5, 2008, 5:26 PM

              @JackTripper:

              Does pfSense buffer packets?

              Yes, as any other OS. But i would not call it buffering since it is not true buffering.
              It buffers packets destinted to host/router, but just forwards the other packets. Even though, the packet i taken from interface/hardware buffer and copied into router memory and then placed into the outgoing interface buffer.
              While interface hardware does a little of buffering and that's another discussion.

              [qoute]
              Can i see the packet buffer's configured size?
              Can i see how full the packet buffer is?
              Can i configure the size of the packet buffer?

              It is a compile time or system boot time option only.
              You can check it through netstat command. Look for mbuf.

              Does the packet buffer automatically take up all available memory?

              It is configurable as i said and stock pfSense/FreeBSD have limits on this.

              Is the packet buffer's size dynamic?

              The packets destined to the router itself are limited only by hardware resources.
              While packet forwarding memory is limited by what is shown by netstat.

              Queues are an abstraction wich allows managing this 'buffers'.
              On a router it is really hard to congest its incoming since it is FAST on processing packets. The real bottleneck is delivering them which is what ALTQ tries to solve.

              But really all this is OS/network theory and mostly BSD OS one. In how the packets are handled, etc…

              1 Reply Last reply Reply Quote 0
              • G
                GruensFroeschli
                last edited by Feb 8, 2008, 5:01 PM

                This might be interresting.
                http://en.wikipedia.org/wiki/Sliding_Window_Protocol
                http://en.wikipedia.org/wiki/Transmission_Control_Protocol#Flow_control

                We do what we must, because we can.

                Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

                1 Reply Last reply Reply Quote 0
                3 out of 7
                • First post
                  3/7
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                  This community forum collects and processes your personal information.
                  consent.not_received