Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU core use #96

Open
victor987 opened this issue Sep 19, 2019 · 3 comments
Open

CPU core use #96

victor987 opened this issue Sep 19, 2019 · 3 comments

Comments

@victor987
Copy link

victor987 commented Sep 19, 2019

It seems it's not detecting/using the available CPU cores.

Testing on Ubuntu server 19.04 on quadruple AMD Opteron 6282 SE, for a total of 64 cores on the system.
I'm using incompresible random data for this example but the behaviour is the same with real data.

$ sudo apt install bloscpack
$ blpk --version
bloscpack: '0.15.0' python-blosc: '1.7.0' blosc: '1.15.1'
$ dd if=/dev/urandom of=test bs=1M count=10k
$ blpk -v compress test                                                                                              
blpk: using 64 threads
blpk: getting ready for compression
blpk: input file is: 'test'
blpk: output file is: 'test.blp'
blpk: input file size: 10.0G (10737418240B)
blpk: nchunks: 10240
blpk: chunk_size: 1.0M (1048576B)
blpk: last_chunk_size: 1.0M (1048576B)
blpk: output file size: 10.0G (10738524192B)
blpk: compression ratio: 0.999897
blpk: done

Activity during compression shows that 4 cores out of 64 are used:

Screenshot from 2019-09-19 23-47-10

Specifying 64 threads does not change the behaviour:

$ blpk -v -n 64 compress test                                                                                      
blpk: using 64 threads
blpk: getting ready for compression
blpk: input file is: 'test'
blpk: output file is: 'test.blp'
blpk: input file size: 10.0G (10737418240B)
blpk: nchunks: 10240
blpk: chunk_size: 1.0M (1048576B)
blpk: last_chunk_size: 1.0M (1048576B)
blpk: output file size: 10.0G (10738524192B)
blpk: compression ratio: 0.999897
blpk: done

Activity during compression shows that 4 cores out of 64 are used:

Screenshot from 2019-09-19 23-54-14

@esc
Copy link
Member

esc commented Mar 11, 2021

@victor987 thank you for bringing this to our attention. I just looked at this and the problem may very well be worse. Regardless of what I try, I can only get bloscpack to run in single threaded mode. My guess is that this is an issue with the underlying python-blosc but more triage will be needed.

@esc
Copy link
Member

esc commented Mar 11, 2021

My single-threaded observations may be OSX only. I just tried on a Linux server with 8 cores and can use --nthreads w/o issues.

@esc
Copy link
Member

esc commented Mar 11, 2021

Oh, wait it seems like the default number of threads is now 8(?) and I am unable to change that to anything else. Always 8 threads will be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants