More RAM did not fix the lag
I upgraded RAM but the server still lags.
RAM only helps if memory was the limit; most lag is CPU work in the main thread, which needs the causes fixed.
Before you start: spark installed.
Step by step
- Profile with spark while it lags (see the lag guide) to see what is really slow.
- Reduce entities, farms and redstone, and pre-generate the world.
- Lower simulation-distance in Quick Settings to 6 so less of the world is active.
- Use Paper/Purpur and keep plugins updated.
- Check that the server was restarted after the upgrade so Java uses the new memory.
- Compare Statistics before and after: if memory never went near the old limit, RAM was never the bottleneck and CPU work is.
Check it worked: TPS improves after fixing the causes spark showed.
Why it happens: Minecraft's main loop is mostly single-threaded, so entities, farms and chunk generation lag regardless of RAM.
More guides on RAM, CPU, performance, and lag: