Skip to content

[jvm-packages] ExtenralMemory: Overlap the caching time #11474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

wbo4958
Copy link
Contributor

@wbo4958 wbo4958 commented May 21, 2025

This PR tries to overlap the caching time (caching cudf table to the disk when enabling external memory).

The previous design is

  1. cache the cudf table to the disk
  2. delivery the cudf table to the xgboost to build QuantileDMatrix incrementally

So, they are running in sequence which is time-consuming.

This PR moves the caching process to run in a separate thread, which can be overlapped when building QuantileDMatrix.

I did some test locally with total 13.1G dataset,

With this PR, it's going to eliminate the 90%+ caching time.

count += 1
Thread.sleep(50)
// If timeout, it's going to throw exception
val success = Await.result(futureOpt.get, 6.seconds)
Copy link
Member

Choose a reason for hiding this comment

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

6 seconds is not a lot when data is large and system is busy, why do we need timeout here? Can writing to disk hang?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants