Need some help understanding how to traffic shape inbound

Hey everyone. I am trying to traffic shape to ensure my games have top priority in all situations. I tried going through the wizard and setting everything up but as far as i can tell it only setup rules for outbound. This is not really helpful. I want to make sure that it has the highest inbound priority as well so that say torrents dont just eat all the inbound and send the games ping through the roof. How do i go about setting up inbound rules? can i even setup shaping on inbound stuff? Any help would be greatly appreciated i tried googling and looking at the wikis but i just cant make sense of this. Here is some basic information

Internet: I have a 25/25 FTTH line
Goal: I want Battle.net and League Of Legends to have 100% top priority choke out any and everything else, the latency in my games as long as nothing else is going on is always 12-15ms i want it so that even with a torrent that could be maxing out my line is going that the game will always have first priority with its packets and it wont be affected. However i still want it to be possible for the torrents to take all the bandwidth when i am not playing games.

So far i cant get this to work, i can see the p2p traffic under the p2p category i can see Leagues use under games and the games does have highest priority and yet the game still hits 140+ping and does not appear to actually being given priority. I did figure out how to use hfsc and just set % of bandwidth but this is not what i want. I dont want to have to set out %'s and just have bandwidth go unused otherwise. Surely there is a way to setup things so that everything has the potential to use the full bandwidth but certain things get priority?

You have to remember that when a state is created, it has an in and out interface. If you have, say, qGames on WAN and qGames on LAN and you create a floating rule on WAN out that matches the traffic to the game server and puts it on qGames, the returning traffic related to the same state will be automatically placed in qGames on LAN.

Queues are selected when the initial state is created.

This was the most difficult concept for me to grasp when I started with the pfSense shaper. Once understood it becomes pretty easy to make the shaper to what you want.

You have to remember that when a state is created, it has an in and out interface. If you have, say, qGames on WAN and qGames on LAN and you create a floating rule on WAN out that matches the traffic to the game server and puts it on qGames, the returning traffic related to the same state will be automatically placed in qGames on LAN.

Queues are selected when the initial state is created.

This was the most difficult concept for me to grasp when I started with the pfSense shaper. Once understood it becomes pretty easy to make the shaper to what you want.

I dont think i fully understand? when i view the rules created by the wizard i only see outbound rules. Are you saying this automaticlly creates inbound rules? Sorry i am new to traffic shaping so i really dont understand any of it. how would you recommend i set up the rules? is it something i can do with the Wizard or will i have to do it manually?

So far i cant get this to work, i can see the p2p traffic under the p2p category i can see Leagues use under games and the games does have highest priority and yet the game still hits 140+ping and does not appear to actually being given priority. I did figure out how to use hfsc and just set % of bandwidth but this is not what i want. I dont want to have to set out %'s and just have bandwidth go unused otherwise. Surely there is a way to setup things so that everything has the potential to use the full bandwidth but certain things get priority?

You don't have to worry about that. The percentages (bandwidth and link share) only come into play when the shaper has to make a decision about what to forward first when outbound on the interface is congested.

Think about it this way (which is overly-simplified.) If you have two queues, qPriority (linkshare 80%) and qBulk (link share 20%). If all of the traffic is in qBulk, it can use 100% of the bandwidth. If all traffic is in qPriority, it can use 100% of the bandwidth. If there is traffic in both qPriority and qBulk and there is congestion outbound on the interface, the shaper will send 4 packets of qPriority for every 1 of qBulk. if the queue on qBulk fills up, subsequent qBulk traffic will be dropped.

So far i cant get this to work, i can see the p2p traffic under the p2p category i can see Leagues use under games and the games does have highest priority and yet the game still hits 140+ping and does not appear to actually being given priority. I did figure out how to use hfsc and just set % of bandwidth but this is not what i want. I dont want to have to set out %'s and just have bandwidth go unused otherwise. Surely there is a way to setup things so that everything has the potential to use the full bandwidth but certain things get priority?

You don't have to worry about that. The percentages (bandwidth and link share) only come into play when the shaper has to make a decision about what to forward first when outbound on the interface is congested.

Think about it this way (which is overly-simplified.) If you have two queues, qPriority (linkshare 80%) and qBulk (link share 20%). If all of the traffic is in qBulk, it can use 100% of the bandwidth. If all traffic is in qPriority, it can use 100% of the bandwidth. If there is traffic in both qPriority and qBulk and there is congestion outbound on the interface, the shaper will send 4 packets of qPriority for every 1 of qBulk. if the queue on qBulk fills up, subsequent qBulk traffic will be dropped.

Alright, how would you recommend i set up the traffic shaping to make this work how i want? so far while i can get it setup with the wizard like i said if i start downloading a torrent to test it the game ping shoots form 12ms to 140+ so something i did was wrong as it does not appear to be giving the game priority. I did have the ports right and the games traffic was showing up under games in the queue status but it was not getting its packets out first.

I'd put the game queue at, say, bandwidth and link share 60% and the torrents at like 5%. If it's really important I'd also set a realtime value on the game queue at, say 10%. Note also that if you want pings to reflect what's really going on you need to put them (icmp) in the game queue.

I'd put the game queue at, say, bandwidth and link share 60% and the torrents at like 5%. If it's really important I'd also set a realtime value on the game queue at, say 10%. Note also that if you want pings to reflect what's really going on you need to put them (icmp) in the game queue.

Then test and see how it does.

wouldnt this just mean that the torrents can only ever use 5%? or am i not understanding that correctly? I would like the torrents to be able to use all of the bandwidth when nothing is going on. is that what that does or is that limiting it to always be 5%?

No. Upperlimit is a hard-set 5%. That tells the shaper to drop traffic in excess of 5% of the parent queue. Get rid of it unless that's what you want.

ohh ok so bandwidth at 5% or blank? and then upper limit just turned off? Sorry that i am being so slow with this but thanks a lot for all the help. Also would you recommend Codel Active Queue? i dont fully get what it is but it makes it sound like a good thing from the wiki it brings me too.

Thanks so much i now have it working and everything behaves as expected. My torrents can take up the speed when nothing is going on but as soon as i start playing games they get dialed back enough that my games ping remains unaffected.

As i said my internet is a 25/25 Fiber to the house connection. I messed with the settings a bit, i tried seeing what would happen if i set p2p and games bandwidth to 98% and then set the backlog and such and it seems to be working. Either can take up most of the link if it wants but when they both want the link games wins.

Thanks so much i now have it working and everything behaves as expected. My torrents can take up the speed when nothing is going on but as soon as i start playing games they get dialed back enough that my games ping remains unaffected.