[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

altq priq Anomaly?



I sent something similar to this to [email protected] with nary a response so I hope
someone on this specialized list can shed some light on this...
I implemented altq's priq a while back in the hope of "speeding up" my
overall 'net connection by prioritizing empty TCP ACKs.  However, I
noticed that I was never coming close to my 256Kb/s upload cap since I
did this and looked into it a little bit further today.
It appears an expected bandwidth value for altq in this scenario:
altq on $ext_if priq bandwidth 240Kb queue { tcp_ack, default }
..limits my upload speed to about half (128Kb/s) of what I should get
and doubling this value:
altq on $ext_if priq bandwidth 480Kb queue { tcp_ack, default }
..gives me my 256Kb/s back.
Details below...  Any thoughts appreciated.
$ uname -mrsv
OpenBSD 3.5 GENERIC#34 i386
Snippet from my normal pf.conf:
altq on $ext_if priq bandwidth 240Kb queue { tcp_ack, default }
queue tcp_ack priority 7
queue default priority 1 priq ( default )
..
nat on $ext_if from $int_if:network to ! $modem -> ( $ext_if:0 )
nat on $ext_if from $int_if:network to $modem -> $ext_alias
..
pass in     quick on $ext_if inet proto tcp from ! $int_if:network to \
        ( $ext_if:0 ) port ssh flags S/SA keep state queue ( default,
tcp_ack )
..
pass out quick on $ext_if inet proto tcp to any flags S/SA \
        keep state queue ( default, tcp_ack )
Output of pfctl -vvs queue during a large FTP upload:
$ sudo pfctl -vvs queue
queue tcp_ack priority 7
  [ pkts:          5  bytes:        270  dropped pkts:      0 bytes:
0 ]
  [ qlength:   0/ 50 ]
queue default priq( default )
  [ pkts:        862  bytes:     754536  dropped pkts:      0 bytes:
0 ]
  [ qlength:   9/ 50 ]
queue tcp_ack priority 7
  [ pkts:          5  bytes:        270  dropped pkts:      0 bytes:
0 ]
  [ qlength:   0/ 50 ]
  [ measured:     0.0 packets/s, 0 b/s ]
queue default priq( default )
  [ pkts:        952  bytes:     827452  dropped pkts:      0 bytes:
0 ]
  [ qlength:  11/ 50 ]
  [ measured:    18.0 packets/s, 116.67Kb/s ]
queue tcp_ack priority 7
  [ pkts:          8  bytes:        432  dropped pkts:      0 bytes:
0 ]
  [ qlength:   0/ 50 ]
  [ measured:     0.3 packets/s, 129.60 b/s ]
queue default priq( default )
  [ pkts:       1052  bytes:     907197  dropped pkts:      0 bytes:
0 ]
  [ qlength:  10/ 50 ]
  [ measured:    19.0 packets/s, 122.13Kb/s ]
Simply updating my pf.conf with:
altq on $ext_if priq bandwidth 480Kb queue { tcp_ack, default }
..and reloading my rules with:
$ sudo pfctl -f /etc/pf.conf
..during the current same FTP upload process gives:
$ sudo pfctl -vvs queue
queue tcp_ack priority 7
  [ pkts:          0  bytes:          0  dropped pkts:      0 bytes:
0 ]
  [ qlength:   0/ 50 ]
queue default priq( default )
  [ pkts:         53  bytes:      54598  dropped pkts:      0 bytes:
0 ]
  [ qlength:   7/ 50 ]
queue tcp_ack priority 7
  [ pkts:          0  bytes:          0  dropped pkts:      0 bytes:
0 ]
  [ qlength:   0/ 50 ]
  [ measured:     0.0 packets/s, 0 b/s ]
queue default priq( default )
  [ pkts:        233  bytes:     212130  dropped pkts:      0 bytes:
0 ]
  [ qlength:   5/ 50 ]
  [ measured:    36.0 packets/s, 252.05Kb/s ]
queue tcp_ack priority 7
  [ pkts:          3  bytes:        162  dropped pkts:      0 bytes:
0 ]
  [ qlength:   0/ 50 ]
  [ measured:     0.3 packets/s, 129.60 b/s ]
queue default priq( default )
  [ pkts:        410  bytes:     369754  dropped pkts:      0 bytes:
0 ]
  [ qlength:   2/ 50 ]
  [ measured:    35.7 packets/s, 252.12Kb/s ]
So what's going on?  Why is the first altq statement not allowing me to
get close to my maximum (when there is mostly nothing in the higher
priority queue)?  Dmesg below...
Thanks,
Danny
$ dmesg
OpenBSD 3.5 (GENERIC) #34: Mon Mar 29 12:24:55 MST 2004
    [email protected]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel Pentium II ("GenuineIntel" 686-class, 512KB L2 cache) 233
MHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,F
XSR
real mem  = 100184064 (97836K)
avail mem = 86691840 (84660K)
using 1248 buffers containing 5111808 bytes (4992K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(63) BIOS, date 12/28/99, BIOS32 rev. 0 @
0xfc780
apm0 at bios0: Power Management spec V1.2
apm0: battery life expectancy 100%
apm0: AC on, battery charge high, estimated 2:09 hours
pcibios0 at bios0: rev. 2.1 @ 0xf0000/0x10000
pcibios0: PCI IRQ Routing Table rev. 1.0 @ 0xf72f0/112 (5 entries)
pcibios0: PCI Interrupt Router at 000:05:0 ("Intel 82371FB ISA" rev
0x00)
pcibios0: PCI bus #3 is the last bus
bios0: ROM list: 0xc0000/0xc000
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel 82443BX AGP" rev 0x02
ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x02
pci1 at ppb0 bus 1
vga1 at pci1 dev 3 function 0 "S3 ViRGE MX" rev 0x06
wsdisplay0 at vga1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pcib0 at pci0 dev 5 function 0 "Intel 82371AB PIIX4 ISA" rev 0x02
pciide0 at pci0 dev 5 function 1 "Intel 82371AB IDE" rev 0x01: DMA,
channel 0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <TOSHIBA MK4006MAV>
wd0: 16-sector PIO, LBA, 3909MB, 8007552 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <TEAC, CD-220EA, 7.1B> SCSI0 5/cdrom
removable
cd0(pciide0:1:0): using PIO mode 4, DMA mode 2
uhci0 at pci0 dev 5 function 2 "Intel 82371AB USB" rev 0x01: irq 11
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
"Intel 82371AB Power Mgmt" rev 0x02 at pci0 dev 5 function 3 not
configured
"Toshiba Fast Infrared Type O" rev 0x33 at pci0 dev 9 function 0 not
configured
cbb0 at pci0 dev 11 function 0 "Toshiba ToPIC97 CardBus" rev 0x44: irq
11
cbb1 at pci0 dev 11 function 1 "Toshiba ToPIC97 CardBus" rev 0x44: irq
11
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
sb0 at isa0 port 0x220/24 irq 5 drq 1: dsp v3.01
midi0 at sb0: <SB MIDI UART>
audio0 at sb0
opl0 at sb0: model OPL3
midi1 at opl0: <SB Yamaha OPL3>
wss0 at isa0 port 0x530/8 irq 10 drq 0: CS4231 or AD1845 (vers 4)
audio1 at wss0
pcppi0 at isa0 port 0x61
midi2 at pcppi0: <PC speaker>
sysbeep0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom1 at isa0 port 0x2f8/8 irq 3: ns8250, no fifo
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 2 device 0 cacheline 0x0, lattimer 0x0
pcmcia0 at cardslot0
cardslot1 at cbb1 slot 1 flags 0
cardbus1 at cardslot1: bus 3 device 0 cacheline 0x0, lattimer 0x0
pcmcia1 at cardslot1
biomask c840 netmask c840 ttymask d8c2
pctr: 686-class user-level performance counters enabled
mtrr: Pentium Pro MTRR support
dkcsum: wd0 matched BIOS disk 80
root on wd0a
rootdev=0x0 rrootdev=0x300 rawdev=0x302
xl0 at cardbus0 dev 0 function 0 "3Com Corporation, 3CCFE575CT, LAN
Cardbus Card": 3Com 3c575C-TX Ethernet: irq 11 address 00:04:75:bd:be:f7
ukphy0 at xl0 phy 0: Generic IEEE 802.3u media interface
ukphy0: OUI 0x00c000, model 0x0000, rev. 0
wi0 at pcmcia1 function 0 "INTERSIL, HFA384x/IEEE, Version 01.02" port
0xa000/64
wi0: PRISM2.5 ISL3873, Firmware 1.1.1 (primary), 1.8.2 (station),
address 00:02:6f:09:58:b2