Killed because of exceeding allocated physical memory with lots of memory available
I setup Hadoop YARN on AWS EC2 by following the steps in official tutorial and the example was running nicely. Then I tried to apply it on my own dataset, first I tried with a small set (200MB training, 100 MB testing) and it works. The problem shows up when I apply it to the whole set(27G training, 1G testing, all stored in S3).
Here is the script I used for training:
export BUCKET=ppdd-xgboost
../xgboost/dmlc-core/tracker/dmlc-submit --cluster=yarn --num-workers=5 --worker-cores=4 --worker-memory='13g'\
../xgboost/xgboost aws.conf nthread=4\
data=s3://ppdd-xgboost/xgb/train/train.txt\
eval[test]=s3://ppdd-xgboost/xgb/test/test.txt\
model_dir=s3://ppdd-xgboost/xgb/model\
I have 5 m3.xlarge instances as slave node and the combine available memory size is 52G so I think it should be suffice to fit in my data. (P.S: the master node is c3.2xlarge as default) And I got the following lines after I run the script
2017-03-13 21:40:31,105 INFO start listen on 172.31.23.157:9091 17/03/13 21:40:32 INFO client.RMProxy: Connecting to ResourceManager at ip-172-31-23-157.us-west-2.compute.internal/172.31.23.157:8032 17/03/13 21:40:33 INFO dmlc.Client: jobname=DMLC[nworker=5]:xgboost,username=ubuntu 17/03/13 21:40:33 INFO dmlc.Client: Submitting application application_1489424185834_0033 17/03/13 21:40:33 INFO impl.YarnClientImpl: Submitted application application_1489424185834_0033 2017-03-13 21:40:39,995 INFO @tracker All of 5 nodes getting started Application application_1489424185834_0033 finished with state FINISHED at 1489441385921
Available queues: default 17/03/13 21:43:05 INFO impl.YarnClientImpl: Killed application application_1489424185834_0033
Then I check the log, in one line it says:
17/03/13 21:43:05 INFO dmlc.ApplicationMaster: [DMLC] Task 4 killed because of exceeding allocated physical memory
and not surprisingly the log ends when it tried to load part 4 of the data:
Container: container_1489424185834_0033_01_000007 on ip-172-31-28-130.us-west-2.compute.internal_49870 ======================================================================= LogType:stderr Log Upload Time:13-Mar-2017 21:43:08 LogLength:120 Log Contents: [21:40:39] start ip-172-31-28-130:4 [21:40:39] Load part of data 4 of 5 parts [21:42:12] Load part of data 4 of 5 parts
I'm new to Hadoop and don't know why this would happen, since I feel I certainly have more than enough physical memory allocated (almost twice). Can anyone help me on this please? Thanks in advance!
Plus, I also found the error message here is quiet ambiguous. It could be interpreted as either "allocated too much memory" or "exceed the memory allocated", and in my situation both two cases are possible. Personally I'm not a native English speaker, but after I consulted with my colleagues they also think it could be expressed more clear. Could you help me take a look and see which meaning you refer to? Thanks @CodingCat @tqchen
? It is YARN based XGBoost? not Spark one?
@CodingCat Yes, I just followed this tutorial
Why is this issue closed? @yichenpan Could you please share how you solved the problem in the end?
@marchss This issue is still open, but the duplicate issue was closed. Since no one replied to my question, I ended up switch to a different library and trained my data locally. However, if you still want to deploy xgboost on distributed system, say, AWS for example, I suggest you should go with the xgboost Spark.