Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xgboost, max number of cores

Tags:

r

xgboost

I am running XGboost in R on Windows Server 2008 R2.

I have 4 Xeon E7 with 10 cores each. (80 threads total)

I run Xgboost with nthread = 80 but R uses only 40. Does xgboost somehow reduces the number of threads, depending on the Input Data?

Does anyone had similar problems?

like image 443
user2963882 Avatar asked Sep 03 '25 01:09

user2963882


1 Answers

i think it doesn't work with the hyperthreading x2 thread

from xgboost site https://github.com/dmlc/xgboost/blob/cb4de521c13f3d2269c20252a393cfd33f4a1ae3/doc/tutorials/external_memory.rst

Performance Note

the parameter nthread should be set to number of real cores Most modern CPU offer hyperthreading, which means you can have a 4 core cpu with 8 threads Set nthread to be 4 for maximum performance in such case

like image 70
s.brunel Avatar answered Sep 07 '25 18:09

s.brunel