Up to Main Index                             Up to Journal for March, 2021

                     JOURNAL FOR SUNDAY 14TH MARCH, 2021

SUBJECT: 50,000+ bots, server a little crunchy but stable…
   DATE: Sun 14 Mar 20:18:44 GMT 2021

This is an excerpt from the server log with 51,200 bots, plus myself, logged
into WolfMUD and causing mischief :D

  U[1Gb  +10Mb] A[+39464183] O[ 5551842  +289453] T[51473 +0] G[102429 +0]
  U[1Gb  +62Mb] A[+45191308] O[ 8733152 +3181310] T[51473 +0] G[102429 +0]
  U[1Gb  -51Mb] A[+39893282] O[ 5699546 -3033606] T[51473 +0] G[102429 +0]
  U[1Gb   -2Mb] A[+41968834] O[ 5219779  -479767] T[51473 +0] G[102429 +0]
  U[1Gb  +17Mb] A[+41034808] O[ 6151276  +931497] T[51473 +0] G[102429 +0]
  U[1Gb  -21Mb] A[+40275728] O[ 4825332 -1325944] T[51473 +0] G[102429 +0]
  U[1Gb +135Mb] A[+50823814] O[12243261 +7417929] T[51473 +0] G[102429 +0]
  U[1Gb -121Mb] A[+31063716] O[ 5123850 -7119411] T[51473 +0] G[102429 +0]

This is on my desktop, a quad core i5-2400 CPU @ 3.10GHz with 8Gb RAM, running
both the server and botrunner. Hands up, I did make some tweaks. I tuned my
network settings a little. More starting locations were added to help reduce
the lock congestion when the bots were logging into the server. The botrunner
was modified to load bots in batches of 2048 with a 5 second delay to give the
crowds time to disperse. Things were still a little crunchy after the first
35,000 bots joined the server - but WolfMUD was still playable.

For this hardware, using the stock zones, the maximum number of bots would be
around 30,000 to keep the maximum response time to under 3 seconds - but
generally much quicker than that. This is what ‘only’ 30,000 bots looks like:

  U[615Mb -25Mb] A[+35514291] O[3685060 -812575] T[30273 +0] G[60029 +0]
  U[609Mb  -5Mb] A[+36034025] O[3531108 -153952] T[30273 +0] G[60029 +0]
  U[621Mb +11Mb] A[+36258529] O[3905237 +374129] T[30273 +0] G[60029 +0]
  U[612Mb  -8Mb] A[+36157285] O[3642445 -262792] T[30273 +0] G[60029 +0]
  U[620Mb  +7Mb] A[+35529586] O[3868141 +225696] T[30273 +0] G[60029 +0]

The bottle-neck definitely seems to be with the CPU. If I run 25,000 bots from
the Raspberry Pi 4 and 25,000 bots from the desktop then the server is much
happier. I tried running all 50,000 bots from the Raspberry Pi 4 but I started
dropping connections after about 35,000 bots, even after tweaking the network
settings. Am I hitting a limit as to what I can expect from a Raspberry Pi?
Something I need to look into again when I eventually get the fan and other
bits sorted out - still waiting for some items to be back in stock.

Needless to say, the new network code will be going into the next release ;)

The changes for the networking are now out on the public dev branch. The
update includes two other fixes. One fix is for the botrunner, the other is a
minor optimisation to the state.AddLock method.

Next job, before the release, is to update the documentation for module mode.

Now, if only someone could find me 50,000 WolfMUD players…


  Up to Main Index                             Up to Journal for March, 2021