Home network with game server



  • Hi. First of all I have to say I love pfsense. I have it for about 2 years and learned so much! It’s awesome! I have some questions about qos. I’m pretty new to qos so I’ve been doing a lot of research and trying a lot of stuff. I have a home network with a minecraft server and web server. My setup is pretty advanced for home network.

    My pfsense box has 2 nics. 1 for wan and 1 trunk connected to Dell Power Connect 2716 running vlans.

    Wan = bge1 30 down and only 10 up
    Lan = bge0
    LanVlan = Vlan 15 on bge0 (my local network)
    Srvs = Vlan 14 on bge0 (all the servers)
    Hotspot = Vlan 16 on bge0 (hardly used I can open wifi for guests)
    Guest = Vlan 13 on bge0 (not used yet maybe for lan parties lol)

    The most important goals I had for this

    Minecraft game server has to have best performance. I should be ok up to at least 20 people with no connection lag with my calculations, if not 40!

    Web server = lowest priority uploads. My website should not lag the people on game server.

    All other Lans and all other traffic should go as fast as it can unless the server is using the upload connection.

    Everything seems to be working as it should. Speed tests on my lanvlan show throttle down and even the website traffic goes slower.

    The past two days since I set up the qos. Ive been having some people complain about lag on the game server. Even with no other network traffic. I have even seen from my local side when im playing with the other players, seems like sometimes there movement seems to shutter or stop for a few ms at a time. This is related to the connection not the server as the TPS is at 20(minecraft server lag).

    So I stated investigating further and I noticed that I have Queue drops on my game queue. I don’t think this is normal at that speed considering im not even at 50% of my upload limit im guessing this is bad and is related to the problem. I want the servers to use up as much uploads as it can before the queues start dropping!? Maybe its normal and unrelated not sure.

    I tried playing around with the service curve on the gamequeue. If I put to high I get errors
    Here’s some graphs and links to paste bins of my configs. Im pretty new to networking stuff so please don’t flame me haha. Maybe this is normal or I did something really wrong.



    http://pastebin.com/2QR0K7Jr
    http://pastebin.com/CWLh6qMc

    There’s probly a way around this just not knowing enough about this I’m not sure where to start. I was thinking maybe its trying to share that gamequeue speed with my other networks even tho there’s not activity on them. Maybe I can make a queue from the servers to the wan only? Any advice or help to steer me in the right direction would be greatly appreciated. Thanks!


  • Netgate

    Those graphs look pretty healthy to me.  Are you sure the complaints from your users aren't because of their connections?

    Shaping just determines what traffic gets dropped.  I don't see anything from your graphs that should benefit.  At least not anything perceptible to a minecraft server user.



  • Some of the drops peak during low bandwidth utilization. Maybe you need to size your queues to be larger? I could be incorrect on what I'm inferring.


  • Netgate

    Given your queue setup it should be pretty difficult to get drops out WAN on qGames.

    Is there any activity on the other queues at the time of the drops that correspond?



  • @Derelict:

    Given your queue setup it should be pretty difficult to get drops out WAN on qGames.

    Is there any activity on the other queues at the time of the drops that correspond?

    I could be missing something, but I don't see a queue length defined on his WAN in the first pastebin link. When I ran the Traffic Shaping wizard, the default queue length was causing drops for me. I just set my WAN queue lengths to arbitrarily high values (1,000) and made sure I had enough realtime bandwidth set for the queues that are latency sensitive. Since most games have known amounts of bandwidth usage, you can easily figure out how much you need.

    I would rather have buffer bloat latency than packet-loss for games. UDP games get stuttering, but TCP games get really high latency, because it takes a bit before the re-transmit happens.

    If you shape your bandwidth correctly, buffer bloat shouldn't be an issue for your latency sensitive traffic.



  • Thank you all so much the issue is resolved ;D. Just in case it becomes handy for someone else. Ill briefly write what I have learned and what I have done to fix the issue. As I already stated im pretty new to this networking stuff so if im not 100% right please correct me.

    What I understood in general about TCP/IP is dropping packets is a way to control speed. So I figured dropping packets at such a low transfer rate was bad. If these were packets for something not time sensitive like web browsing it would go unnoticed.

    -On my SRVS lan in Qinternet I added a new queue called MCservers.
    -On my SRVS lan I deleted the games queue as I have no other game traffic on that subnet.
    -On my WAN I set the game queue bandwidth to 5% service curve Link share 5%
    -On my WAN I set the MCserver queue bandwidth to 40% service curve (Real time : 7Mb, Link share : 40%)
    -On my firewall rules in the floating section I found the minecraft port entry and I edited the advanced features to use the ACK/MCServer Queues

    So far with 2 days of testing ive had up to 15 people = aprox 2-3 Mbps uploads and no complaints of lag and no more dropped packets in my graph.

    Actually it seems like this traffic is not showing on my RRD Queue graph at all anymore. Is this normal behavior with the real time service curve? I guessing that Realtime traffic skips the queue all together or for some reason just doesn’t show up on the graph?

    I still have more to learn about the service curve I found some awesome links in this forum. I should be ok from here. Thanks again!