If you want to understand the script, please read the readme as I've mentioned multiple times. There's a whole section called "What this script does". But let me break it down for you in simpler terms.
Imagine you're managing traffic on a busy highway. This script is like a smart traffic control system for your internet connection. It sets up special lanes (we call them queues) for different types of internet traffic on your network.
The most important lane is reserved for online gaming. It's like a VIP lane for specific gaming devices you choose. This ensures your games run smoothly without lag or interruptions.
Then there are four other lanes for different types of internet activities:
- A fast lane for things like video calls etc..
- A normal lane for everyday web browsing.
- A lane for downloads that can pause if other traffic needs to go through.
- A slow lane for activities that aren't time-sensitive, like overnight file sharing.
The cool thing is, when there's not much traffic, all traffic can use the full highway. But when it gets busy, the system makes sure important traffic (like your games) always has room to move quickly.
To ensure your gaming packets are directed to the realtime queue, you need to add your gaming device's IP address to either:
REALTIME4=
or
REALTIME6=
β¦ depending on the IP protocol you're using. This configuration sends all UDP packets (which most games use rather than TCP) to the realtime queue, eliminating the need to prioritize specific ports used by your game.
This approach works particularly well for gaming consoles, where there's typically little UDP traffic other than gaming occurring simultaneously.
However, for PC gaming (which applies to your situation), this method can be counterproductive. PCs often have more background traffic, and some applications, like YouTube videos, use the QUIC protocol, which relies on UDP. If you're gaming on a PC while streaming YouTube music or videos, the YouTube traffic might end up in your realtime queue, consuming your bandwidth and potentially causing game lag.
To address this issue, you can add manual rules via the hfscscript config, as described here: https://github.com/hudra0/routerperf#custom-dscp-marking-rules
Important: If you decide to use custom DSCP marking rules, make sure to remove your gaming device's IP address from the REALTIME variable.
In general for high speed connections the realtime bandwidth should be around 10-15% of your bandwidth or less... But when your connections are slow (like your upload), we need them to be at least what the game actually needs. As a guideline, Call Of Duty used about 160kbps upstream and 320kbps downstream (I think itβs actually more now), so a good baseline is about double that each direction. By default we do something smart but you can adjust the script if needed, depending on the game you play. If you want to manually adjust, just set:
#GAMEUP=$((UPRATE*15/100+400))
#GAMEDOWN=$((DOWNRATE*15/100+400))
## you can try setting GAMEUP and GAMEDOWN manually, some report this works well for CoD
GAMEUP=400
GAMEDOWN=800
... as a starting point and evaluate how your game performs. Pay attention to your in-game ping and overall gameplay experience.