arriven / db1000n

MIT License
1.17k stars 200 forks source link

Can you add limit download/upload speed? #553

Open 1o1o1 opened 2 years ago

1o1o1 commented 2 years ago

Can you add limit download/upload speed? :)

trickle don't work whit db1000n)

I have this msg in logs: "kernel: nf_conntrack: nf_conntrack: table full, dropping packet" :)

arriven commented 2 years ago

you can use --min-interval for that. it will introduce artificial rate limiting to all the jobs. Another option would be to reduce the amount of jobs running by using --scale with some fractional value

it's not a full scale speed limiting (you would need to experiment to find the value that works for you) but doing that would require synchronizing work threads resulting in overall performance degradation

1o1o1 commented 2 years ago

Ok) looks like working well 👍 "-scale 0.6" is good for Archlinux on a VPS ... "-min-interval 2s -scale 0.6" is well for archlinuxarm on my routerboard espressobin :)

seriyps commented 1 year ago

First of all you may just increase the nf_conntrack limit with smth like

sudo sysctl net.netfilter.nf_conntrack_max=128000

You may also limit the overall outgoing throughput of your network interface with smth as simple as

sudo tc qdisc add dev eth0 root tbf rate 20mbps latency 50ms burst 1mb

this would limit the outgoing traffic on eth0 interface to 20 megabytes (160 megabit) per second, but for the whole interface, not just db1000n.