Open ucasfl opened 3 months ago
I found same situations in this days...
To manage so much metadata information, the only option is to continue increasing the FE JVM heap memory.
this is an interesting quesion. i think this problem will occur whenever iceberg is queried through starrocks, until starrocks iteself does not have enough memory
Enhancement
In our situation, there are iceberg database with more than 2w tables under it. Data write into the iceberg table streamingly, and we have a lot of query on these tables.
We meet a FE OOM problem. The memory usage of FE is increse rapidly(JVM old) and lead to OOM, then need to restart.
After analyze, we found the memory is occupied by the metadata(snapshots) of Iceberg table:
2734 Iceberg tables have more than 170 millions snapshots, 6000+ snapshots for each table average. (We keep snapshots of last 48 hours for each Iceberg table)
https://github.com/StarRocks/starrocks/blob/b672de4b07d239e70b57854cb4ea499ad1655668/fe/fe-core/src/main/java/com/starrocks/connector/iceberg/IcebergMetadata.java#L164
There is no limit on size of tables or memory usage.
We try to remove the metadata cache, the memory usage become normal:
Possible solution
There are should be have limit on the memory usage.