# How to configure direct\_max\_in\_bytes

**URL:** <https://discuss.elastic.co/t/how-to-configure-direct-max-in-bytes/355603>\
**Category:** Elasticsearch\
**Created:** [March 18, 2024, 12:46pm UTC](https://discuss.elastic.co/t/how-to-configure-direct-max-in-bytes/355603 "2024-03-18T12:46:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![randomnamegenerator](https://avatars.discourse-cdn.com/v4/letter/r/7ab992/32.png) [@randomnamegenerator](https://discuss.elastic.co/u/randomnamegenerator)\
**Post date:** [March 18, 2024, 12:46pm UTC](https://discuss.elastic.co/t/how-to-configure-direct-max-in-bytes/355603/1 "2024-03-18T12:46:32Z")

</div>

Hello All,

I am wanting to adjust the direct\_max\_in\_bytes value , the documentation I have read deals with how adjust the jvm heap size but not the off heap size?

\*\*  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/f/cfbc3991fc7cab57257696af6f8fadc5aac620d9.png)  
\*\*

> **[Important Elasticsearch configuration | Elasticsearch Guide \[8.12\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#heap-size-settings)**

If anyone can advise that would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![randomnamegenerator](https://avatars.discourse-cdn.com/v4/letter/r/7ab992/32.png) [@randomnamegenerator](https://discuss.elastic.co/u/randomnamegenerator)\
**Post date:** [March 18, 2024, 2:35pm UTC](https://discuss.elastic.co/t/how-to-configure-direct-max-in-bytes/355603/2 "2024-03-18T14:35:59Z")

</div>

Just to add more context, this is running in windows with the elasticservice,

from the elasticsearch manager I have adjusted the XX:MaxDirectMemorySize value but it doesnt have any affect on the "direct\_max\_in\_bytes" value that I see when running Get \_Nodes/\_all/jvm

```auto
      },
      "jvm" : {
        "pid" : 1408,
        "version" : "16.0.2",
        "vm_name" : "OpenJDK 64-Bit Server VM",
        "vm_version" : "16.0.2+7",
        "vm_vendor" : "Eclipse Foundation",
        "bundled_jdk" : true,
        "using_bundled_jdk" : true,
        "start_time_in_millis" : 1710772170660,
        "mem" : {
          "heap_init_in_bytes" : 12582912000,
          "heap_max_in_bytes" : 12582912000,
          "non_heap_init_in_bytes" : 7667712,
          "non_heap_max_in_bytes" : 0,
          "direct_max_in_bytes" : 0
        },
        "gc_collectors" : [
          "G1 Young Generation",
          "G1 Old Generation"
        ],
        "memory_pools" : [
          "CodeHeap 'non-nmethods'",
          "Metaspace",
          "CodeHeap 'profiled nmethods'",
          "Compressed Class Space",
          "G1 Eden Space",
          "G1 Old Gen",
          "G1 Survivor Space",
          "CodeHeap 'non-profiled nmethods'"
        ],
        "using_compressed_ordinary_object_pointers" : "true",
        "input_arguments" : [
          "-Xms12g",
          "-Xmx12g",
          "-XX:MaxDirectMemorySize=12582912000",

```

Do I need to reboot the system or restart a service other than the elasticsearch windows service?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 15, 2024, 2:36pm UTC](https://discuss.elastic.co/t/how-to-configure-direct-max-in-bytes/355603/3 "2024-04-15T14:36:48Z")

</div>

Closed on April 15, 2024, 2:36pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
