You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/12/23 02:35:28 UTC
[GitHub] [hudi] haoxie-aws opened a new issue, #7541: [SUPPORT] It's very slow to savepoint a table which has many (75k) partitions
haoxie-aws opened a new issue, #7541:
URL: https://github.com/apache/hudi/issues/7541
**_Tips before filing an issue_**
- Have you gone through our [FAQs](https://hudi.apache.org/learn/faq/)?
- Join the mailing list to engage in conversations and get faster support at dev-subscribe@hudi.apache.org.
- If you have triaged this as a bug, then file an [issue](https://issues.apache.org/jira/projects/HUDI/issues) directly.
**Describe the problem you faced**
I have a table that has 75k partitions, and each partition has only a couple of parquet files. It can take up to 20 minutes to create a savepoint for a recent commit of this table.
This is the scala code I use to create savepoint.
```
val config = HoodieWriteConfig
.newBuilder()
.withPath(basePath)
.withRollbackUsingMarkers(false)
.withCleanConfig(
HoodieCleanConfig
.newBuilder()
.withFailedWritesCleaningPolicy(HoodieFailedWritesCleaningPolicy.EAGER)
.build()
)
.withMetadataConfig(HoodieMetadataConfig.newBuilder().enable(true).build())
.build()
val context = new HoodieSparkEngineContext(new JavaSparkContext(sparkContext))
val hudiClient = new SparkRDDWriteClient(context, config)
hudiClient.savepoint(commitTimestamp, SAVEPOINT_USER, SAVEPOINT_COMMENT)
```
I added S3 metric filters on the table path and its metadata path (`<table_path>/.hoodie/metadata/`), and observed that during savepointing, there were 3 million requests to the metadata path and very few to non-metadata paths. During savepointing, Hudi downloaded 190GB data from metadata path, but the total size of metadata path was 4.3MB and there wasn't any write request to it.
To me it feels like a huge inefficiency. Shall we either create a in-memory cache for metadata, or to remove redundant S3 requests when list files or partitions?
**To Reproduce**
Steps to reproduce the behavior:
1. Create a table with many partitions
2. Create a savepoint for the table
**Expected behavior**
A clear and concise description of what you expected to happen.
**Environment Description**
* Hudi version : 0.12.1
* Spark version : 3.1
* Hive version :N/A
* Hadoop version :2.10.1
* Storage (HDFS/S3/GCS..) :S3
* Running on Docker? (yes/no) :no
**Additional context**
Add any other context about the problem here.
**Stacktrace**
```Add the stacktrace of the error.```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yihua commented on issue #7541: [SUPPORT] It's very slow to savepoint a table which has many (75k) partitions
Posted by "yihua (via GitHub)" <gi...@apache.org>.
yihua commented on issue #7541:
URL: https://github.com/apache/hudi/issues/7541#issuecomment-1403080868
Hi @haoxie-aws the fix to this issue (#7690) is ready to land. I benchmarked the savepoint performance on a Hudi table with 20k partitions on a small EMR cluster and got the following improvement. Now the savepoint action should be fast with metadata table enabled and the performance should not depend on the number of partitions. Could you also test the fix on your end to see how much improvement you get?
| Hudi version | Savepoint time (s) |
| ------------ | ------------ |
| 0.12.1 | 118.6 |
| Latest master | 31.5 |
| This PR | 10.9 |
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yihua closed issue #7541: [SUPPORT] It's very slow to savepoint a table which has many (75k) partitions
Posted by "yihua (via GitHub)" <gi...@apache.org>.
yihua closed issue #7541: [SUPPORT] It's very slow to savepoint a table which has many (75k) partitions
URL: https://github.com/apache/hudi/issues/7541
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yihua commented on issue #7541: [SUPPORT] It's very slow to savepoint a table which has many (75k) partitions
Posted by GitBox <gi...@apache.org>.
yihua commented on issue #7541:
URL: https://github.com/apache/hudi/issues/7541#issuecomment-1370374025
Hi @haoxie-aws Thanks for raising this issue. I confirm that the issue is due to unnecessary scanning of the metadata table when the number of partitions is large. When the metadata table is enabled, due the savepoint operation, for each partition, the metadata table is scanned, which leads to a lot of S3 requests. I'm working on a fix: HUDI-5485.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] haoxie-aws commented on issue #7541: [SUPPORT] It's very slow to savepoint a table which has many (75k) partitions
Posted by GitBox <gi...@apache.org>.
haoxie-aws commented on issue #7541:
URL: https://github.com/apache/hudi/issues/7541#issuecomment-1372831165
Hi @yihua, thanks for your update!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org