Blame thirdparty/openblas/xianyi-OpenBLAS-e6e87a2/GotoBLAS_06WeirdPerformance.txt

kusano 2b45e8
        Weird Performance
kusano 2b45e8
kusano 2b45e8
1. If you see serious performance loss (extremely low performance),
kusano 2b45e8
   probably you created too many threads or process. Basically GotoBLAS
kusano 2b45e8
   assumes that available cores that you specify are exclusively for
kusano 2b45e8
   BLAS computation. Even one small thread/process conflicts with BLAS
kusano 2b45e8
   threads, performance will become worse. 
kusano 2b45e8
kusano 2b45e8
   The best solution is to reduce your number of threads or insert
kusano 2b45e8
   some synchronization mechanism and suspend your threads until BLAS
kusano 2b45e8
   operation is finished.
kusano 2b45e8
kusano 2b45e8
kusano 2b45e8
2. Simlar problem may happen under virtual machine. If supervisor
kusano 2b45e8
   allocates different cores for each scheduling, BLAS performnace
kusano 2b45e8
   will be bad. This is because BLAS also utilizes all cache,
kusano 2b45e8
   unexpected re-schedule for different core may result of heavy
kusano 2b45e8
   performance loss.
kusano 2b45e8
kusano 2b45e8
kusano 2b45e8
Anyway, if you see any weird performance loss, it means your code or
kusano 2b45e8
algorithm is not optimal.