Quote:
|
Originally Posted by Sotho Tal Ker
I heard the spawners usw very much memory and serialization data - is this true? And do you have any plans on optimizing this? (if it is true) 
|
Here are some hard numbers for you. I just ran these benchmarks with the most recent versions of 4 systems, Nerun's premium spawner 4.0.9 (the closest to distro), XmlSpawner 3.04, Megaspawner 3.68, Gigaspawner 1.4.4
All tests were run on a fresh RunUO installation. All objects other than the spawners were deleted.
To test them under actual spawning loads, I used Nerun's full world spawns of all facets.
This gave an equivalent set of 8092 spawners and their spawns for each system.
Test 1 - No Spawn condition
The first test was for serialized saves and memory use with all spawners turned off and no active spawns (This gives the basic mem use and save size per spawner).
Save size was taken as the size of the Item Save folder.
Mem use was taken as the value reported in the [admin information panel.
Mem values were always taken immediately after restarting the server.
Save sizes (size of the Saves/Items folder) were as follows:
No spawners: 0M
Premiumspawner: 1.18M
XmlSpawner: 3.80M
Megaspawner: 3.32M
Gigaspawner: 1.73M
Total mem usage was as follows:
No spawners: 24.7M
Premiumspawner: 30.4M
XmlSpawner: 39.6M
Megaspawner: 72.0M
Gigaspawner: 64.9M
This gives the following load/spawner values in bytes
Premiumspawner: 146 save, 741 mem
XmlSpawner: 480 save, 1924 mem
Megaspawner: 410 save, 5931 mem
Gigaspawner: 213 save, 4968 mem
Test 2 - Fully Spawned condition
Under spawned conditions (all spawners activated and respawned), the following results were obtained
(Because each system spawns slightly differently, the total number of items/mobiles varied as follows
Premiumspawner: 27100 mobs, 75072 items
XmlSpawner: 26250 mobs, 75275 items
Megaspawner: 26467 mobs, 75530 items
Gigaspawner: 26156 mobs, 75153 items - Ilshenar would not spawn so 2 existing Fel spawners were increased to bring mob/item numbers to comparable levels)
Total save sizes (size of the Saves folder) were as follows:
Premiumspawner: 18.6M
XmlSpawner: 21.0M
Megaspawner: 20.5M
Gigaspawner: 19.0M
Total mem usage was as follows:
Premiumspawner: 103M
XmlSpawner: 113M
Megaspawner: 147M
Gigaspawner: 140M
Conclusion
As you can see, xmlspawner does use more memory and has a larger save footprint than the trimmest distro equivalent (Nerun's), but the overall differences are not that great.
For over 8000 spawners, the total difference in save file size is around 2.5M, and the mem difference is about 10M.
In comparison to megaspawner and gigaspawner, it has a slightly larger save but requires significantly less mem.
If you activate smartspawning you easily make up any differences.
Just using the vanilla [optimalsmartspawning command that ends up selecting 44% of the spawners (3458) for smartspawning gives you these values
save: 13.4M
mem: 95.5M
mobs: 14537
items: 45219
which is less than any other spawned configuration.
(edit)
updated with gigaspawner benchmark numbers
(edit)
formatted to make it easier to read