Increase Heap Memory via Startup Script

Overview

This guide explains how to increase the Java heap memory allocation for Elixir Repertoire by modifying the startup script. Adjusting heap settings can improve performance for large reports, memory-intensive chains, or high-concurrency environments.


Step 1: Locate the Startup Script

  1. Navigate to your Elixir Repertoire 202x/Ambience 202x installation directory.

  2. Open the /bin folder.

  3. Locate the appropriate script:

Repertoire 202x:

  • startServer.sh for Linux/macOS
  • startServer.bat for Windows

Ambience 202x:

  • run-server.sh for Linux/macOS
  • run-server.bat for Windows

Step 2: Configure Heap Parameters

Edit the startup script to include custom Java memory options, e.g:

java -Xms1024M -Xmx3072M -XX:MetaspaceSize=256M -XX:MaxMetaspaceSize=512M -jar RepertoireServer-Launcher.jar

Parameter Breakdown:

  • -Xms1024M: Sets the initial heap size to 1024 MB.

  • -Xmx3072M: Sets the maximum heap size to 3072 MB.

  • -XX:MetaspaceSize=256M: Sets the initial metaspace threshold to 256 MB.

    Note: Metaspace is used to store class metadata such as class definitions, methods, and related runtime information.

  • -XX:MaxMetaspaceSize=512M: Sets the maximum metaspace size to 512 MB.

You may adjust these values based on your server’s available memory and workload requirements.


Step 3: Save and Restart

  1. Save your changes to the script.
  2. Restart the Repertoire/Ambience server using the updated startup script.

Step 4: Verify Configuration

After restarting:

  • Monitor memory usage via system tools or Java profiling utilities.
  • Check server logs for any memory-related warnings or errors.