Skip to content

Comments

[CELEBORN-2262] Prepare S3 directory only once and cache s3 client for MultiPartUploader#3604

Open
eolivelli wants to merge 4 commits intoapache:mainfrom
eolivelli:improve-s3-apache
Open

[CELEBORN-2262] Prepare S3 directory only once and cache s3 client for MultiPartUploader#3604
eolivelli wants to merge 4 commits intoapache:mainfrom
eolivelli:improve-s3-apache

Conversation

@eolivelli
Copy link
Contributor

@eolivelli eolivelli commented Feb 18, 2026

What changes were proposed in this pull request?

  • Create only one S3 client for all MultiPartUploaders
  • Create S3 worker directory only once and not for every slot

Why are the changes needed?

  • Because on S3 AWS creating connections is slow (due to credentials handshaking and TLS handshaking)
  • Because "mkdirs" in S3 AWS is very slow (and it needs several S3 calls)

Sample CPU flamegraph about the need of Connection pooling:
image

Sample CPU flamegraph about the need of pooling the client due to AssumeRoleWithWebIdentity
image

Does this PR resolve a correctness bug?

No

Does this PR introduce any user-facing change?

No

How was this patch tested?

Manual testing.

There is one end-to-end integration test with S3 that exercise this code

… MultiPartUploader (apache#4)

- Create only one S3 client for all MultiPartUploaders
- Create S3 worker directory only once and not for every slot

- Because on S3 AWS creating connections is slow (due to credentials handshaking and TLS handshaking)
- Because "mkdirs" in S3 AWS is very slow (and it needs several S3 calls)

No

No

Manual testing on real S3 AWS
@afterincomparableyum
Copy link

Thanks for your contribution @eolivelli, I will take a look at this PR before tomorrow and add comments if needed.

@SteNicholas SteNicholas changed the title [CELEBORN-2262] prepare S3 directory only once and cache s3 client for MultiPartUploader [CELEBORN-2262] Prepare S3 directory only once and cache s3 client for MultiPartUploader Feb 19, 2026
Copy link
Member

@SteNicholas SteNicholas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eolivelli, thanks for improvement of S3MultipartUploadHandler. The changes generally look good. Could you provide the testing report of the performance with this improvement?

@eolivelli
Copy link
Contributor Author

@eolivelli, thanks for improvement of S3MultipartUploadHandler. The changes generally look good. Could you provide the testing report of the performance with this improvement?

I added some flamegraphs in the PR description.
I don't have numbers at hand, but we are talking about reducing the time from minutes to seconds, and in particular we reduce the number of calls to S3: AssumeRole and ListObject. In AWS S3 you pay for those calls, and Celeborn usually creates lots of slots for each job (default number of shuffle partitions is 200 in Spark)

Copy link

@afterincomparableyum afterincomparableyum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants