Is it possible to change the priority/nice values for an application's access to the NIC, giving precedence for bandwidth?
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
Is it possible to tune which applications receive the most bandwidth on a NIC, similar to the -20 to +20 Nice value but for bandwidth instead of processor-time?
Transmission seems to choke out my other applications. I can slow down the application from its options but I wondered if there was a linux/non-application-specific solution where I can view and tune everything that has network access.
Update:
I suspect the problem is shown in the output below. Currently all web and transmission traffic is TCP source port 80 and a dynamic destination port, and is lumped together in class 0:3 (with 16810552 bytes and 171075 packets). So, because my web connection is not that fast, transmission is choking it out just enough for me to get timeouts. The output shows that no packets are being dropped by the queuing discipline.
I'm looking at tcng as a possible solution because of the configuration already present.
$ tc qdisc show dev wlp2s0
qdisc mq 0: root
qdisc fq_codel 0: parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
qdisc fq_codel 0: parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
qdisc fq_codel 0: parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
qdisc fq_codel 0: parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
$ tc -g -s class show dev wlp2s0
+---(:4) mq
| Sent 5670 bytes 105 pkt (dropped 0, overlimits 0 requeues 1)
| backlog 0b 0p requeues 1
|
+---(:3) mq
| Sent 16810552 bytes 171075 pkt (dropped 0, overlimits 0 requeues 0)
| backlog 0b 0p requeues 0 competing for bandwidth
|
+---(:2) mq
| Sent 2538 bytes 31 pkt (dropped 0, overlimits 0 requeues 1)
| backlog 0b 0p requeues 1
|
+---(:1) mq
Sent 13432 bytes 76 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
networking network-interface bandwidth
add a comment |Â
up vote
3
down vote
favorite
Is it possible to tune which applications receive the most bandwidth on a NIC, similar to the -20 to +20 Nice value but for bandwidth instead of processor-time?
Transmission seems to choke out my other applications. I can slow down the application from its options but I wondered if there was a linux/non-application-specific solution where I can view and tune everything that has network access.
Update:
I suspect the problem is shown in the output below. Currently all web and transmission traffic is TCP source port 80 and a dynamic destination port, and is lumped together in class 0:3 (with 16810552 bytes and 171075 packets). So, because my web connection is not that fast, transmission is choking it out just enough for me to get timeouts. The output shows that no packets are being dropped by the queuing discipline.
I'm looking at tcng as a possible solution because of the configuration already present.
$ tc qdisc show dev wlp2s0
qdisc mq 0: root
qdisc fq_codel 0: parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
qdisc fq_codel 0: parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
qdisc fq_codel 0: parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
qdisc fq_codel 0: parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
$ tc -g -s class show dev wlp2s0
+---(:4) mq
| Sent 5670 bytes 105 pkt (dropped 0, overlimits 0 requeues 1)
| backlog 0b 0p requeues 1
|
+---(:3) mq
| Sent 16810552 bytes 171075 pkt (dropped 0, overlimits 0 requeues 0)
| backlog 0b 0p requeues 0 competing for bandwidth
|
+---(:2) mq
| Sent 2538 bytes 31 pkt (dropped 0, overlimits 0 requeues 1)
| backlog 0b 0p requeues 1
|
+---(:1) mq
Sent 13432 bytes 76 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
networking network-interface bandwidth
You can do this with namespaces. I have only done this with services in docker. However it will be possible to do what you want as well. But I have not done it. (It is a feature of the Linux kernel, finding user mode tools may or may not be tricky.)
â ctrl-alt-delor
Aug 11 at 8:48
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
Is it possible to tune which applications receive the most bandwidth on a NIC, similar to the -20 to +20 Nice value but for bandwidth instead of processor-time?
Transmission seems to choke out my other applications. I can slow down the application from its options but I wondered if there was a linux/non-application-specific solution where I can view and tune everything that has network access.
Update:
I suspect the problem is shown in the output below. Currently all web and transmission traffic is TCP source port 80 and a dynamic destination port, and is lumped together in class 0:3 (with 16810552 bytes and 171075 packets). So, because my web connection is not that fast, transmission is choking it out just enough for me to get timeouts. The output shows that no packets are being dropped by the queuing discipline.
I'm looking at tcng as a possible solution because of the configuration already present.
$ tc qdisc show dev wlp2s0
qdisc mq 0: root
qdisc fq_codel 0: parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
qdisc fq_codel 0: parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
qdisc fq_codel 0: parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
qdisc fq_codel 0: parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
$ tc -g -s class show dev wlp2s0
+---(:4) mq
| Sent 5670 bytes 105 pkt (dropped 0, overlimits 0 requeues 1)
| backlog 0b 0p requeues 1
|
+---(:3) mq
| Sent 16810552 bytes 171075 pkt (dropped 0, overlimits 0 requeues 0)
| backlog 0b 0p requeues 0 competing for bandwidth
|
+---(:2) mq
| Sent 2538 bytes 31 pkt (dropped 0, overlimits 0 requeues 1)
| backlog 0b 0p requeues 1
|
+---(:1) mq
Sent 13432 bytes 76 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
networking network-interface bandwidth
Is it possible to tune which applications receive the most bandwidth on a NIC, similar to the -20 to +20 Nice value but for bandwidth instead of processor-time?
Transmission seems to choke out my other applications. I can slow down the application from its options but I wondered if there was a linux/non-application-specific solution where I can view and tune everything that has network access.
Update:
I suspect the problem is shown in the output below. Currently all web and transmission traffic is TCP source port 80 and a dynamic destination port, and is lumped together in class 0:3 (with 16810552 bytes and 171075 packets). So, because my web connection is not that fast, transmission is choking it out just enough for me to get timeouts. The output shows that no packets are being dropped by the queuing discipline.
I'm looking at tcng as a possible solution because of the configuration already present.
$ tc qdisc show dev wlp2s0
qdisc mq 0: root
qdisc fq_codel 0: parent :4 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
qdisc fq_codel 0: parent :3 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
qdisc fq_codel 0: parent :2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
qdisc fq_codel 0: parent :1 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 32Mb ecn
$ tc -g -s class show dev wlp2s0
+---(:4) mq
| Sent 5670 bytes 105 pkt (dropped 0, overlimits 0 requeues 1)
| backlog 0b 0p requeues 1
|
+---(:3) mq
| Sent 16810552 bytes 171075 pkt (dropped 0, overlimits 0 requeues 0)
| backlog 0b 0p requeues 0 competing for bandwidth
|
+---(:2) mq
| Sent 2538 bytes 31 pkt (dropped 0, overlimits 0 requeues 1)
| backlog 0b 0p requeues 1
|
+---(:1) mq
Sent 13432 bytes 76 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
networking network-interface bandwidth
networking network-interface bandwidth
edited Aug 12 at 17:05
asked Aug 11 at 0:15
trogdor
371314
371314
You can do this with namespaces. I have only done this with services in docker. However it will be possible to do what you want as well. But I have not done it. (It is a feature of the Linux kernel, finding user mode tools may or may not be tricky.)
â ctrl-alt-delor
Aug 11 at 8:48
add a comment |Â
You can do this with namespaces. I have only done this with services in docker. However it will be possible to do what you want as well. But I have not done it. (It is a feature of the Linux kernel, finding user mode tools may or may not be tricky.)
â ctrl-alt-delor
Aug 11 at 8:48
You can do this with namespaces. I have only done this with services in docker. However it will be possible to do what you want as well. But I have not done it. (It is a feature of the Linux kernel, finding user mode tools may or may not be tricky.)
â ctrl-alt-delor
Aug 11 at 8:48
You can do this with namespaces. I have only done this with services in docker. However it will be possible to do what you want as well. But I have not done it. (It is a feature of the Linux kernel, finding user mode tools may or may not be tricky.)
â ctrl-alt-delor
Aug 11 at 8:48
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
2
down vote
Traffic shaping QoS
I've historically used tools such as Wondershaper, Trickle, or pyshaper to throttle network traffic.
Examples
Trickle
To throttle the upload/download speed to 20Kbps.
$ trickle -d 20 wget -c http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
You can also set these independently in the above scenario. You can also make these settings the default like so.
$ trickled -d 50 -u 10
Wondershaper
You can also use Wondershaper to control the bandwidth at the network level. For example say I want to throttle my eth1
device.
$ sudo wondershaper eth1 1024 256
This will give me a Download speed of 1024 Kbits and 256 Kbits Upload. Which are 128KB and 16KB.
When you want to release the caps.
$ sudo wondershaper clear eth1
pyshaper
I've extensively covered pyshaper
on the site before, see these U&L Q&As titled:
- How to change speed limit of running trickle instance
- Limit outgoing bandwidth on an specific interface
These are pretty capable tools so this is just meant to show you the potential.
References
- How do I limit internet bandwidth?
- Control your bandwidth with Trickle
add a comment |Â
up vote
1
down vote
Probably what you are looking for is quality of service (QoS) which may not be easily available in your favorite firewall (like iptables
, nftables
, pf
, ufw
, etc) but should be simple on any modern router and operates by IP/port.
iptables example;
https://serverfault.com/questions/762921/qos-with-iptables-and-tc-with-unstable-wan
As slm mentioned trickle
can be used when starting a process when not using commands (like rsync
, curl
, wget
) which have rate limiting as a built in option.
wondershaper
can be used to limit by [virtual] interface which is usefull for commands and VMs that can be bound to a nic (like rsync
, curl
, wget
).
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Traffic shaping QoS
I've historically used tools such as Wondershaper, Trickle, or pyshaper to throttle network traffic.
Examples
Trickle
To throttle the upload/download speed to 20Kbps.
$ trickle -d 20 wget -c http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
You can also set these independently in the above scenario. You can also make these settings the default like so.
$ trickled -d 50 -u 10
Wondershaper
You can also use Wondershaper to control the bandwidth at the network level. For example say I want to throttle my eth1
device.
$ sudo wondershaper eth1 1024 256
This will give me a Download speed of 1024 Kbits and 256 Kbits Upload. Which are 128KB and 16KB.
When you want to release the caps.
$ sudo wondershaper clear eth1
pyshaper
I've extensively covered pyshaper
on the site before, see these U&L Q&As titled:
- How to change speed limit of running trickle instance
- Limit outgoing bandwidth on an specific interface
These are pretty capable tools so this is just meant to show you the potential.
References
- How do I limit internet bandwidth?
- Control your bandwidth with Trickle
add a comment |Â
up vote
2
down vote
Traffic shaping QoS
I've historically used tools such as Wondershaper, Trickle, or pyshaper to throttle network traffic.
Examples
Trickle
To throttle the upload/download speed to 20Kbps.
$ trickle -d 20 wget -c http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
You can also set these independently in the above scenario. You can also make these settings the default like so.
$ trickled -d 50 -u 10
Wondershaper
You can also use Wondershaper to control the bandwidth at the network level. For example say I want to throttle my eth1
device.
$ sudo wondershaper eth1 1024 256
This will give me a Download speed of 1024 Kbits and 256 Kbits Upload. Which are 128KB and 16KB.
When you want to release the caps.
$ sudo wondershaper clear eth1
pyshaper
I've extensively covered pyshaper
on the site before, see these U&L Q&As titled:
- How to change speed limit of running trickle instance
- Limit outgoing bandwidth on an specific interface
These are pretty capable tools so this is just meant to show you the potential.
References
- How do I limit internet bandwidth?
- Control your bandwidth with Trickle
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Traffic shaping QoS
I've historically used tools such as Wondershaper, Trickle, or pyshaper to throttle network traffic.
Examples
Trickle
To throttle the upload/download speed to 20Kbps.
$ trickle -d 20 wget -c http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
You can also set these independently in the above scenario. You can also make these settings the default like so.
$ trickled -d 50 -u 10
Wondershaper
You can also use Wondershaper to control the bandwidth at the network level. For example say I want to throttle my eth1
device.
$ sudo wondershaper eth1 1024 256
This will give me a Download speed of 1024 Kbits and 256 Kbits Upload. Which are 128KB and 16KB.
When you want to release the caps.
$ sudo wondershaper clear eth1
pyshaper
I've extensively covered pyshaper
on the site before, see these U&L Q&As titled:
- How to change speed limit of running trickle instance
- Limit outgoing bandwidth on an specific interface
These are pretty capable tools so this is just meant to show you the potential.
References
- How do I limit internet bandwidth?
- Control your bandwidth with Trickle
Traffic shaping QoS
I've historically used tools such as Wondershaper, Trickle, or pyshaper to throttle network traffic.
Examples
Trickle
To throttle the upload/download speed to 20Kbps.
$ trickle -d 20 wget -c http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
You can also set these independently in the above scenario. You can also make these settings the default like so.
$ trickled -d 50 -u 10
Wondershaper
You can also use Wondershaper to control the bandwidth at the network level. For example say I want to throttle my eth1
device.
$ sudo wondershaper eth1 1024 256
This will give me a Download speed of 1024 Kbits and 256 Kbits Upload. Which are 128KB and 16KB.
When you want to release the caps.
$ sudo wondershaper clear eth1
pyshaper
I've extensively covered pyshaper
on the site before, see these U&L Q&As titled:
- How to change speed limit of running trickle instance
- Limit outgoing bandwidth on an specific interface
These are pretty capable tools so this is just meant to show you the potential.
References
- How do I limit internet bandwidth?
- Control your bandwidth with Trickle
edited Aug 11 at 13:03
answered Aug 11 at 2:55
slmâ¦
238k65491662
238k65491662
add a comment |Â
add a comment |Â
up vote
1
down vote
Probably what you are looking for is quality of service (QoS) which may not be easily available in your favorite firewall (like iptables
, nftables
, pf
, ufw
, etc) but should be simple on any modern router and operates by IP/port.
iptables example;
https://serverfault.com/questions/762921/qos-with-iptables-and-tc-with-unstable-wan
As slm mentioned trickle
can be used when starting a process when not using commands (like rsync
, curl
, wget
) which have rate limiting as a built in option.
wondershaper
can be used to limit by [virtual] interface which is usefull for commands and VMs that can be bound to a nic (like rsync
, curl
, wget
).
add a comment |Â
up vote
1
down vote
Probably what you are looking for is quality of service (QoS) which may not be easily available in your favorite firewall (like iptables
, nftables
, pf
, ufw
, etc) but should be simple on any modern router and operates by IP/port.
iptables example;
https://serverfault.com/questions/762921/qos-with-iptables-and-tc-with-unstable-wan
As slm mentioned trickle
can be used when starting a process when not using commands (like rsync
, curl
, wget
) which have rate limiting as a built in option.
wondershaper
can be used to limit by [virtual] interface which is usefull for commands and VMs that can be bound to a nic (like rsync
, curl
, wget
).
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Probably what you are looking for is quality of service (QoS) which may not be easily available in your favorite firewall (like iptables
, nftables
, pf
, ufw
, etc) but should be simple on any modern router and operates by IP/port.
iptables example;
https://serverfault.com/questions/762921/qos-with-iptables-and-tc-with-unstable-wan
As slm mentioned trickle
can be used when starting a process when not using commands (like rsync
, curl
, wget
) which have rate limiting as a built in option.
wondershaper
can be used to limit by [virtual] interface which is usefull for commands and VMs that can be bound to a nic (like rsync
, curl
, wget
).
Probably what you are looking for is quality of service (QoS) which may not be easily available in your favorite firewall (like iptables
, nftables
, pf
, ufw
, etc) but should be simple on any modern router and operates by IP/port.
iptables example;
https://serverfault.com/questions/762921/qos-with-iptables-and-tc-with-unstable-wan
As slm mentioned trickle
can be used when starting a process when not using commands (like rsync
, curl
, wget
) which have rate limiting as a built in option.
wondershaper
can be used to limit by [virtual] interface which is usefull for commands and VMs that can be bound to a nic (like rsync
, curl
, wget
).
edited Aug 11 at 8:32
answered Aug 11 at 0:24
user1133275
2,277412
2,277412
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f461924%2fis-it-possible-to-change-the-priority-nice-values-for-an-applications-access-to%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
You can do this with namespaces. I have only done this with services in docker. However it will be possible to do what you want as well. But I have not done it. (It is a feature of the Linux kernel, finding user mode tools may or may not be tricky.)
â ctrl-alt-delor
Aug 11 at 8:48