[SOLVED] I need help configuring QoS to prioritize my PC

xRaiiny

Prominent
Aug 24, 2019
10
0
510
Hello, I have a DSL-2750U Dlink router and I would love to prioritize my pc (ethernet) over all other users, and I heard thats possible via QoS. I tried watching some videos, but apparently my router QoS settings are not very user friendly.
I would love to hear if thats possible and if so, I need the method to. I'm just an amateur in those things. Here is how the QoS configuration look like;
 
Solution
Ping spikes happen for many reasons. The first thing to do is see if the ISP connection is running at 100%. With only 20mbps down you likely even have less upload. If either of these is running at 100% then it can cause ping spikes. It does not take much to use a 20mbps internet conneciton now days. The problem is what if the reason it all being used is someone is watch HD netflix. With QoS you could prevent someone from doing that so that your game gets the extra bandwidth but who is to say which is more important HD netflix or game traffic. New work from home video/audio conferencing also uses a lot of upload bandwidth that was never used in the past.


QoS is not a magic solution to create more bandwidth. All it...

xRaiiny

Prominent
Aug 24, 2019
10
0
510
"prioritize my pc (ethernet) over all other users "

Why is your use more important than others?
If my kids had done that...it would last about 5 minutes. And their use would be about zero for a week or two.

Just saying, tread carefully on this.
By prioritizing my PC I don't mean that i'm intending to shutdown or strictly limit internet access for others. I want to have a priority (usually when gaming) because im getting terrible ping spikes since we moved into this house that most games are now unplayable, I tried to turn off wifi and it fixed the issue, but ofcourse that is not ideal and nor fair to anyone. Besides, no one is using internet for serious business or work stuff. usually just Netflix or YouTube which is enough to shut me down.
 

xRaiiny

Prominent
Aug 24, 2019
10
0
510
QoS does not alleviate ping spikes.

QoS potentially influences bandwidth, and how much or little of the household total is allocated to individual systems.
If thats the case then QoS won't do me any good. Do you have any suggestions on why are these spikes are happening? i didnt suffer this before. Should I call the ISP?
 
Ping spikes happen for many reasons. The first thing to do is see if the ISP connection is running at 100%. With only 20mbps down you likely even have less upload. If either of these is running at 100% then it can cause ping spikes. It does not take much to use a 20mbps internet conneciton now days. The problem is what if the reason it all being used is someone is watch HD netflix. With QoS you could prevent someone from doing that so that your game gets the extra bandwidth but who is to say which is more important HD netflix or game traffic. New work from home video/audio conferencing also uses a lot of upload bandwidth that was never used in the past.


QoS is not a magic solution to create more bandwidth. All it does is decide who does not get the bandwidth they want to use. Someone is going to lose out. Now if someone were say doing bit torrent downloads then limiting that would likely be accepted but pretty much all other traffic is considered important by whoever is using it.

In any case the router you have is a piece of crap when it comes to even basic QoS. It can only do upload and most problems are on the download side. It has extremely limited option even on the upload. You need a new router and to even partially solve this problem you want a advanced one that has the ability to get rid of what is called bufferbloat. One of the forms of QoS is called fq-codel. This purely makes it easier to configure it does not solve the problem of not enough bandwidth. It really depends on exacltly what traffic is jambing up your internet. Since this was designed by selfish gamers it does work for that but there is no free lunch someone is going to get less bandwidth.
 
Solution
I tried to turn off wifi and it fixed the issue, but ofcourse that is not ideal and nor fair to anyone.
There is a chance that the wifi access point built-into your router is simply being overloaded and then affecting the cpu of the router, which can also cause ping spikes. If this is the case, a solution would be to have a separate access point for all wireless clients and wire that to the main router and disable wifi on the main router. Then all the wifi is 'offloaded' to another device and the weak cpu won't have an issue with all the traffic.
 
I'd recommend you get a router that can actually "SHAPE" bandwidth using a QOS with an FQ_Codel based algorithm. It won't give your PC priority per say, but it'll do deep packet inspection and give your smaller gaming packets priority. You set your bandwidth limits to about 80-90% of your line speed, and it'll shape traffic to try and stay under that limit. It'll throttle some people as necessary to stay under the limit and shape each user accordingly in a FAIR WAY. Instead of having your internet operate as a free for all working up to the limit set by your ISP.

You can read about traffic shaping here: https://wiki.gentoo.org/wiki/Traffic_shaping
Theory
There are two modes of traffic shaping, INGRESS and EGRESS. INGRESS handles incoming traffic and EGRESS outgoing traffic. Linux does not support shaping/queuing on INGRESS, but only policing. Therefore IFB exists, which we can attach to the INGRESS queue while we can add any normal queuing like FQ_CODEL as EGRESS queue on the IFB device.

The main reason for traffic shaping is that we cannot control the packet queues or prioritisation made by our ISP or in the external link. By limit our maximum bandwidth to 90% of our link speed we can make sure that any buffers (queues) that our ISP and our external link has will remain empty.

FQ_CODEL is a queuing discipline that is based on AQM (Active Queue Management). It aims to create fair bandwidth for all flows, while attempting to minimise buffers (and hence delays).

The INGRESS shaping below works like this:

  1. Create ingress filter on external interface
  2. Copy all incoming data to the IFB device
  3. Create an EGRESS qdisc on the IFB device and limit the bandwidth to 90%
  4. Attach the FQ_CODEL queuing discipline.

Asus routers that can run Merlin software have this ability(not all Asus routers).

Routers that can run OpenWRT have this ability(need to download the SQM package).

Some router manufacturers are starting to incorporate this in their software(like some of Netgears routers).

I'm using it on a home built x86 router running OpenWRT and it works fantastically.
 
By prioritizing my PC I don't mean that i'm intending to shutdown or strictly limit internet access for others. I want to have a priority (usually when gaming) because im getting terrible ping spikes since we moved into this house that most games are now unplayable, I tried to turn off wifi and it fixed the issue, but ofcourse that is not ideal and nor fair to anyone. Besides, no one is using internet for serious business or work stuff. usually just Netflix or YouTube which is enough to shut me down.

QoS can make all your ping issues go away. It's very easy to setup. You will have to buy or flash your router to something that can run fq_codel or cake. openwrt has cake. ERX runs fq_codel. Theres not much of a difference between the two for DOCCIS < 100Mbs. If you have DSL and low speeds cake would be better. The speed of the router can limit the possible throughput. cake is much more efficient, but it's hard to find info for each router that runs openwrt. cake is much newer and it takes a long time to get into router distros. these two qdisc, made by the same ppl and cake is the replacement for fq_codel, are the only ones that ever tried to help with bufferbloat on low bandwidth traffic, eg gaming. everything else is pretty bad.

People opinions are different on shaping but I think it works great and it can save you from a costly bandwidth upgrade or if you can't get faster speeds alleviate some issues you have. If you can get 5x your current bandwidth for $5 more and not need QoS then by all means do that, but that's not the case for a lot of people.

View: https://www.youtube.com/watch?v=o-g2P3R84dw&t=37s
 
Last edited:
  • Like
Reactions: gggplaya
I did a little informal testing of Download Shaping because I already know upload shaping with FQ_Code/Cake works well. But I wanted to see how my home built router would shape traffic fairly. My router is using Cake(Piece of Cake).

I artifically set my target Download Bandwidth to 18mbps and created a simulated home use scenario.
  1. Desktop downloading a large file at maximum speed.
  2. Laptop downloading a large file at max speed.
  3. Desktop also playing a PC game online at the same time.
  4. Phone Streaming youtube at the same time.
I first started by downloading the files on the desktop and laptop. Both were downloading at about 900-950KB/s which is about 8mbps each. The downloads were about even most of the time, fluctuating a difference of about 100KB/s at worst.

Then I turned on a youtube video and kept it streaming. Downloads of the Desktop and Laptop went down to about 650-700KB/s each. The downloads were steady and the youtube video was smooth without issues.

Then I launched a PC game and it ran fine without any dropped packets or lag. I didn't notice any drops in the PC's download speeds. Again, this is to see how the traffic shaper worked, not to see if it would eliminate lag since I have way more than 18-20mbps of home internet.

This is a graph of what my traffic looked like when all 4 things were running.

uc

uc


uc