You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/04/20 21:25:08 UTC
[GitHub] SerailHydra opened a new issue #10631: Better auto-tuning strategy
for multi-machine training performance?
SerailHydra opened a new issue #10631: Better auto-tuning strategy for multi-machine training performance?
URL: https://github.com/apache/incubator-mxnet/issues/10631
## Description
The performance of multi-machine training is greatly affected by this MXNET_CPU_WORKER_NTHREADS variable. It seems that MXNet will auto-tune this variable, and it can lead to very different performances even if the user does not do anything else. Maybe the auto-tuning strategy can be improved so that it won't deliver bad performance just because of something that users have no control of?
Package used (Python/R/Scala/Julia): python
## Environment info (Required)
centos 6.9
cuda 9.0
cudnn 7.0
network card: 100Gb/s infiniband
GPU: Quadro P4000
CPU: 28-core Xeon E5-2860
MXNet commit hash: fb50257aeb3281d7fc90abc38162edbbbe4a5cb2
(Paste the output of `git rev-parse HEAD` here.)
## Minimum reproducible example
example/image-classification
## Steps to reproduce
1, launch the distributed training of ResNet without specifying MXNET_CPU_WORKER_NTHREADS using the following script:
```
export DMLC_INTERFACE="ib1"
python3 ../../tools/launch.py \
-n 2 --launcher ssh -H hosts \
'(export DMLC_INTERFACE="ib1"; python3 train_imagenet.py --data-train /scratch/imagenet1k_no_val_resize240.rec --gpus 0 --batch-size 32 --kv-store dist_device_sync)'
```
The per-machine training throughput is sometimes 4 samples/s, sometimes 62 samples/s.
2, launch the distributed training of ResNet with MXNET_CPU_WORKER_NTHREADS=25 using the following script:
```
export DMLC_INTERFACE="ib1"
MXNET_CPU_WORKER_NTHREADS="25"
export MXNET_CPU_WORKER_NTHREADS
python3 ../../tools/launch.py \
-n 2 --launcher ssh -H hosts \
'(export DMLC_INTERFACE="ib1"; export MXNET_CPU_WORKER_NTHREADS="25"; python3 train_imagenet.py --data-train /scratch/imagenet1k_no_val_resize240.rec --gpus 0 --batch-size 32 --kv-store dist_device_sync)'
```
The per-machine training throughput is sometimes 62 samples/s, sometimes 98 samples/s.
## What have you tried?
1, We found that when per-machine throughput is 4 samples/s, the CPU usage of the worker process (If I remember correctly) is exactly 100%, and one CPU core is fully busy, others are idle. When the throughput is 62, the CPU usage is around 500%.
2, With MXNET_CPU_WORKER_NTHREADS initialized with a large number, we have not observed any case which throughput is 4 again.
3, We couldn't find the reason why the performance is sometimes 98 samples/s. Do you have a clue to this?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services