public static long allocateMemoryCostForFileInfoCache(long compactionMemorySize) {
    long fixedMemoryCost =
        globalCompactionFileInfoCacheSize * FileInfo.MEMORY_COST_OF_FILE_INFO_ENTRY_IN_CACHE
            + globalCompactionRoughFileInfoCacheSize
                * FileInfo.MEMORY_COST_OF_ROUGH_FILE_INFO_ENTRY_IN_CACHE;
    globalFileInfoCacheEnabled =
        compactionMemorySize * maxRatioToAllocateFileInfoCache > fixedMemoryCost;
    if (globalFileInfoCacheEnabled) {
      globalRoughInfoCacheForCompaction =
          Collections.synchronizedMap(new LRUMap<>(globalCompactionFileInfoCacheSize));
      globalFileInfoCacheForFailedCompaction =
          Collections.synchronizedMap(new LRUMap<>(globalCompactionRoughFileInfoCacheSize));
    } else {
      globalRoughInfoCacheForCompaction = Collections.emptyMap();
      globalFileInfoCacheForFailedCompaction = Collections.emptyMap();
    }
    return globalFileInfoCacheEnabled ? fixedMemoryCost : 0;
  }
The size of global compaction estimation rough file info cahce.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/estimator/AbstractCompactionEstimator.java