Up to Main Index Up to Journal for December, 2017 JOURNAL FOR THURSDAY 28TH DECEMBER, 2017 ______________________________________________________________________________ SUBJECT: WolfMUD on a Raspberry Pi 3 DATE: Thu 28 Dec 22:01:35 GMT 2017 I must have been a good boy this year as Santa brought me a Raspberry Pi 3 :) So today I dusted off my trusty Eee PC and used it to put the latest Raspbian on an SD card — which took about 45 minutes. I then spent several hours ripping the installation apart and setting everything up how I expect it to be. I also set the graphics to only reserve 16Mb as I run it as a headless server. Next I compiled Go from source for 1.4.3 and 1.9.2 which was a little hairy as I saw the temperature spiking around 87°C and that’s with a heat sink stuck on the CPU. Compared to my Raspberry Pi 2 model B it’s a lot, lot faster. I then did some testing with WolfMUD to see how many ‘player’ bots it could handle. I used the default WolfMUD configuration — apart from the raising the maximum number of players, wired ethernet and a 10/100 hub. I also had the following networking tweaks setup: 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 All of the ‘player’ bots were launched from a separate machine — my desktop. I also set GOMAXPROCS=32 otherwise only 1 CPU was used, which seemed odd. The Raspberry Pi handled 10,240 bots very nicely. Some stats from the logs: U[69Mb -9Mb] O[738621 +102788] T[10425 +298] G[10253 +298] P 10241/10241 U[68Mb -742kb] O[731662 -6959] T[10425 +0] G[10254 +1] P 10241/10241 U[63Mb -5Mb] O[448104 -283558] T[10425 +0] G[10254 +0] P 10241/10241 U[71Mb +8Mb] O[531141 +83037] T[10425 +0] G[10254 +0] P 10241/10241 U[82Mb +11Mb] O[654927 +123786] T[10425 +0] G[10254 +0] P 10241/10241 U[68Mb -14Mb] O[582064 -72863] T[10425 +0] G[10254 +0] P 10241/10241 That’s 10,240 bots and myself logged into the server. Some more stats from running the top command: top - 21:45:49 up 2:35, 3 users, load average: 3.91, 1.88, 1.07 Tasks: 116 total, 1 running, 115 sleeping, 0 stopped, 0 zombie %Cpu0: 40.3 us, 7.4 sy, 0.0 ni, 28.9 id, 0.0 wa, 0.0 hi, 23.5 si, 0.0 st %Cpu1: 49.7 us, 7.7 sy, 0.0 ni, 42.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu2: 45.4 us, 9.9 sy, 0.0 ni, 44.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu3: 49.3 us, 6.8 sy, 0.0 ni, 43.9 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st MiB Mem : 976.867 total, 302.023 free, 150.883 used, 523.961 buff/cache MiB Swap: 985.996 total, 985.992 free, 0.004 used. 810.043 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 15572 rolfea 20 1088.5m 100.5m 3.8m S 226.2 10.3 6:24.36 server This was all running at 65.5°C as reported by the output of running: /opt/vc/bin/vcgencmd measure_temp I’m sure I can load up more ‘player’ bots and push the Raspberry Pi 3 harder, but I’ve run out of time for today :( -- Diddymus Up to Main Index Up to Journal for December, 2017