---
title: Automatic memory allocation
description: If the Memory Tuning feature is enabled during setup, the setup algorithm determines the maximum Java Virtual Machine (JVM) heap size based on the total amount of available system memory. Otherwise, the PingDirectory server allocates a maximum JVM heap of 384 MB.
component: pingdirectory
version: 11.0
page_id: pingdirectory:pingdirectory_server_administration_guide:pd_ds_auto_memory_alloc
canonical_url: https://docs.pingidentity.com/pingdirectory/11.0/pingdirectory_server_administration_guide/pd_ds_auto_memory_alloc.html
revdate: April 26, 2024
section_ids:
  about-this-task: About this task
  steps: Steps
  choose-from: Choose from:
---

# Automatic memory allocation

If the Memory Tuning feature is enabled during setup, the `setup` algorithm determines the maximum Java Virtual Machine (JVM) heap size based on the total amount of available system memory. Otherwise, the PingDirectory server allocates a maximum JVM heap of 384 MB.

## About this task

The server also allows you to specify the maximum heap size during the setup process. For more information, see [JVM properties for server and command-line tools](pd_ds_jvm_properties_server_cmdline_tools.html).

## Steps

* To enable Memory Tuning during the setup process:

  ### Choose from:

  * Select the feature in interactive command-line mode.

  * Add the `--jvmTuningParameter` option using the `setup` tool in non-interactive command-line mode.

  * Regenerate the Java properties file with `bin/dsjavaproperties` and the `--jvmTuningParameter` options.

    |   |                                                                                                                                                                                                                                  |
    | - | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    |   | If Memory Tuning is selected, the server allocates the maximum JVM heap depending on the total system memory. The following table displays the automatically allocated maximum JVM heap memory based on available system memory. |

    **Allocated Max JVM Memory if Tuning is Enabled**

    | Available Memory                 | Allocated JVM Memory                                                                                                                                                                                                                                                       |
    | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | 16 GB or more using a 64-bit JVM | The maximum JVM heap size is set to 70% of total system memory. If the maximum JVM heap size is less than or equal to 128GB of memory, which should be the case for systems with up to 160 GB of memory, then the initial heap size is set to equal the maximum heap size. |
    | 6 GB‒16 GB using a 64-bit JVM    | Total system memory - 4 GB                                                                                                                                                                                                                                                 |
    | 4 GB–6 GB using a 64-bit JVM     | 2 GB                                                                                                                                                                                                                                                                       |
    | 2 GB–4 GB                        | 512 MB                                                                                                                                                                                                                                                                     |
    | 1 GB–2 GB                        | 384 MB                                                                                                                                                                                                                                                                     |
