# kern.hz and dummynet trafic shaping



## mlevel (Feb 25, 2017)

Hi guys,

I'm trying to figure out is there any relationship between `kern.hz` parameter and dummynet performance in terms of traffic shaping. Not it's by default = 1000. But is there a need to change it when you have more pps or interrupts?

Currently, I'm shaping ~1 Gbit/s of traffic (around 1500 users) using pipes and tablearg, giving 10 to 100 Mbits per each user.

A lot of users complaining about the low speed, I've checked everything in between and now I want to make sure that dummynet is not an issue here. 

Here's an example of my dummynet pipes:

```
ipfw pipe 10 config bw 10760Kbit/s queue 60 mask dst-ip 0xffffffff gred 0.002/10/30/0.1
ipfw pipe 110 config bw 10760Kbit/s queue 60 mask src-ip 0xffffffff gred 0.002/10/30/0.1
```

Here are all the parameters for dummynet in sysctl:

```
net.inet.ip.dummynet.fqpie.limit: 10240
net.inet.ip.dummynet.fqpie.flows: 1024
net.inet.ip.dummynet.fqpie.quantum: 1514
net.inet.ip.dummynet.fqpie.beta: 1250
net.inet.ip.dummynet.fqpie.alpha: 125
net.inet.ip.dummynet.fqpie.max_ecnth: 99
net.inet.ip.dummynet.fqpie.max_burst: 150000
net.inet.ip.dummynet.fqpie.tupdate: 15000
net.inet.ip.dummynet.fqpie.target: 15000
net.inet.ip.dummynet.fqcodel.limit: 10240
net.inet.ip.dummynet.fqcodel.flows: 1024
net.inet.ip.dummynet.fqcodel.quantum: 1514
net.inet.ip.dummynet.fqcodel.interval: 100000
net.inet.ip.dummynet.fqcodel.target: 5000
net.inet.ip.dummynet.pie.beta: 1250
net.inet.ip.dummynet.pie.alpha: 125
net.inet.ip.dummynet.pie.max_ecnth: 99
net.inet.ip.dummynet.pie.max_burst: 150000
net.inet.ip.dummynet.pie.tupdate: 15000
net.inet.ip.dummynet.pie.target: 15000
net.inet.ip.dummynet.codel.interval: 100000
net.inet.ip.dummynet.codel.target: 5000
net.inet.ip.dummynet.io_pkt_drop: 390667012
net.inet.ip.dummynet.io_pkt_fast: 19963602637
net.inet.ip.dummynet.io_pkt: 32694198067
net.inet.ip.dummynet.queue_count: 0
net.inet.ip.dummynet.fsk_count: 18
net.inet.ip.dummynet.si_count: 2400
net.inet.ip.dummynet.schk_count: 36
net.inet.ip.dummynet.expire_cycle: 0
net.inet.ip.dummynet.expire: 1
net.inet.ip.dummynet.tick_lost: 0
net.inet.ip.dummynet.tick_diff: -26663
net.inet.ip.dummynet.tick_adjustment: 59899
net.inet.ip.dummynet.tick_delta_sum: -968
net.inet.ip.dummynet.tick_delta: 0
net.inet.ip.dummynet.red_max_pkt_size: 1500
net.inet.ip.dummynet.red_avg_pkt_size: 512
net.inet.ip.dummynet.red_lookup_depth: 256
net.inet.ip.dummynet.debug: 0
net.inet.ip.dummynet.io_fast: 1
net.inet.ip.dummynet.pipe_byte_limit: 1048576
net.inet.ip.dummynet.pipe_slot_limit: 1000
net.inet.ip.dummynet.hash_size: 65536
```


----------

