Up to Main Index Up to Journal for December, 2017 JOURNAL FOR FRIDAY 29TH DECEMBER, 2017 ______________________________________________________________________________ SUBJECT: WolfMUD on a Raspberry Pi 3 — part 2 DATE: Fri 29 Dec 19:13:27 GMT 2017 After yesterday’s little experiment[1] with WolfMUD, on a shiny new Raspberry Pi 3, I had some emails asking me if I could push things further. So, today I created 20,480 ‘player’ bot accounts to see what this tiny board could really do. I used the same set up as before, including the same network tweaks. All of the ‘player’ bots were again launched from a separate machine — my desktop. I also set GOMAXPROCS=32 for the server. The result? The Raspberry Pi 3 was able to handle over 17,500 bots and myself logged in. I could push the number of bots a little higher, but then I started to get connection errors, I therefore stayed at 17,500 bots. Some stats from the server: U[127Mb -5Mb] O[1340427 +358082] T[17685 +0] G[17513 +0] P 17501/17501 U[122Mb -4Mb] O[ 887502 -452925] T[17685 +0] G[17513 +0] P 17501/17501 U[145Mb +22Mb] O[1144671 +257169] T[17685 +0] G[17513 +0] P 17501/17501 U[164Mb +18Mb] O[1346555 +201884] T[17685 +0] G[17513 +0] P 17501/17501 U[128Mb -36Mb] O[1345709 -846] T[17685 +0] G[17513 +0] P 17501/17501 The statistics line is output every ten seconds by the server. After yesterday I’ve been asked if I can explain the figures. The ‘U’ column shows the current memory in use. Above, the server is using between 122Mb and 164Mb RAM as reported by the Go runtime memory statistics. The ‘O’ column shows the number of live Go objects. The ‘T’ column is the number of things currently in the game world. The ‘G’ column show the current number of Goroutines. The ‘P’ column shows the current number of players and the maximum number of players since the server started. For each column the +/- figures show the change since the previous statistics line was output. In this case every ten seconds. So that’s 17,500 ‘player’ bots and myself — all running around the world — in 122Mb to 164Mb of RAM. Not too shabby! Some statistics from the top command: top - 18:13:46 up 31 min, 1 user, load average: 12.88, 7.06, 4.19 Tasks: 123 total, 1 running, 122 sleeping, 0 stopped, 0 zombie %Cpu0: 48.4 us, 5.9 sy, 0.0 ni, 3.3 id, 0.0 wa, 0.0 hi, 42.4 si, 0.0 st %Cpu1: 81.9 us, 12.1 sy, 0.0 ni, 6.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu2: 82.9 us, 9.9 sy, 0.0 ni, 7.2 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu3: 81.2 us, 12.2 sy, 0.0 ni, 6.6 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st MiB Mem : 976.867 total, 350.645 free, 274.820 used, 351.402 buff/cache MiB Swap: 985.996 total, 985.996 free, 0.000 used. 686.375 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 20247 rolfea 20 1194.0m 181.5m 3.7m S 354.5 18.6 9:57.37 server There was also a 10-15% CPU usage from my use of SSH with dvtm to access the server from my desktop. The little Raspberry Pi did get a little toasty this time. The CPU hit 77.9°C as reported by the output of running: /opt/vc/bin/vcgencmd measure_temp That’s with the Raspberry Pi 3 in a Ninja Coupé PiBow case[2] and with a small heat sink on the CPU[3]. With some additional tweaks and optimisation could I push things even further? Could you find me 17,500+ Mud players? ;) -- Diddymus [1] Journal for Thursday 28th December, 2017: 28.html [2] Ninja Coupé PiBow case @ ModMyPi: https://www.modmypi.com/raspberry-pi/cases-183/raspberry-pi-b-plus2-and-3-cases-1122/plastic-cases-1142/ninja-coup%C3%A9-pibow-raspberry-pi-case--model-b-plus-and-2 [3] Heat sink @ ModMyPi: https://www.modmypi.com/raspberry-pi/accessories-198/heat-sinks-and-cooling/raspberry-pi-heat-sink-kit-black Up to Main Index Up to Journal for December, 2017