Kernel_Killer
July 19th, 2006, 07:04
I wanted to see if anyone could verify this for me. So far so good from a good hour of watching 'pfctl -vvsq', but I'm still not 100% sure that it's limiting correctly.

Total Download: 3 Mbit
Total Upload: 512Kbit

The limiting:

#outbound traffic
altq on $int2 cbq bandwidth 1Mb queue {wins_out}
queue wins_out bandwidth 1Mb cbq(default)

altq on $int3 cbq bandwidth 1Mb queue {dom2_out}
queue dom2_out bandwidth 1Mb cbq(default)

altq on $int4 cbq bandwidth 1Mb queue {voip_out}
queue voip_out bandwidth 1Mb cbq(default)

#inbound traffic
altq on $ext cbq bandwidth 512Kb queue {voip, dom1, dom2}
queue voip bandwidth 256Kb cbq(default)
queue dom1 bandwidth 128Kb priority 4
queue dom2 bandwidth 128Kb priority 5


and the Rules:

#queuing download traffic
pass out on $int3 from $net3 to any flags S/SA keep state queue dom2_out
pass out on $int2 from $net2 to any flags S/SA keep state queue wins_out
pass out on $int4 from $voip to any flags S/SA keep state queue voip_out

#queuing upload traffic
pass in on $int4 from $voip to any keep state queue voip
pass in on $int3 from $net3 to any keep state queue dom2
pass in on $int2 from $net2 to any keep state queue dom1


So, I start an upload via SFTP from a box on Network 2, off of Interface 2.

Average: 16.0KB/s


queue root_de1 bandwidth 1Mb priority 0 cbq( wrr root ) {wins_out}
[ pkts: 1802 bytes: 2297347 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 14.3 packets/s, 14.85Kb/s ]
queue wins_out bandwidth 1Mb cbq( default )
[ pkts: 1802 bytes: 2297347 dropped pkts: 2 bytes: 1640 ]
[ qlength: 0/ 50 borrows: 0 suspends: 5 ]
[ measured: 14.3 packets/s, 14.85Kb/s ]
queue root_dc0 bandwidth 1Mb priority 0 cbq( wrr root ) {dom2_out}
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue dom2_out bandwidth 1Mb cbq( default )
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue root_rl0 bandwidth 1Mb priority 0 cbq( wrr root ) {voip_out}
[ pkts: 5 bytes: 1153 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 0.1 packets/s, 36.80 b/s ]
queue voip_out bandwidth 1Mb cbq( default )
[ pkts: 5 bytes: 1153 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 0.1 packets/s, 36.80 b/s ]
queue root_tun0 bandwidth 512Kb priority 0 cbq( wrr root ) {voip, dom1, dom2}
[ pkts: 1208 bytes: 259774 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 11.5 packets/s, 126.98Kb/s ]
queue voip bandwidth 256Kb cbq( default )
[ pkts: 2 bytes: 1528 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue dom1 bandwidth 128Kb priority 4
[ pkts: 1206 bytes: 258246 dropped pkts: 0 bytes: 0 ]
[ qlength: 5/ 50 borrows: 0 suspends: 62 ]
[ measured: 11.5 packets/s, 126.98Kb/s ]
queue dom2 bandwidth 128Kb priority 5
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 0.0 packets/s, 0 b/s ]


Then I download a file from the server, on to the system in Network 2.

Average: 101KB/s


queue root_de1 bandwidth 1Mb priority 0 cbq( wrr root ) {wins_out}
[ pkts: 3109 bytes: 3815851 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 73.9 packets/s, 793.73Kb/s ]
queue wins_out bandwidth 1Mb cbq( default )
[ pkts: 3109 bytes: 3815851 dropped pkts: 6 bytes: 6316 ]
[ qlength: 24/ 50 borrows: 0 suspends: 19 ]
[ measured: 73.9 packets/s, 793.73Kb/s ]
queue root_dc0 bandwidth 1Mb priority 0 cbq( wrr root ) {dom2_out}
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue dom2_out bandwidth 1Mb cbq( default )
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue root_rl0 bandwidth 1Mb priority 0 cbq( wrr root ) {voip_out}
[ pkts: 11 bytes: 1867 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 0.1 packets/s, 24.53 b/s ]
queue voip_out bandwidth 1Mb cbq( default )
[ pkts: 11 bytes: 1867 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 0.1 packets/s, 24.53 b/s ]
queue root_tun0 bandwidth 512Kb priority 0 cbq( wrr root ) {voip, dom1, dom2}
[ pkts: 2072 bytes: 337167 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 50.1 packets/s, 25.59Kb/s ]
queue voip bandwidth 256Kb cbq( default )
[ pkts: 3 bytes: 2291 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue dom1 bandwidth 128Kb priority 4
[ pkts: 2069 bytes: 334876 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 67 ]
[ measured: 50.1 packets/s, 25.59Kb/s ]
queue dom2 bandwidth 128Kb priority 5
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 0.0 packets/s, 0 b/s ]



Last, I make a call to myself, from my VoIP phone ($voip respectively, on Network 4) to my cell phone:

queue root_de1 bandwidth 1Mb priority 0 cbq( wrr root ) {wins_out}
[ pkts: 4589 bytes: 5664795 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 5.8 packets/s, 9.43Kb/s ]
queue wins_out bandwidth 1Mb cbq( default )
[ pkts: 4589 bytes: 5664795 dropped pkts: 6 bytes: 6316 ]
[ qlength: 0/ 50 borrows: 0 suspends: 50 ]
[ measured: 5.8 packets/s, 9.43Kb/s ]
queue root_dc0 bandwidth 1Mb priority 0 cbq( wrr root ) {dom2_out}
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue dom2_out bandwidth 1Mb cbq( default )
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue root_rl0 bandwidth 1Mb priority 0 cbq( wrr root ) {voip_out}
[ pkts: 1624 bytes: 123853 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 50.3 packets/s, 29.96Kb/s ]
queue voip_out bandwidth 1Mb cbq( default )
[ pkts: 1624 bytes: 123853 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 50.3 packets/s, 29.96Kb/s ]
queue root_tun0 bandwidth 512Kb priority 0 cbq( wrr root ) {voip, dom1, dom2}
[ pkts: 4098 bytes: 485389 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 35.0 packets/s, 20.80Kb/s ]
queue voip bandwidth 256Kb cbq( default )
[ pkts: 1080 bytes: 85616 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 33.5 packets/s, 19.99Kb/s ]
queue dom1 bandwidth 128Kb priority 4
[ pkts: 3018 bytes: 399773 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 67 ]
[ measured: 1.5 packets/s, 809.33 b/s ]
queue dom2 bandwidth 128Kb priority 5
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 0.0 packets/s, 0 b/s ]



For some reason, I feel like I've missed something, but I have yet to figure it out. I know the other network, but I could care less as long as I can get these other two nailed down. I'm sure someone would have something to say to improve my 4 altq roots. :icon_smil

Kernel_Killer
August 1st, 2006, 09:28
Well, I've run across a speed bump on this. When a network is using it's capability fully, the other networks slow down almost to halt. If I remove the rulesets, all is good, and everything just tramples over itself. I added more memory (no more swap use now), and top only shows about 4% CPU being used. *shrug*

Kernel_Killer
September 22nd, 2006, 14:56
Well, I found the issue. I contacted Nuvio support this week because the random drops, and horrible initiations were starting to get on my nerves. In their user Control Panel, there was a setting for voice quality, and I was set by default to 10Kbps for some reason, and only getting 8kbps sound quality. Now I'm at the max, 64Kbps, and so far so good. Bandwidth limitation is good an everything.