Versions Compared

Key

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

Status

Current state: Under Discussion Accepted

Discussion threadhttp://apache-flink-mailing-list-archive.1008284.n3.nabble.com/DISCUSS-FLIP-49-Unified-Memory-Configuration-for-TaskExecutors-td31436.html

JIRAhttps://jira.apache.org/jira/browse/FLINK-13980

Released:

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

...

  • JVM heap memory
    • Includes Framework Heap Memory, Task Heap Memory, and On-Heap Managed Memory
    • Explicitly set both  -Xmx and -Xms to this value
  • JVM direct memory
    • Includes Task Off-heap Memory , and Shuffle Memory and JVM Overhead
    • Explicitly set -XX:MaxDirectMemorySize to this value
    • For Off-heap Managed Memory, we always allocate memory with Unsafe.allocateMemory(), which will not be limited by this parameter.
  • JVM metaspace
    • Set -XX:MaxMetaspaceSize to configured JVM Metaspace

...

  • We need to update existing and add new integration tests dedicated to validate the new memory configuration behaviors.
  • It is also expected that other regular integration and end-to-end tests should fail if this is broken.

Limitations

  • The proposed design uses Unsafe.allocateMemory() for allocating managed memory, which is no longer supported Java 12. We need to look for alternative solutions in the future.

Follow Ups

  • This FLIP requires very good documentation to help users understand how to properly configure Flink processes and which knobs to turn in which cases.
  • It would be good to expose configured memory pool sizes in the web UI, so that users see immediately what amount of memory TMs assume to use for what purpose.

Rejected Alternatives

Regarding JVM direct memory, we have the following alternative.

...