QOS on VLAN to optimize game streaming

Hello,
I'm using my Raspberry to stream games on my desktop using Steam link. To optimize my connection I would like to apply QoS so that my gaming experience is'nt disturbed by some other network traffic.

For this purpose, I have created a seperate VLAN & subnet which is used by my desktop & Raspberry. Now I would like to apply QoS so that this VLAN has priority on all other network traffic. I have found this QoS wiki page which refers to this SQM wiki page. As far as I understand, these guides refer more to LAN -> WAN traffic and not intra LAN traffic as in my use case.

How could I achieve a priority for this VLAN?

for purposes of QoS they are practically the same thing... if it moves over L3 networks... then all it comes down to how many shapers you initialise and what L3 interfaces they reside on (and direction)

the key choice your faced with here is whether or not to instantiate multiple shapers (specific one/s for the vlan and seperate one/s for wan) or whether to handle the VLAN via marking only and leave the rest to your primary shaper...

Where does this traffic go? From the gaming vlan to another vlan, or just between different ports on a switch?

Where does this traffic go? From the gaming vlan to another vlan, or just between different ports on a switch?

It remains in the gaming VLAN between 2 switches

At the moment I don't understand much of your answer but I haven't read thoroughly into this matter. Besides the wiki pages I've quoted, do you have a practical guide into this?

kr
Wouter

practical guides are based on requirements and operating constraints...

without a full picture of yours it's impossible to say...

my comment above was intended to highlight the need to fully understand...

a) what you are doing
and
b) the core principles under which it can be done

read the default openwrt SqM userguide... there is no such thing as a once size fits all approach...

You're right. I first read more about this matter s you sybthere is no one-size-fits-all

1 Like

in order to not be totally obtuse... i'd say based on what you've said and weighing up all the pro's and cons...

i'd look at applying some higher dscp marks on vlan ingress... and stick with a single whollistic shaper marking based on these values...

as dlakelan asked... this will probably only not fit well if there is substantial inter-vlan traffic that also needs to be shaped...

an easier alternative to the above is passing all vlans via a smart switch first and utilising some of its tagging/shaping features...

OK seems a lot more complicated than foreseen. I thought it was only a matter of installing addition program + setting some parameters to prioritize this VLAN.
To be honest: steamlink does already work fine like 98-99% of the time, only occasionally the pictures hangs. Maybe I just install & setup SQM & see what is what. If it is a fraction better than it's now I'm also happy.

My intention is to learn more about networking & in the meantime have some better network performance for game streaming :slight_smile:

1 Like

good idea...

setting up good core shaper parameters is important and you will learn alot along the way...

  • mess with that for a day or few (try not to get too bogged down in too many suboptions)
  • brush up on putty/nano/vim/winscp/notepad++ if needed
  • give @dlakelan s script/s a try if its within your capabilities ( @Dopam-IT_1987 has genrously created a video of this process => turn the volume down tho' )

Feel free to ask any specific questions whenever needed... lot's of helpful people here... (especially when it comes to SQM/QoS)

1 Like

It sounds like the router will never see this traffic and hence no SQM or other router settings will matter.

Can you draw a diagram of your network?

Some smart switches do use DSCP tags and so it is possible to improve. Outcomes by tagging but then you need a way to influence the tags which you may not have. A diagram would be helpful.

Hello,
Please find a (simple) diagram of my network. I've only included the necessary info for this subject (e.g. other VLANs & devices are omitted)

Does this clarify things a bit?

And you are streaming the video of your game from the game machine to the Pi, everything is wired and on the same VLAN. If this is the case then packets go entirely through the switches, neither the router not the AP see the packets.

1 Like

Yes, except for the game pc is connected with wifi to the router (bridge from wifi & game network interface). Does that make a difference?

Thanks for your clarification, it didn't occurre to me that this network traffic doesn't go through the router.

Yes if it goes via wifi (which is highly problematic, get a wire if you can) then the CPU will see it, however for the most part in the direction PC -> Raspberry your best bet is to just send it right away, not queue it, and in the direction Raspberry -> PC the link is variable speed and you won't get a ton of benefit from using SQM. However you can use DSCP to affect the WMM queue in use for the Raspberry -> PC direction, except I assume this is a trivial amount of traffic so you're not going to benefit.

1 Like

you could improve wifi connection of game pc.

config wifi-device
   ...
   option legacy_rates '0'
   list basic_rate '9000 12000'
   list supported_rates '9000 12000 24000 36000 48000 54000' 

or only with legacy_rates
but it s better wired.

Source: https://openwrt.org/docs/guide-user/network/wifi/basic#wi-fi_devices

1 Like

Yes if it goes via wifi (which is highly problematic, get a wire if you can) then the CPU will see it

Ok thanks for the clarification, I dind't knew it made a difference for the CPU. Regarding wireless: I cannot install a cable a I'm in a rental house but 5ghz wifi is the next best thing (PC is not so far from AP)

However you can use DSCP to affect the WMM queue in use for the Raspberry -> PC direction, except I assume this is a trivial amount of traffic so you're not going to benefit.

Indeed, the traffice from Raspberry -> PC is the input of the controller, which is only a few kb's so this won't be of much benefit.

I'll leave it like this. I guess I have already optimized the streaming by using a seperate WIFI + VLAN for this traffic I guess?

Thanks for the config options. I have measured my speed with iperf3 and I seem to get some Mbps more (90 instead of 87) and ping of 1-2 ms. Not much but every bit helps :slight_smile: