If your server suddenly consumes all available RAM and crashes, it could be caused by a mod or inefficient memory management. This guide explains how to track RAM usage and optimize your server using Peel Panel’s Startup tab and Aikar’s Flags.
Step 1: Identify High RAM Usage
-
Check Logs: Go to the Console tab and look for warnings or errors like
OutOfMemoryError.- Mods or plugins spamming errors could indicate excessive memory use.
-
Monitor Resource Usage: In the Dashboard, monitor the RAM usage graph to see when the spikes occur.
-
Debugging Mods (Optional): Install tools like Spark to generate performance reports that show which mods are consuming the most memory.
Step 2: Apply Aikar’s Flags in the Startup Tab
- Navigate to the Startup tab in Peel Panel.
- Locate the Flags section and toggle Aikar’s Flags on.
- These pre-configured flags optimize memory usage and garbage collection, improving server performance without manual adjustments.
Note: Aikar’s Flags automatically apply the best JVM settings, so there’s no need to modify startup parameters.
Step 3: Set Max Memory Percentage
- In the Startup tab, find the Max Memory Percentage setting.
- Set it to 70% of your server’s total memory.
- For a 16GB server, set it to 70% to leave headroom for other processes and prevent crashes.
- This setting forces memory-hungry mods to scale back and consume less memory, ensuring the server remains stable.
Step 4: Restart and Test
- Restart the server to apply the changes.
- Monitor RAM usage in the Dashboard to confirm that memory consumption is under control.
Troubleshooting
- High RAM Spikes Continue: Remove recently added mods or plugins one at a time to isolate the culprit.
- Server Performance Drops: Lower the max memory percentage to 60% for heavily modded servers and consider pregenerating chunks using tools like Chunky.
Final Thoughts
Aikar’s Flags and the Max Memory Percentage setting work together to prevent RAM issues and optimize server performance. Regularly monitor your server and make adjustments as needed to maintain stability.
