BlueMap-Minecraft / BlueMap

A Minecraft mapping tool that creates 3D models of your Minecraft worlds and displays them in a web viewer.
https://bluecolo.red/bluemap
MIT License
1.92k stars 131 forks source link

Set a configureable render speed limit in CLI #215

Closed RuofengX closed 3 years ago

RuofengX commented 3 years ago

Problem I am using a 2C8G server and running papermc, a plugin version Minecraft server. So I could use CLI to render my map. Unfortunately, when I start bluemap render,it takes too much performance and CPU time that it cause a lot of lags to my papermc.

Solution The simplest way is add a count which limits the render speed every second. Also I think it's better to recommand add a -Xmx128m to limit the memory use in wiki. (It crashed with an OOM when I run bluemap with no limit meanwhile my papermc is still running)

EsserGaming commented 3 years ago

as that would be nice, you can set the amount of cores in the core.conf file below;

renderThreadCount: 0 0 = unlimited

So set to 1 since you only have 2cores.

RuofengX commented 3 years ago

Yes I did. But it still cause a lag. I am actually planning to buy a 4Core server instead.

EsserGaming commented 3 years ago

Makes sense, you only have 1 core for the minecraft server and one core for the bluemap render. I recommend 6 cores for the best experience, and make sure you're not paying too much for your server lol, cause its stupid how some hosts inflate server prices 😄

RuofengX commented 3 years ago

Thanks for reply. BTW I think it's still necessary to add a -Xmx limit recommand in wiki instruction.

EsserGaming commented 3 years ago

I would put that in a issue here; Bluemap-Wiki repo

TBlueF commented 3 years ago

Please read the discussion in ticket #176 for an explanation why a render-speed limit is not practicable and makes no sense to me. (Edit: sorry wrong issue) Basically: 2 cores are just not enough to run a minecraft-server AND render a 3D-Map without some lag :)

Edit2: I can't find the correct issue rn ... A render-speed limit is not practicable because the only feasible way to limit the render-speed would be pausing between single tile-renders. A single tile-render (on one thread) needs up to a whole second to complete! Which means that such a limit would still lag the server for a second, and then pausing for a while, just to lag the server again for a second when rendering the next tile.

SulpherStaer commented 3 years ago

I'd like to make a suggestion (despite this ticket being closed)

Dynmap allows the admin to choose which type of chunk update causes an actual update to the map. Perhaps that's a feature bluemap could use. By allowing selection of 'update events', this might reduce the tiles requiring updating whilst live. Maybe also a delay time between how frequently a tile is updated? (if it already doesn't do that by default)

TBlueF commented 3 years ago

@SulpherStaer See: https://github.com/BlueMap-Minecraft/BlueMap/issues/176#issuecomment-881337140