Coder Social home page Coder Social logo

Uses too much memory about bluemap HOT 6 CLOSED

ChicknTurtle avatar ChicknTurtle commented on September 5, 2024
Uses too much memory

from bluemap.

Comments (6)

SjoerdHekking avatar SjoerdHekking commented on September 5, 2024

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.

from bluemap.

ChicknTurtle avatar ChicknTurtle commented on September 5, 2024

ty!

from bluemap.

ChicknTurtle avatar ChicknTurtle commented on September 5, 2024

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.

from bluemap.

SjoerdHekking avatar SjoerdHekking commented on September 5, 2024

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.

from bluemap.

ChicknTurtle avatar ChicknTurtle commented on September 5, 2024

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.

from bluemap.

TBlueF avatar TBlueF commented on September 5, 2024

@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:

  • Java reserves a specific amount of RAM for its Heap-Space. E.g. if you use -Xmx6G on your server Java will reserve up to 6GiB of RAM for heap-space and will usually not free this again during runtime. You should always only allocate as much RAM to your server as you can spare and expect this to always be used completely.
  • BlueMap does run completely fine with very limited amounts of heap
  • BlueMap does not hard-reserve huge amounts of ram while rendering and especially not when idle
  • BlueMap 5.2 does keep a soft memory cache for chunks it loaded to optimize rendering speed. However this is a SOFT allocation, meaning that if the JVM ever is in need of more Heap, Javas GarbageCollector will clear up that cache automatically and reuse it for things that are more important. -> BlueMap only uses Heap-Space for caching chunks that is NOT needed by anything else.
  • Unused heap-space is wasted heap-space.
  • If your server lags it is most likely not due to bluemap using too much ram/heap.

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 :)

from bluemap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.