I've got a FreeBSD host that has a public address assigned to bge0. I have a webserver running on port 80 that is providing an HTTP mirror for one of my buddies. I've got 5Mbits available on this system. What I'm trying to do is cap the mirror at 1Mbit for port 80 and give the rest of the system 4Mbits. When the mirror isn't being utilized, the system would have access to the full 5Mbits by borrowing from the mirror queue.
Here is the queue I have set up. It seems to be working but I have a funny feeling this isn't ideal. When downloading from the mirror I get a download speed of about 120 KB/s which is approx 1Mbit which tells me the cap is working. I don't seem to get the full 5Mbit from the rest of the host even when the mirror is idle.
I apply the queue only on my "pass in" line where I allow in traffic to port 80. The rest will fall under the default queue.
Any suggestions would be great!
Here is the queue I have set up. It seems to be working but I have a funny feeling this isn't ideal. When downloading from the mirror I get a download speed of about 120 KB/s which is approx 1Mbit which tells me the cap is working. I don't seem to get the full 5Mbit from the rest of the host even when the mirror is idle.
Code:
altq on bce0 cbq bandwidth 5Mb queue { default, mirror }
queue default bandwidth 4Mb priority 1 cbq(default borrow)
queue mirror bandwidth 1Mb priority 7
I apply the queue only on my "pass in" line where I allow in traffic to port 80. The rest will fall under the default queue.
Any suggestions would be great!