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

Uses too much memory #565

Closed ChicknTurtle closed 5 months ago

ChicknTurtle commented 5 months ago

I am hosting a server locally on my mac, and bluemap is always using more memory than my server (5gb) even when nobody is on the server or viewing the map.

My pc has 16gb of memory, but while running other things like my minecraft client, web browser, etc, it maxes out my memory and causes the server to lag. So, I think there should be an option to cap the memory to whatever amount. Also, the map should not do anything while nobody is viewing the map. I might disable bluemap until something like this is added

BlueMap Version: BlueMap-3.21-spigot.jar

SjoerdHekking commented 5 months ago

You can limit the maximum amount of memory allocated to BlueMap by setting JVM options. This can be done by editing the startup script or command used to run BlueMap. Add the -Xmx flag to specify the maximum heap size.

ChicknTurtle commented 5 months ago

ty!

ChicknTurtle commented 5 months ago

Where do I add the JVM arguments? I've looked through all config files for bluemap. I don't want to set max memory for the whole server, just the bluemap process.

SjoerdHekking commented 5 months ago

I wonder what model Mac you have (CPU core count etc.). If you wish to configure BlueMap in such a way it uses less performance from your mac, while you are also using it, you can tweak it via tips in this section . As for running the whole time, BlueMap updates whenever a world has been saved, I am not sure how often you save a world.

ChicknTurtle commented 5 months ago

Model Name: Mac mini Model Identifier: Macmini9,1 Chip: Apple M1 Total Number of Cores: 8 (4 performance and 4 efficiency) Memory: 16 GB

I have the render threads set to 1, but that is for cpu. I am more worried about the memory usage.

TBlueF commented 5 months ago

@ChicknTurtle Alright, so: It's not possible to "limit" the RAM BlueMap uses separately to the rest of the server, that's not how Java-Heap works ^^ Also, did you do a Heap-Dump or how do you even know that bluemap is using more RAM than the server if it is running as a plugin on said server? ^^

To clear up a few things:

If you still think bluemap is using up too much ram/heap and it's not the soft-cache but actually hard memory-allocation that prevents the server from getting its own share of ram, then please attach a HeapDump for me to analyze, or a link to where i can download it. Otherwise please close this issue :)