-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
[jvm-packages] XGBoost Spark training quite slow - Good practices #4774
Comments
@kumarprabhu1988 please try 0.9, there was a critical bug in .82 |
it's not relevant, the bug I told you is only involved in a prediction process with a upstream shuffle @kumarprabhu1988 number of features in your data? |
try to remove
for now, a fix is coming soon |
Thank you for your response @chenqin and @CodingCat. I have ~1300 features in the data. I've tried without checkpoints, it's not much faster. Here's how long each step takes.
|
@kumarprabhu1988 will you be able to share sample/fake dataset that can simulate what you observed. It can help us drive investigation forward more effectively. |
line 420 and 199 happen for only once line 397 involved reading the shuffle data from 420 and establish xgb cluster as well so it is not only training...you can try to run more iterations and calculate the average cost for each iteration 1300 features is not a trivial workload for a tree model |
@chenqin Unfortunately I cannot share the original dataset. I can remove anonymize the data and remove column names and share. What's the best way to share? @CodingCat I ran 10 iterations and it seems the time taken for each iteration after the first is almost the same. Here is a screenshot for each stage from the spark application page: This is how a single stage looks: It is possible that some of the data does not fit in memory and is loaded from the disk. However, any increase in |
will you be able to share file link to cloud drive e.g dropbox, google drive etc to qinnchen@gmail.com |
@chenqin I'm generating randomized data and will upload it in a couple of hours. Meanwhile I had another question - how do you know the progress of training if you don't use checkpoints? |
@kumarprabhu1988 again, remove checkpoint or set it to a large value for now, you can save ~50% of time for each checkpoint interval with 1300 features, 12 mins for each iteration is not a surprise to me, otherwise you can do col_sampling (check https://xgboost.readthedocs.io/en/latest/parameter.html) |
I think you might be able to track executor log or driver log and see how many iterations has been done (a.k.a 🌲 ) |
@CodingCat Will do, thank you. I'll set it to 200 so that I can track progress. Will also explore col_sampling. |
@chenqin Sorry for the delay, just sent you the email with some sample data. @CodingCat I set it to 200 and ran 10 rounds. The average time reduced to 3.5 min now. Guess it'll reduce further if I run it for longer than that. Also can I further improve training time by just increasing number of nodes in the cluster? Additionally noticed something else now. The same configuration I used fails with OOM errors if I use You asked for executor logs on that issue. Here they are. |
@CodingCat I set it to 200 and ran 400 rounds. The first 200 rounds took 7.1 hours which means the average is ~2.1 min. However, the second 200 rounds has been running for 11.2 hours. I looked at the CPU utilization in the instances and it is 5-10% which is half of the 10-20% it used in the first 200 rounds. Previously each time it took the same amount of time for each checkpoint. Any ideas why this might happen? |
@CodingCat @chenqin Any ideas guys? |
Thank you @chenqin. This issue looks the same as mine. What about the OOM issue when using AUC? |
what does the iteration mean here? |
@billbargens |
@CodingCat @chenqin FYI, it was a matter of finding the right |
how do you set the config? can you give me some suggestion? i have same issue. |
Hello!
I posted a question about some OOM errors I was facing with training here: https://discuss.xgboost.ai/t/xgboost4j-spark-fails-with-oom-errors/1054. Thankfully, I was able to resolve these issues and found a configuration that works. However, it takes ~8 min for 1 round. I'm looking for tips to speed this up.
My data is ~120GB before transforming into a vector. I'm using
spark 2.3.2
andxgboost 0.82
. My configuration ensures most of the training and validation data are present in memory. I'm usingspark.memory.storageFraction = 0.16
which is quite low. Execution apparently requires lot of memory. I get OOM errors if I increase this value. I've tried increasingspark.memory.fraction
as well and I get OOM errors if I increase it to 0.7.Here's my full spark configuration:
For xgboost, I use this configuration:
FYI, I can train this data on a single super large machine and it takes ~1 min per iteration (though the first iteration takes more than 1 hour in addition to 0.5 hours for loading data) on this machine. The goal is to move this whole training process to
xgboost-spark
so it can scale with the data and we don't have to get larger machines.Posting here because I didn't get any responses on the discussion forum.
@CodingCat
@trivialfis
Any help will be appreciated.
Thank you!
The text was updated successfully, but these errors were encountered: