Up to Main Index Up to Journal for December, 2021 JOURNAL FOR SATURDAY 18TH DECEMBER, 2021 ______________________________________________________________________________ SUBJECT: A few server statistics DATE: Sat 18 Dec 20:34:52 GMT 2021 Over the last week I’ve been working on adding more of the configuration knobs and statistics logging to the WolfMUD server. While working on the statistics I thought “what information is actually useful to someone running a server?”. A pretty reasonable question, not point in useless data nobody is going to use. Previously, a lot of data was logged that didn’t make sense. I was never very happy with the memory usage reporting as it never added up to anything that made any sense. Some old statistics were no longer meaningful, like the number of Go routines - the server now uses more efficient tickers and timers. What I currently have running is the following, leading timestamps are removed and blank spaces reduced to fit the page, samples are every 10 seconds: Total world locations: 111, starting locations: 3 Genesis complete Accepting connections on: 127.0.0.1:4001 A[ 2502584] O[ 6498 +6048] T[ 261 +261] E[ 23 +23] P[ 0 0] A[ 8000] O[ 6500 +2] T[ 261 +0] E[ 23 +0] P[ 0 0] A[ 21552] O[ 6503 +3] T[ 261 +0] E[ 23 +0] P[ 0 0] A[ 6144] O[ 6502 -1] T[ 261 +0] E[ 23 +0] P[ 0 0] A[ 85088] O[ 6597 +62] T[ 262 +0] E[ 24 +1] P[ 1 1] A[ 26936] O[ 6595 -2] T[ 262 +0] E[ 24 +0] P[ 1 1] A[ 58584] O[ 6969 +374] T[ 278 +16] E[ 40 +16] P[ 1 1] A[ 29104] O[ 6684 -285] T[ 262 -16] E[ 40 +0] P[ 1 1] A[ 13440] O[ 6685 +1] T[ 262 +0] E[ 40 +0] P[ 1 1] A[ 17320] O[ 6742 +57] T[ 264 +2] E[ 44 +4] P[ 1 1] A[ 10432] O[ 6739 -3] T[ 264 +0] E[ 44 +0] P[ 1 1] A[ 11552] O[ 6740 +1] T[ 264 +0] E[ 44 +0] P[ 1 1] A[ 9320] O[ 6741 +1] T[ 264 +0] E[ 44 +0] P[ 1 1] A[ 7408] O[ 6739 -2] T[ 264 +0] E[ 43 -1] P[ 1 1] A[ 15328] O[ 6734 -5] T[ 264 +0] E[ 40 -3] P[ 1 1] A[ 7064] O[ 6735 +1] T[ 264 +0] E[ 40 +0] P[ 1 1] A[ 13024] O[ 6736 +1] T[ 264 +0] E[ 39 -1] P[ 1 1] A[ 6912] O[ 6736 +0] T[ 264 +0] E[ 38 -1] P[ 1 1] A[ 11144] O[ 6736 +0] T[ 264 +0] E[ 38 +0] P[ 1 1] A[ 9904] O[ 6736 +0] T[ 264 +0] E[ 37 -1] P[ 1 1] (2048 Bots join) A[ 36186360] O[ 74382 +67793] T[ 1702 +1440] E[ 23 +0] P[ 1441 1441] A[ 21289016] O[ 103432 +29050] T[ 2310 +608] E[ 23 +0] P[ 2049 2049] A[ 7257576] O[ 103500 +68] T[ 2310 +0] E[ 23 +0] P[ 2049 2049] A[ 7284032] O[ 103619 +119] T[ 2310 +0] E[ 23 +0] P[ 2049 2049] A[ 7294872] O[ 103649 +30] T[ 2310 +0] E[ 23 +0] P[ 2049 2049] A[ 7316352] O[ 103780 +131] T[ 2310 +0] E[ 23 +0] P[ 2049 2049] (2048 Bots leave) A[ 25053440] O[ 11335 -92830] T[ 262 -2048] E[ 23 +0] P[ 1 2049] A[ 9088] O[ 11328 -7] T[ 262 +0] E[ 23 +0] P[ 1 2049] A[ 13760] O[ 11328 +0] T[ 262 +0] E[ 23 +0] P[ 1 2049] A[ 5560] O[ 11328 +0] T[ 262 +0] E[ 23 +0] P[ 1 2049] A[ 11272] O[ 11329 +1] T[ 262 +0] E[ 23 +0] P[ 1 2049] Key: A=Allocations, O=Objects, T=Things, E=Events, P=Players ‘A’ is the number of memory allocations the runtime has made since the last statistics collection. ‘O’ is the total number of runtime objects and the ±change since the last collection. ‘T’ is the number of WolfMUD Thing making up the game world with a ±change since last collection. ‘E’ is the number of scheduled/pending events with a ±change since the last collection. ‘P’ is the current number of players and the maximum number of players since the server was started. I think these statistics give a broad overview into the currently running server. For those of you wondering, this is with 64,000 bots and myself running :) A[206091952] O[3141112 -25903] T[64270 +0] E[ 23 +0] P[64001 64001] A[208609696] O[3160431 +19319] T[64270 +0] E[ 23 +0] P[64001 64001] A[207167680] O[3150011 -10420] T[64270 +0] E[ 23 +0] P[64001 64001] A[206546872] O[3156371 +6360] T[64270 +0] E[ 23 +0] P[64001 64001] A[206449944] O[3159182 +2811] T[64270 +0] E[ 23 +0] P[64001 64001] A[206556040] O[3172745 +13563] T[64270 +0] E[ 23 +0] P[64001 64001] (After a 30 minute run everything goes quiet again) A[ 8968] O[ 149624 +0] T[ 262 +0] E[ 25 +0] P[ 1 64001] A[ 9800] O[ 149624 +0] T[ 262 +0] E[ 25 +0] P[ 1 64001] A[ 9888] O[ 149624 +0] T[ 262 +0] E[ 25 +0] P[ 1 64001] The allocations are really high at over 20 million/second. However, I’ve only been writing the code and there is no optimisation yet - plenty of room for improvements there. I did start to disappear down a rabbit hole looking into the allocations, but managed to save myself just in time :P I’ve not pushed any changes out to the public dev branch yet as I don’t seem to have the event accounting quite right yet. I need to update documentation for the new statistics and layout. However, I hope to have some changes out in the next few days. In other news, Go 1.18 Beta 1 with generics was released[1] by the Go team. I have compiled it from source for my desktop and one of my Raspberry Pi and plan to have a play with generics over the holiday season. I’ve had a brief glance… the square brackets keep screaming “Index!” and confuses my brain :( type Node[T any] struct { Value T Left *Node[T] Right *Node[T] } -- Diddymus [1] Go Blog - Go 1.18 Beta 1 is available, with generics: https://go.dev/blog/go1.18beta1 Up to Main Index Up to Journal for December, 2021