LWC
LWC copied to clipboard
LWC cleanup causing performance stress - loading entities in the world.
I noticed '/lwc admin cleanup' was causing some performance issues on my server when running the command. It brought TPS from a stable 20 down to 16. I noticed the number of entities skyrocketed from ~800 to ~20,000, then back down to ~800 after a few minutes once the cleanup finished. It checked ~30,000 protections in my database.
Does the cleanup command load every single protection as an entity when checking or is it loading all the chunks in the world into the cache? Would it be possible to queue the cleanup instead of instantly checking all protections at once?
Using LWC UUID dev build http://ci.griefcraft.com/job/LWC-testing-fast-uuid-conversion/lastSuccessfulBuild/
How often are you running cleanup? It's mainly meant to remove stale protections, i.e. if you WorldEdit //set
'd away some protections then cleanup would remove them.
Does the cleanup command load every single protection as an entity when checking or is it loading all the chunks in the world into the cache?
It loads the block for the protection, so it would load the chunk if it's not loaded, yes. The only reason to use cleanup is to remove stale protections, which cannot be done without loading the block for the protection.
Would it be possible to queue the cleanup instead of instantly checking all protections at once?
Not at the moment.
I run the command once every two weeks due to rolling back banned players. It isn't a big concern, just something I noticed when I saw 20,000 entities loaded.