mxnet icon indicating copy to clipboard operation
mxnet copied to clipboard

run two machine with two gpu is slower than one machine with one gpu

Open freepjf opened this issue 10 years ago • 10 comments

I used two machine(every machine has one gpu) to use Alexnet run multile machine.the result saids that it is slower than one machine use one gpu. the net is km. is multi machine is limited by the net?

freepjf avatar Dec 16 '15 01:12 freepjf

could you please give more information? e.g. cpu/gpu info, network bandwidth, batch size you use, dist_sync or dist_async?

mli avatar Dec 16 '15 01:12 mli

gpu k80 only use gpu=0, network bandwidth= 1Gbps, dist_sync; use one machine batch size=256,use two machine batch size=512. train_imagenet Alexnet

freepjf avatar Dec 16 '15 02:12 freepjf

are you train on imagenet? i suggest to change the batch size into 1024

mli avatar Dec 16 '15 03:12 mli

alexnet has a high network bandwidth need. I suggest you try inception-bn again

qiaohaijun avatar Dec 16 '15 05:12 qiaohaijun

@freepjf try incepiton-bn, this model has about 1/10 network bandwidth need of alexnet

qiaohaijun avatar Dec 16 '15 05:12 qiaohaijun

@qiaohaijun there is a trick to reduce 4x network traffic which has been tested on cxxnet before. that is, convert a float into an int8 with randomized rounding.

mli avatar Dec 16 '15 05:12 mli

@mli we use infiniband connect to eash other with two machine(every one with one gpu),set batch size=512 every pc,the speed is only 200 picture/s,but when we use one machine with one gpu ,the speed is 260。what is the problem

freepjf avatar Dec 25 '15 13:12 freepjf

what's the network usage? you can check it by nmon if you are using linux

mli avatar Dec 26 '15 03:12 mli

I test with the alexnet, win7, infiniband local: 195samples/s (1pc with 1gpu) 613(1pc with 4gpu) local_allreduce_cpu: 319samples/s(up on) 1240samples/s(up on) dist_sync 300(2pc with 2gpu) 1200(2pc with 8gpu)

one machine two cpu with 8 gpu on two sides is similar with 4gpu on the same side @mli is it normal?
and I want to know How many cluster systems are supported in theory with mxnet?

freepjf avatar Dec 28 '15 10:12 freepjf

@freepjf
i met the same issue. what's the bandwidth of your IB net? 56G or 100G? Adding more parameter server may help, but i think bandwidth is the main bottleneck here

GoodJoey avatar Mar 06 '18 07:03 GoodJoey