Solved [PF] How much memory is needed for ALTQ?

zirias@

Developer
I tried to add some (just a few) cbq queues to my firewall/router and am getting this message now:
Code:
pfctl: DIOCADDALTQ: Cannot allocate memory

The machine is currently configured with 1G RAM and shows 670M free. Could this be too little for ALTQ?

For reference, that's what I tried to configure:
Code:
altq on $ext_if cbq bandwidth 10Mb queue { std, phone }
queue std bandwidth 85% cbq { def, ssh }
queue  def bandwidth 50% cbq(default borrow)
queue  ssh bandwidth 50% priority 2 cbq(borrow) { ssh_interactive, ssh_bulk }
queue   ssh_interactive bandwidth 50% priority 4 cbq(borrow)
queue   ssh_bulk bandwidth 50% priority 1 cbq(borrow)
queue phone bandwidth 15% priority 7 cbq(borrow)
 
I guess that nails it. I'm running 12.0-RELEASE-p3 and just checked my source tree, looks like it doesn't have this patch. And indeed, the config for my router's kernel doesn't include ALTQ_CODEL.

I'll manually apply this patch now and try again, thanks.

Funny thing is, I've even seen this bugreport before, but dismissed it too quickly after seeing "Fixed" and "11.0" ...
 
Indeed, works now. The rules didn't work as I expected, I expected my default queue with the config above to use up to 8.5 Mbps, but it didn't -- maybe a nested default queue with "borrow" just isn't a good idea and that's a different problem anyways which I solved pragmatically by further simplifying the queue config :)
 
Back
Top