Perfomance - RAM

Hello. When I install clean PaperMC , it uses about 900Mb of RAM, given that it has no players or plugins. Is this a normal situation? What tips can you give to bring your usage down to 500MB?

Hello,

Please provide your server timings (/timings) link.
So we can get all the required information :slight_smile:

https://timings.aikar.co/?id=90b4683dc6e84808b2c3fff51c8c8932

this is a test server, so it does not have very good characteristics, I am specifically interested in the question of RAM, how can I minimize its use

Keeping a server at steady 500 MB is impossible due to how these server works, so what will happen is it will start at ~500 MB of usage and go up to about ~1500 MB before GC (garbage collection), this may be different since your test server is at 1GB it may clear before at the threshold (which is around 700-900 MB, which then means the GC runs quite often, causing more lag than needed.

From my experience, my test server running at 3GB RAM starts at 500 MB usage of ram and goes up to 1100 MB instead of 1500 MB because I’ve altered the tick schedule as of when the GC should start. This would give ~1 GB for the server to run and do it’s things, and the rest of the RAM for the player activies (such as rendering chunks/general gameplay etc)
(And this is whilst using 20 plugins, -5 of them are considered heavy, -15 of them are considered light-weight)

What to do?
My recommendation now, is to head over to [Guide server optimization] and follow all the optimization steps in: “bukkit.yml” section, “spigot.yml” section, and “paper.yml” section (in that order) Additionally you could lower the render distance in server.properties (I would recommend 8 unless you plan on creating a huge server, then set it lower)

Another thing which you should do, is to at least set your startup parameters to:
-Xms3G -Xmx3G -Dterminal.jline=false -Dterminal.ansi=true
(Instead of -Xms128M -Xmx1024M -Dterminal.jline=false -Dterminal.ansi=true

Doing both of these things will not make your server ‘steadily run at 500 MB all the time’ (because of the build-up for the GC as explained) but it’s the perfect settings for a test server, and/or for a small server with friends.

Hope this helped, let me know if there’s anything else.

2 Likes