Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This section describes how to change the memory settings for the Java Virtual Machine when running Aspire. It depends on how you are running Aspire. Check the Hardware and Network Considerations for the recommend Memory memory allocation settings.

By default Aspire uses 1 GB of memory for evaluation and testing purposes, but for production or development environments we recommend to increase this accordingly.

Running in Linux from startup.sh

 

Running in Windows from startup.bat

  1. Go to your ${aspire.home}\bin folder and edit the startup.bat file, in this case we are setting Aspire to use 32 GB of memory

    Code Block
    languagepowershell
    themeConfluence
    firstline5
    linenumberstrue
    rem set the Java options for Aspire
    set ASPIRE_JAVA_OPTS=-Xmx32g -Xms32g -XX:MaxPermSize=256m
  2. Restart Aspire:

    Code Block
    themeFadeToGrey
    > bin\shutdown.bat

    and then

    Code Block
    themeFadeToGrey
    > bin\startup.bat
  3. Enjoy your new memory settings

Running as Windows Service

...

Every command should be run using an Administrator Console, and relative to the ${aspire.home} directory.

  1. Change the $aspire${aspire.home}\bin\installService.bat file to reflect the memory settings you want to use. In the example below we are setting the memory as 32 GB

    Code Block
    languagepowershell
    themeConfluence
    firstline5
    linenumberstrue
    rem Initial Java heap size
    set JAVA_INITIAL_MEMORY=32768
    
    rem Maximum  Java heap size
    set JAVA_MAX_MEMORY=32768
  2. Stop the service from the Services Window
  3. Remove the service by executing

    Code Block
    themeFadeToGrey
    > bin\removeService.bat
    Windows Service Name:  AspireService
    
    [SC] DeleteService SUCCESS
    Service AspireService deleted.
    
    > 
    
    
  4. Reinstall the service

    Code Block
    themeFadeToGrey
    > bin\installService.bat
    "JAVA 8"
    Current System Architecture: AMD64
    Windows Service Name:  AspireService
    Aspire Home:  C:\Users\aaguilar\Distributions\aspire-3.2
    
    Java VM:  C:\Program Files\Java\jdk1.8.0_73\jre\bin\server\jvm.dll
    Creating Service...
    
    
    Service AspireService created.
    
    > 
  5. Enjoy your new Memory Settingsmemory settings

     

Option 2. Change the JVM Options

...

  1. Open the Registry Editor (regedit)
  2. Browse to

    Code Block
    HKEY_LOCAL_MACHINE / SOFTWARE / WOW6432Node / Apache Software / Procrun 2.0 / AspireService / Parameters / Java
  3. Edit JvmMs and JvmMx to what you need


  4. Restart the AspireService from the Services Window


  5. Enjoy your new Memory Settingsmemory settings