bss_eval_sources gets slower with more CPUs
See original GitHub issueWhat ?
bss_eval_sources
gets slower as the number of available CPUs grow. We got up to 4x slower computation with 32 cores compared to only one core (thx @sunits).
Expected behaviour
If not speeding up with number of available CPU cores, at least not slowing down.
How to reproduce :
- Create a file
sdr_speed_test.py
containing
import numpy as np
from mir_eval.separation import bss_eval_sources
def time_sdr():
ref = np.random.randn(2, 64000)
est = np.random.randn(2, 64000)
sdrs = bss_eval_sources(ref, est, compute_permutation=True)
- Time the execution with all available cores :
python -m timeit -s "from sdr_speed_test import time_sdr" "time_sdr()"
- Time the execution with a single core:
taskset --cpu-list 0 python -m timeit -s "from sdr_speed_test import time_sdr" "time_sdr()"
The difference is even greater if you have a large number of cores on your machine but I could see the difference on my 8 core laptop. This was replicated on three different machines.
Additional info
Out np.__config__.show()
looks like this :
blas_mkl_info:
NOT AVAILABLE
blis_info:
NOT AVAILABLE
openblas_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/lib']
language = c
define_macros = [('HAVE_CBLAS', None)]
blas_opt_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/lib']
language = c
define_macros = [('HAVE_CBLAS', None)]
lapack_mkl_info:
NOT AVAILABLE
openblas_lapack_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/lib']
language = c
define_macros = [('HAVE_CBLAS', None)]
lapack_opt_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/lib']
language = c
define_macros = [('HAVE_CBLAS', None)]
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:12 (5 by maintainers)
Top Results From Across the Web
VirtualBox VM lags after increasing the numbers of CPUs the ...
When I change the # of processors to 3, it got dramatically laggy. Guest slows with more CPUs. No, you're not doing anything...
Read more >Slower SQL Server performance after allocating more CPU ...
Queries are stepping off CPUs and not getting back on for a long time. ... Adding more RAM can also cause a sudden...
Read more >The Parallelism Blues: when faster code is slower
Your computer has 2 or 4 or even more CPU cores, and if you can use them all then your code will run...
Read more >Python multiprocessing working slower when using more cores
Thing is, im trying to run the same code in a computer with 5 times as many cpu cores (mine has 4, the...
Read more >Why More CPU Cores Often Run no Faster, and Sometimes ...
Get all the tools you need to upgrade the factory HDD of any 2009-2019 iMac to a larger HDD or a modern SSD....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
did you try to disable BLAS for testing?
Thanks for trying. NumPy sends me to OpenBLAS, I’ll close this.