Multiverse-Core

Multiverse-Core

6M Downloads

Multiverse-core Uses a lot of RAM

WolfyRed opened this issue ยท 10 comments

commented

Information

Help request

Problem Summarized
Multiverse-core uses up a lot of RAM.

Problem Descriptive
Multiverse-core uses a lot of RAM, presumably because it still has a lot of chunks in different worlds still loaded, even though the users that have adventured those chunks have exited those words + have been logged off.
Want only chunks that are currently in view to be loaded, in any/all world(s).

What I have tried
Removing all plugins (RAM usage was left at a nice 1.2GB)
Added half of the plugins back (RAM usage increased to 1.4GB)
Added all plugins but Multiverse-Core and Multiverse-Portals to the plugins folder (RAM usage just left at 1.5GB)
Added Multiverse-Core and Multiverse-Portals back into the plugins list (RAM usage goes up to 2.1GB and gradually increases over time from there, usually slowing down extremely by 5.2GB, however not stopping)
Checked the config.yml files of both plugins mentioned (Multiverse-core and Multiverse-portals) (Haven't shown options for me to only load chunks currently in use to my knowledge)

Screenshots

commented

P.S. Let me know if I have the completely wrong idea, and Multiverse-core gradually increasing in RAM like this isn't having to due with having multiple slightly-adventured worlds loaded while the server is on and running. I would greatly appreciate it.

I would also greatly appreciate the actual reason why all this RAM is being used, so I have a clear or at least nicely explained and easily to realize idea.

commented

I had this problem at one point, and solved it by only keeping my "hub" world's spawn chunks loaded. That dropped RAM and CPU usage massively for me. This setting is found in the worlds.yml file; it needs to be set for each world.

commented

I had this problem at one point, and solved it by only keeping my "hub" world's spawn chunks loaded. That dropped RAM and CPU usage massively for me. This setting is found in the worlds.yml file; it needs to be set for each world.

Hey there!
I've got the same problem... Do you mean that i neet to set autoLoad: 'true' to 'false'

Otherwise i can't see any settings for chunk loading...

For example my Main World:

world:
==: MVWorld
hidden: 'false'
alias: ''
color: WHITE
style: NORMAL
pvp: 'true'
scale: '1.0'
respawnWorld: ''
allowWeather: 'true'
difficulty: EASY
spawning:
==: MVSpawnSettings
animals:
==: MVSpawnSubSettings
spawn: 'true'
spawnrate: '-1'
exceptions: []
monsters:
==: MVSpawnSubSettings
spawn: 'true'
spawnrate: '-1'
exceptions: []
entryfee:
==: MVEntryFee
amount: '0.0'
hunger: 'true'
autoHeal: 'true'
adjustSpawn: 'true'
portalForm: ALL
gameMode: SURVIVAL
keepSpawnInMemory: 'true'
spawnLocation:
==: MVSpawnLocation
x: -2471.0
y: 79.0
z: 410.0
pitch: 0.0
yaw: 0.0
autoLoad: 'true'
bedRespawn: 'true'
worldBlacklist: []
environment: NORMAL
seed: '-5397466261478779853'
generator: 'null'
playerLimit: '-1'
allowFlight: 'true'

commented

So I believe there are two relevant options: autoLoad and keepSpawnInMemory. Based on the descriptions on the wiki, I wasn't sure what exactly autoLoad did, so I turned keepSpawnInMemory off in my server. That is what made the difference for me.

commented

autoLoad just means the world is loaded into the server so players can enter the world, if this is set to false, you may need to do /mv load <world> before players can even access the world. You could do this for worlds you rarely use or are ok with running the mv load command before being about to access it. But in this case, you probably want keepSpawnInMemory option. (i.e. this is about the world)

keepSpawnInMemory is just whether the chunks at spawn point should always be loaded even if no players are present. (i.e. this is about the chunks)

commented

Another note about reporting on performance, a few RAM stats can't really help much in any form useful data for us to look into. You will need to provide proper profiling reports with things like spark https://www.spigotmc.org/resources/spark.57242/

Other optimisations you can look into:
https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/
https://www.spigotmc.org/threads/guide-server-optimization%E2%9A%A1.283181/

commented

Ben is right that RAM stats aren't enough for us to go off of. I think a heap dump would be needed for us to be able to figure out if anything is actually wrong.

commented

Ben is right that RAM stats aren't enough for us to go off of. I think a heap dump would be needed for us to be able to figure out if anything is actually wrong.

How to do a "Heap dump"

commented

if you get spark plugin, its /spark heapdump.

commented

Closing this as there is no response on heap dump or profile report. Feel free to open a new issue if needed.