Before now I've only used IPFW + Dummynet, but decided to use PF and ALTQ for dynamic shaping. But I can't make it use whole bandwidth when there is only one host on, so the link is free, borrow parameter is designed to expand parent bandwidth when it is free, but not in my case

current configuration gives host only 50% of bandwidth even when the link is free,
here is PF config:

If you want to altq outbound traffic you shoud assign queues to pass out rules on external interface
If you want to altq incoming traffic you should assign queues to pass out rules on internal interface.

i.e. if you want to control download assign rules to int_if, if you want to control upload assign rules to ext_if.

I also see that you did't assign default_* queues to any rules.

__________________
The best way to learn UNIX is to play with it, and the harder you play, the more you learn.
If you play hard enough, you'll break something for sure, and having to fix a badly broken system is arguably the fastest way of all to learn. -Michael Lucas, AbsoluteBSD

It seems that when I specified borrow in parent queues (inet_in and inet_out) I only allowed them to borrow from "grandparent" queue, which is 100Mb - so it is not 50% anymore, but really is the same as with no shaping at all! I also tried different approaches.
See (in attachment) what pfctl -sq -vv looks like when user2 is downloading (commented out user1 for simplicity)
On user2 machine wget shows stable 32K/s!

Quote:

i.e. if you want to control download assign rules to int_if, if you want to control upload assign rules to ext_if.

Yes, that's 100% true, I've changed the assignment accordingly

Code:

# Queues
# OUT
#pass in on $int_if from <user1_ips> to !$lan queue user1_out no state
pass in on $ext_if from <user2_ips> to !$lan queue user2_out no state
# IN
#pass out on $int_if from !$lan to <user1_ips> queue user1_in no state
pass out on $int_if from !$lan to <user2_ips> queue user2_in no state

assign default_* queues - is this really important in such a situation?

__________________
The best way to learn UNIX is to play with it, and the harder you play, the more you learn.
If you play hard enough, you'll break something for sure, and having to fix a badly broken system is arguably the fastest way of all to learn. -Michael Lucas, AbsoluteBSD