public long getTotalTimeIndexMemCost() {
    return memoryBlock.getUsedMemoryInBytes();
  }
choose the top TsFileResource in priorityQueue to degrade until the memory is smaller than
threshold.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/memory/TsFileResourceManager.java