Up to Main Index                           Up to Journal for January, 2016

                    JOURNAL FOR FRIDAY 15TH JANUARY, 2016
______________________________________________________________________________

SUBJECT: Another public git dev branch update
   DATE: Fri 15 Jan 23:44:04 GMT 2016

I noticed with interest, and a pang of bygone days, that IBM have ported Go to
the System Z mainframe[1]. A long time ago I worked for a big IBM business
partner and had access to RS/6000, AS/400 and S/390 systems. When IBM
initially released a port of Java on these platforms I used WolfMUD as a good
stress test :) Working with the IBM labs and the engineers was quite an
experience. On a more professional note we did find, test and fix quite a few
issues.

Nowadays the biggest machine I have access to is - hrm - a desktop PC. Intel
Core i7-860 (Lynnfield) @ 2.8Ghz (4 cores/8 threads) with 16Gb RAM :(

If anyone has access to a System Z mainframe and is playing with Go or someone
at IBM is reading this...

Okay, enough daydreaming. What have I been up to recently?

I've made some performance enhancements by moving the conversion of Unix line
endings to network line endings into the text package. It was a no-brainer
really - when folding text lines use the network line endings.

There is now a config package which centralises the tweakable settings. It's
still hard coded instead of reading from a file but at least it's all in one
place now.

An issue has been fixed whereby the client was not receiving messages after
the server timed out their idle connection.

Some of the performance issues with a high number of players have been dealt
with. One of the main issues being the performance of the LOOK command. The
aforementioned PC will now happily run with over 60,000 clients attached. The
Model B Raspberry PI - clocked at 900Mhz and using the builtin ethernet - can
run just over 4,000 clients reasonably.

I have been asked exactly what network tweaks I make to be able to run lots of
clients. The following is what I use on Debian Testing (stretch) - both for the
desktop and Raspberry PI. Mostly the changes are sysctl tweaks:


  sysctl net.ipv4.ip_local_port_range="1024 65535"
  sysctl net.core.somaxconn=8192
  sysctl net.core.netdev_max_backlog=8192
  sysctl net.ipv4.tcp_max_syn_backlog=8192


The above is okay for the Raspberry PI. For the desktop I usually increase all
of the 8192 values to 30000 or 40000. If you are running iptables you also
want to increase the number of tracked connections:


  sysctl net.ipv4.netfilter.ip_conntrack_max=8192


The 8192 should be changed to match at least the maximum number of connections
you want to handle plus a bit more for other things going on, say a few
hundred. Alternatively you can turn of connection tracking for port 4001:


  iptables -t raw     -A PREROUTING -p tcp --dport 4001	-j NOTRACK
  iptables -t raw     -A OUTPUT     -p tcp --sport 4001	-j NOTRACK
  iptables -t filter  -A INPUT      -p tcp --dport 4001	-j ACCEPT
  iptables            -A INPUT      -p tcp --sport 4001	-j ACCEPT


Well that's what works for me anyway :) If anyone else has any tweaks they
would like to share I'll cover them in a later journal entry.

All of these tweaks are now pushed to the public git dev branch for people to
go play with :)

--
Diddymus

  [1] Go for Linux on IBM System Z: https://github.com/linux-on-ibm-z/go


  Up to Main Index                           Up to Journal for January, 2016