Francis Altomare
06/02/2026, 2:43 PMupgradeMode last-state and using the adaptive scheduler we observe:
• Downscale rescales (e.g. parallelism 24 -> 12) take roughly 2 hours from spec change to RUNNING (no events are processed in this time
• Upscale rescales in the same flow are much faster, taking around 12 minutes
The relevant ForSt / checkpointing settings are:
• use-ingest-db-restore-mode: true
• incremental-restore-async-compact-after-rescale: true
• state-recovery.claim-mode: CLAIM
• NATIVE savepoint format, incremental + compressed checkpoints
• pipeline.max-parallelism: 120
• ForSt cache size-based-limit 350GB on a 500Gi gp3 volume per TM.
• I’m running one slot per TM and have tried parallelisms between 12 and 24
My questions are:
• Is ~2h for a downscale at this state size in line with what others see, or does it suggest a misconfiguration? Most of the time appears to be in restore.
• Is the asymmetry where upscales are much faster also expected?
• Given the asymmetry, are there settings or patterns that make autoscaling viable at ~1TB state beyond adjusting job.autoscaler.scale-down.max-factor and scale-down.interval? Or is the practical recommendation at this scale to keep parallelism static and rescale manually during low-traffic windows?
Thank you!Or Keren
06/03/2026, 6:06 AMFrancis Altomare
06/03/2026, 7:08 AMopenDB() method.
I’ve verified this though the following log lines:
Starting opening base ForSt instance
Finished opening base ForSt instanceOr Keren
06/03/2026, 7:09 AMFrancis Altomare
06/03/2026, 7:15 AMOr Keren
06/03/2026, 7:16 AMOr Keren
06/03/2026, 7:16 AMFrancis Altomare
06/03/2026, 7:17 AMOr Keren
06/03/2026, 7:17 AMFrancis Altomare
06/03/2026, 7:18 AMFrancis Altomare
06/03/2026, 7:18 AMOr Keren
06/03/2026, 7:19 AMFrancis Altomare
06/03/2026, 7:21 AMFrancis Altomare
06/03/2026, 7:22 AMFrancis Altomare
06/03/2026, 7:23 AMOr Keren
06/03/2026, 7:24 AMFrancis Altomare
06/03/2026, 7:24 AMFrancis Altomare
06/03/2026, 7:25 AMOr Keren
06/03/2026, 7:26 AMfsType=ext4,iops=8000,throughput=600,type=gp3Francis Altomare
06/03/2026, 7:26 AMFrancis Altomare
06/03/2026, 7:28 AMOr Keren
06/03/2026, 7:28 AMOr Keren
06/03/2026, 7:29 AMFrancis Altomare
06/03/2026, 7:29 AMOr Keren
06/03/2026, 7:30 AMCaused by: java.io.InterruptedIOException: getFileStatus on <some s3 path>: com.amazonaws.SdkClientException: Unable to execute HTTP request: Timeout waiting for connection from poolFrancis Altomare
06/03/2026, 7:31 AMOr Keren
06/03/2026, 7:31 AMOr Keren
06/03/2026, 7:31 AMat org.apache.flink.fs.s3hadoop.common.HadoopFileSystem.getFileStatus(HadoopFileSystem.java:88)Francis Altomare
06/03/2026, 7:32 AMOr Keren
06/03/2026, 7:32 AMOr Keren
06/03/2026, 7:33 AMFrancis Altomare
06/03/2026, 7:33 AMFrancis Altomare
06/03/2026, 7:35 AMOr Keren
06/03/2026, 7:35 AMFrancis Altomare
06/03/2026, 9:01 AMtarget-file-size-base , max-size-level-base and enabled use-dynamic-size. This is decreasing the amount of SST files while increasing the size. So far it’s gotten initialization time down from around 20 minutes at the default settings to the 12 or so we are seeing now. It’s a lazy process since it only processes changed data during compaction.Michael Goodnow
06/04/2026, 6:12 PM/tmp directory configuration setting. For us, the failed checkpoints was simply running out of /tmp disk space. You must specify the attached storage for all flink tmp stuffies.
-Djava.io.tmpdir=/mnt/ephemeral/flink/tmp
# Also set (for other stuff)
io.tmp=/mnt/ephemeral/flink/tmp
Hopefully that problem your facing is as simple as that!?Michael Goodnow
06/04/2026, 6:31 PMMichael Goodnow
06/04/2026, 6:32 PMMichael Goodnow
06/04/2026, 7:04 PMRocksDB
DirectByteBuffers
Network buffers
Flink internal threading
• glibc was creating multiple malloc arenas (default behavior in multithreaded programs)
• Each arena reserved substantial memory, leading to allocator fragmentation and retained memory
• Native memory was not being returned to the OS despite GC and heap stability
Root Cause
• The issue was glibc malloc arena fragmentation, not a Java heap leak, RocksDB leak, or Flink state leak.
• glibc by default creates multiple malloc arenas in multithreaded applications (often 8 × CPU cores)
• In a highly concurrent native allocation workload (Flink + RocksDB + DirectByteBuffer), this caused:
◦ Significant virtual memory expansion
◦ High RSS retention
◦ Memory fragmentation
◦ Progressive EC2 memory exhaustion
• Troubleshooting references
https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/memory/mem_trouble/
Resolution
[Service]
Environment="MALLOC_ARENA_MAX=1"