Do queues get full, or do buffers?
-
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?
-
You need to read a bit more and then come back and rethink the questions. :)
-
You need to read a bit more and then come back and rethink the questions. :)
Care to give me a hint?
-
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 :)
-
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? -
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…
-
This might be interresting.
http://en.wikipedia.org/wiki/Sliding_Window_Protocol
http://en.wikipedia.org/wiki/Transmission_Control_Protocol#Flow_control