Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Nagle algorithm and World of Warcraft

    Gaming
    3
    14
    18.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Majin Zero
      last edited by

      I am not polling, I hope a P3 1.4 Ghz with 768 RAM isn't undersized for a network of 2 computers.

      I wish I could connect my gaming rig right to the CM, but I'm doing a Dual WAN, and I need to use wifi to get it from where the CM's are hooked up to a comfortable place.

      I looked down in the thread, and a poster who has a BSD firewall posted this:

      or those with OpenBSD firewalls, here's the solution (again a big thanks to Yarre for spotting the poorly established socket connection - that was the killer :) ).

      With this on I have gone from 1400ms - 1800ms down to 400ms! WoW is playable again.

      The IP is that of the Proudmoore server but just replace with whatever you need. I'll actually be setting up a bunch of different IPs and socat instances for all the different servers that people play here at work (to do that, just have socat listen on a different port and redirect to the matching port).

      Cynop

      –
      In pf.conf add the following lines in appropriate places (sorry I can't include my entire pf.conf as it is for a complex network so is very long but this is all pretty easy):

      In REDIRECT section add one of these for your realm server

      rdr pass on $int_if proto tcp from any to 12.129.225.18 port 3724 -> 127.0.0.1 port 3724

      rdr pass on $int_if proto tcp from any to 12.129.225.22 port 3724 -> 127.0.0.1 port 3725

      LOOPBACK - Make sure traffic on the loopback interface is passed

      pass in  quick on lo0 all

      pass out quick on lo0 all

      WoW - Outbound to WoW servers

      pass out log quick on $ext_if proto tcp from any to 12.129.225.0/24 port 3724 keep state

      pass in log quick on $ext_if proto tcp from 12.129.225.0/24 port 3724 to any keep state

      You can remove the "log" keyword once it's working too.

      Then you need to get a SOCKS server or as I just found out - again thanks to Yarre - socat. I couldn't actually get nylon (the SOCKS server under OpenBSD) so I googled and found a "socat" port (see http://ports.openbsd.nu/net/socat). It compiled just fine and runs great. I used the same command line as under linux (change the listen port if you are trying to handle more than one WoW realm).

      socat -d -d -d TCP4-LISTEN:3724,nodelay,fork,reuseaddr,su=nobody TCP4:12.129.225.18:3724,nodelay

      Now, stop reading forums and go enjoy some WoW! :) (while I take my girlfriend to the ballet for her birthday.. yes, I am serious! ;) )

      Cyn

      Would I just need to access the pf.conf from PFsense and make those changes? If so, how do I get to pf.conf?

      1 Reply Last reply Reply Quote 0
      • M
        Majin Zero
        last edited by

        dang, re-read that post, and it says you need a SOCKS server, is there one for pfsense?

        1 Reply Last reply Reply Quote 0
        • K
          Kris.J
          last edited by

          @GruensFroeschli:

          Repeat after me:
          pfSense is FreeBSD NOT Linux

          So just right away: no this is not applicable to pfSense.

          Also you dont want to mess with the ACK's.

          Right!  FreeBSD = what Linux wants to be when it grows up!  ;)

          So, in FreeBSD land, you can try this if you want to mess with TCP ACKs:

          Add this line to /etc/sysctl.conf and reboot:

          
          net.inet.tcp.delayed_ack=0
          
          

          If you want to change that value (it is net.inet.tcp.delayed_ack=1 by default on one of my FreeBSD servers) on the fly without modifying your /etc/sysctl.conf file, you can do this:

          
          sudo sysctl net.inet.tcp.delayed_ack=0
          
          

          You should be using sudo because you should not be doing things to your box as root, right?  Right!

          You'll get output something like this:

          
          % sudo sysctl net.inet.tcp.delayed_ack=0
          net.inet.tcp.delayed_ack: 1 -> 0
          
          

          It tells you what it was, and what you changed it to.  Test out WoW with it set to zero, and let us know how it goes!

          -K

          I did it for the lulz.

          1 Reply Last reply Reply Quote 0
          • K
            Kris.J
            last edited by

            @Majin:

            dang, re-read that post, and it says you need a SOCKS server, is there one for pfsense?

            All that crap is specific to Linux Majin - see my post above for what it takes on FreeBSD.

            I did it for the lulz.

            1 Reply Last reply Reply Quote 0
            • M
              Majin Zero
              last edited by

              sweet, I'll try this out when I get home. I'll let you all know how it goes.

              And, well, by default on pfsense you're not running as root, I hope. I don't even know how to use it as a BSD box, I just use the webui to configure it.

              1 Reply Last reply Reply Quote 0
              • GruensFroeschliG
                GruensFroeschli
                last edited by

                and I need to use wifi to get it from….

                This is your culprit.
                Replace your Wireless connection with a wire and you will have significantly lower pings ;)

                I dont have hard number right now but i think i could get them from our wireless lab.
                I just know that wireless is bad for the latency.
                Have you ever tried to play a First Person Shooter per Wireless?

                Well i think if you really want to compile the socat you might be interrested in installing a developers version.
                Also i think there was a thread around how to add custom options o you dont loose them after a reboot.

                We do what we must, because we can.

                Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

                1 Reply Last reply Reply Quote 0
                • K
                  Kris.J
                  last edited by

                  @Majin:

                  sweet, I'll try this out when I get home. I'll let you all know how it goes.

                  And, well, by default on pfsense you're not running as root, I hope. I don't even know how to use it as a BSD box, I just use the webui to configure it.

                  Well, you need to be able to SSH into your pfSense box or get on its console to get a CLI I would imagine.

                  I did it for the lulz.

                  1 Reply Last reply Reply Quote 0
                  • K
                    Kris.J
                    last edited by

                    Here is your man page for sysctl:  http://www.freebsd.org/cgi/man.cgi?query=sysctl&sektion=8

                    To see what all your tcp variables look like, do this:

                    
                    sudo sysctl -a | grep tcp
                    
                    

                    You'll get output something like this - these are all the tweakable tcp variables - BE CAREFUL!  ;)

                    
                    % sudo sysctl -a | grep tcp
                    tcpreass:         40,     1092,      0,    168,     6659
                    tcptw:            80,     3420,      0,     90,       46
                    tcpcb:           752,    17025,      7,      8,      841
                    net.inet.tcp.rfc1323: 1
                    net.inet.tcp.mssdflt: 512
                    net.inet.tcp.keepidle: 7200000
                    net.inet.tcp.keepintvl: 75000
                    net.inet.tcp.sendspace: 32768
                    net.inet.tcp.recvspace: 65536
                    net.inet.tcp.keepinit: 75000
                    net.inet.tcp.delacktime: 100
                    net.inet.tcp.v6mssdflt: 1024
                    net.inet.tcp.hostcache.purge: 0
                    net.inet.tcp.hostcache.prune: 300
                    net.inet.tcp.hostcache.expire: 3600
                    net.inet.tcp.hostcache.count: 0
                    net.inet.tcp.hostcache.bucketlimit: 30
                    net.inet.tcp.hostcache.hashsize: 512
                    net.inet.tcp.hostcache.cachelimit: 15360
                    net.inet.tcp.reass.overflows: 0
                    net.inet.tcp.reass.maxqlen: 48
                    net.inet.tcp.reass.cursegments: 0
                    net.inet.tcp.reass.maxsegments: 1064
                    net.inet.tcp.insecure_rst: 0
                    net.inet.tcp.rfc3390: 1
                    net.inet.tcp.rfc3042: 1
                    net.inet.tcp.delayed_ack: 1
                    net.inet.tcp.blackhole: 0
                    net.inet.tcp.log_in_vain: 0
                    net.inet.tcp.newreno: 1
                    net.inet.tcp.local_slowstart_flightsize: 4
                    net.inet.tcp.slowstart_flightsize: 1
                    net.inet.tcp.path_mtu_discovery: 1
                    net.inet.tcp.sack.globalholes: 0
                    net.inet.tcp.sack.globalmaxholes: 65536
                    net.inet.tcp.sack.maxholes: 128
                    net.inet.tcp.sack.enable: 1
                    net.inet.tcp.inflight.stab: 20
                    net.inet.tcp.inflight.max: 1073725440
                    net.inet.tcp.inflight.min: 6144
                    net.inet.tcp.inflight.rttthresh: 10
                    net.inet.tcp.inflight.debug: 0
                    net.inet.tcp.inflight.enable: 1
                    net.inet.tcp.nolocaltimewait: 0
                    net.inet.tcp.maxtcptw: 3404
                    net.inet.tcp.isn_reseed_interval: 0
                    net.inet.tcp.icmp_may_rst: 1
                    net.inet.tcp.pcbcount: 7
                    net.inet.tcp.do_tcpdrain: 1
                    net.inet.tcp.tcbhashsize: 512
                    net.inet.tcp.minmssoverload: 0
                    net.inet.tcp.minmss: 216
                    net.inet.tcp.syncache.rexmtlimit: 3
                    net.inet.tcp.syncache.hashsize: 512
                    net.inet.tcp.syncache.count: 0
                    net.inet.tcp.syncache.cachelimit: 15359
                    net.inet.tcp.syncache.bucketlimit: 30
                    net.inet.tcp.syncookies: 1
                    net.inet.tcp.always_keepalive: 1
                    net.inet.tcp.rexmit_slop: 200
                    net.inet.tcp.rexmit_min: 30
                    net.inet.tcp.msl: 30000
                    
                    

                    I did it for the lulz.

                    1 Reply Last reply Reply Quote 0
                    • K
                      Kris.J
                      last edited by

                      Alright I just VPN'd out to my house and got into my pfSense box, looks like delayed_ack is already zero on pfSense by default.

                      
                       pfSense console setup 
                      ***********************
                       0)  Logout (SSH only)
                       1)  Assign Interfaces
                       2)  Set LAN IP address
                       3)  Reset webConfigurator password
                       4)  Reset to factory defaults
                       5)  Reboot system
                       6)  Halt system
                       7)  Ping host
                       8)  Shell
                       9)  PFtop
                      10)  Filter Logs
                      11)  Restart webConfigurator
                      12)  pfSense PHP shell
                      13)  Upgrade from console
                      
                      Enter an option: 8
                      
                      # sysctl -a | grep tcp
                      tcpreass:         20,        0,      0,      0,        0
                      tcptw:            48,     1638,      0,    156,      138
                      tcpcb:           472,     8040,      5,     19,      231
                      net.inet.tcp.rfc1323: 1
                      net.inet.tcp.mssdflt: 512
                      net.inet.tcp.keepidle: 7200000
                      net.inet.tcp.keepintvl: 75000
                      net.inet.tcp.sendspace: 65228
                      net.inet.tcp.recvspace: 65228
                      net.inet.tcp.keepinit: 75000
                      net.inet.tcp.delacktime: 100
                      net.inet.tcp.v6mssdflt: 1024
                      net.inet.tcp.hostcache.purge: 0
                      net.inet.tcp.hostcache.expire: 3600
                      net.inet.tcp.hostcache.count: 1
                      net.inet.tcp.hostcache.bucketlimit: 30
                      net.inet.tcp.hostcache.hashsize: 512
                      net.inet.tcp.hostcache.cachelimit: 15360
                      net.inet.tcp.recvbuf_max: 262144
                      net.inet.tcp.recvbuf_inc: 16384
                      net.inet.tcp.recvbuf_auto: 1
                      net.inet.tcp.reass.overflows: 0
                      net.inet.tcp.reass.maxqlen: 48
                      net.inet.tcp.reass.cursegments: 0
                      net.inet.tcp.reass.maxsegments: 0
                      net.inet.tcp.insecure_rst: 0
                      net.inet.tcp.rfc3390: 1
                      net.inet.tcp.rfc3042: 1
                      net.inet.tcp.drop_synfin: 1
                      net.inet.tcp.delayed_ack: 0
                      net.inet.tcp.blackhole: 2
                      net.inet.tcp.log_in_vain: 0
                      net.inet.tcp.sendbuf_max: 262144
                      net.inet.tcp.sendbuf_inc: 8192
                      net.inet.tcp.sendbuf_auto: 1
                      net.inet.tcp.newreno: 1
                      net.inet.tcp.local_slowstart_flightsize: 4
                      net.inet.tcp.slowstart_flightsize: 1
                      net.inet.tcp.path_mtu_discovery: 1
                      net.inet.tcp.sack.globalholes: 0
                      net.inet.tcp.sack.globalmaxholes: 65536
                      net.inet.tcp.sack.maxholes: 128
                      net.inet.tcp.sack.enable: 1
                      net.inet.tcp.inflight.stab: 20
                      net.inet.tcp.inflight.max: 1073725440
                      net.inet.tcp.inflight.min: 6144
                      net.inet.tcp.inflight.rttthresh: 10
                      net.inet.tcp.inflight.debug: 0
                      net.inet.tcp.inflight.enable: 3
                      net.inet.tcp.nolocaltimewait: 0
                      net.inet.tcp.maxtcptw: 1608
                      net.inet.tcp.isn_reseed_interval: 0
                      net.inet.tcp.icmp_may_rst: 1
                      net.inet.tcp.pcbcount: 5
                      net.inet.tcp.do_tcpdrain: 1
                      net.inet.tcp.tcbhashsize: 512
                      net.inet.tcp.minmssoverload: 0
                      net.inet.tcp.minmss: 216
                      net.inet.tcp.syncache.rexmtlimit: 3
                      net.inet.tcp.syncache.hashsize: 512
                      net.inet.tcp.syncache.count: 0
                      net.inet.tcp.syncache.cachelimit: 15359
                      net.inet.tcp.syncache.bucketlimit: 30
                      net.inet.tcp.syncookies: 1
                      net.inet.tcp.always_keepalive: 1
                      net.inet.tcp.rexmit_slop: 200
                      net.inet.tcp.rexmit_min: 30
                      net.inet.tcp.msl: 30000
                      # 
                      
                      

                      I did it for the lulz.

                      1 Reply Last reply Reply Quote 0
                      • M
                        Majin Zero
                        last edited by

                        I tried that command, and yes, the delayed ACK is 0 by default it seems. Ah well, thank you to everyone who posted, learned a little bit 'bout my pfsense box, etc, etc.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.