-
-
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
MultiThreading not working properly with version 0.71.2 #3543
Comments
Yes, I am having the same problem too! Building models now takes almost twice as long as with earlier versions of xgboost. Could one of the authors please look into this for a fix in version 0.71.2? Thanks much! |
Do you have the same problem with version 0.80? |
Also, do you experience the same problem with Python package? |
hcho3, I haven't try yet either of those, for now i've decided to stay with 0.71.1, I will try 0.80 when I can. |
Hi hcho3, the following site: https://cran.r-project.org/web/packages/xgboost/index.html shows version 0.71.2 as the latest available for Windows. Where can I get 0.80 from? I would like to test it when the Windows binaries is available for 0.80. Thanks much. |
I also noticed the slowdown from CRAN (0.71.2), but installing from current master (0.81.0.1 - compiled with VS) has similar performance to Python (0.80.0).
|
@sjain777 0.80 is not yet available at CRAN, since some unit tests are failing spuriously for 32-bit Windows. We'll working on it, but for now you'll have to compile from the source. @xavierburtschell Did you get around trying latest versions? |
@hcho3 still haven't tried, i'm sticking with 0.71.1 for now. I'm putting a model in production using it, now is not the right time to try a new version. I'll try within the next few months I think |
Will investigate if this is due to the choice of compiler (MinGW vs Visual Studio). It is reported that some OpenMP loops may face worse performance when compiled with MinGW. See #2243 and https://medium.com/data-design/lightgbm-on-windows-visual-studio-vs-mingw-gcc-r-with-visual-studio-417fc14eca2c. |
Actually, it appears that the problem isn't restricted to Windows. Will investigate. |
I ran a small test script on EC2 and so far I'm not seeing performance degradation between versions. Test script library(xgboost)
library(microbenchmark)
set.seed(222)
N <- 2*10^5
p <- 350
x <- matrix(rnorm(N * p), ncol = p)
y <- rnorm(N )
microbenchmark(
mymodel <- xgboost(data = x, label = y, nrounds = 5,
objective = "reg:linear", "tree_method" = "exact",
max_depth = 10, min_child_weight = 1, eta = 1,
subsample = 0.66, colsample_bytree = 0.33),
times = 6)
microbenchmark(
mymodel <- xgboost(data = x, label = y, nrounds = 5,
objective = "reg:linear", "tree_method" = "approx",
max_depth = 10, min_child_weight = 1, eta = 1,
subsample = 0.66, colsample_bytree = 0.33),
times = 6)
|
If anyone has a detailed instructions to re-produce the bug, feel free to post it here. I will look at other bugs in the meantime. |
i get same problem in v0.81, most of time the cpu useage stay at 99%~100%(1 cpu core), occasionally it can reach 400% or more ( i set 35 threads) but can not be maintained for long time xgboost install cmd: conda install -c conda-forge xgboost |
@hcho3 I just tried xgboost version 0.82.1, problem solved! all Cores/threads used at 100%, no noticeable difference in computation time between version 0.71.1 and 0.82.1. |
@xavierburtschell We have an on-going effort to let XGBoost utilize multi-core CPUs better. See #3957, #4310, #4529. |
Hello,
I'm using xgboost in R/Rstudio desktop (latest versions for both as of 1st august 2018) on a dell laptop, windows 10, 4 cores 8 logical processor, 16 Go Ram. Since I updated xgboost to 0.71.2, it suddenly became very slow. After investigation, it appears it wasn't using multithreading/CPU properly: all cores were used, but it wouldn't go beyond 50-60% CPU usage, and the nthread input in params for xgb.train (for example) had close to no impact on the performance. I rolled back to 0.71.1, it's working fine again (for nthread=8, all cores being used, 100% CPU usage.
Did anybody noticed this issue as well? Any solution/fix for latest version of xgboost?
Many thanks,
Xavier
The text was updated successfully, but these errors were encountered: