
Main server thread lockup when pump range is increased
AveoCross opened this issue ยท 8 comments
After increasing range in mod's config from default 16 to 64, server becomes unplayable - rock bottom TPS (around 5) and Minecraft is hogging up CPU usage and RAM. After some time I get a server crash (crash-2020-07-15_07.58.15-server.txt).
After changing range value to default my CPU usage went from 90-100% on one core (presumably on which Minecraft server main thread runs) to below 40% and from 60% on all core (garbage collector i think) to below 5%. Also RAM usage decreased by about 1GB. And server is perfectly stable and playable now.
Why on earth would you increase it to 64? I should put a max on that config because people are doing stupid things...
At that range, you have it scanning up to a max of 2.1 million blocks. Of course that will take a while, although I don't know why it took 81 seconds.
I naturally assumed that value of 16 is 16 by 16 blocks. Or radius of 16 blocks. So i wanted it more. But 2.1 million is a lot for radius or square. So what that value really represents?
It's a cubic radius. So a radius of 16 gives you an area of 33x33x33 centered on the top of the pump.
That explains a lot. I've assumed that value is in blocks and also area not a cube.
Thank you for explanation and sorry for goofing.
Last question - why cube? Since pollution blocks accumulate at one block height it would be easier and intuitive to configure and would result in lighter scanning for pollution if it was configured as 2D area not a 3D cube.
No particular reason to be honest. But you're right, I should probably change it so it only scans a fixed height of like 3 blocks - so one block above and below the height of the pipe.
Nice! Looking forward for an update!
Also, if i may suggest - changing description of that config to more clear would be lovely. I mean what that value really represents.