samskalicky commented on issue #12255: Pretty high cpu load when import mxnet
URL: 
https://github.com/apache/incubator-mxnet/issues/12255#issuecomment-443279316
 
 
   I took the script from above and added another loop to try from 1 to 36 
processes:
   
   ```
   import multiprocessing
   import time
   
   def mxnet_worker():
       #t1 = time.time()
       import mxnet
       #t2 = time.time()
       #elapsed = t2-t1
       #print(times)
   
   times = []
   for i in range(37):
       t1 = time.time()
       read_process = [multiprocessing.Process(target=mxnet_worker) for i in 
range(i)]
       for p in read_process:
           p.daemon = True
           p.start()
   
       for p in read_process:
           p.join()
       t2 = time.time()
       times.append(t2-t1)
   
   for i in times:
       print(i)
   ```
   
   Here are the results:
   
   5.77136611938
   7.65716195107
   13.9892320633
   16.6815569401
   22.9886288643
   27.6006569862
   30.7331540585
   33.8466141224
   34.18151021
   37.1062369347
   43.6272640228
   44.1143600941
   45.8406460285
   46.6692020893
   47.8332960606
   52.4621579647
   56.1070458889
   56.8046569824
   54.1124491692
   65.2930281162
   62.0744900703
   60.4670469761
   69.6229948997
   71.4172370434
   70.9572968483
   74.8509230614
   77.0419559479
   78.2489409447
   80.1934709549
   74.9342000484
   84.4639661312
   83.6565339565
   91.3137798309
   88.20520401
   96.2017951012
   96.4477438927

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to