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

Support for multiple CPU cores (multiprocessing) #75

Open
mdavids opened this issue Oct 8, 2021 · 3 comments
Open

Support for multiple CPU cores (multiprocessing) #75

mdavids opened this issue Oct 8, 2021 · 3 comments

Comments

@mdavids
Copy link

mdavids commented Oct 8, 2021

It would be great if valiDNS would be able to take advantage of all available CPU power to speed things up.

@tobez
Copy link
Owner

tobez commented Oct 8, 2021

You mean like this?

-n N
Use N worker threads for parallelizable operations.
The default is 0, meaning no parallelization.
Currently only signature verification is parallelizable.

\Anton.

@mdavids
Copy link
Author

mdavids commented Oct 11, 2021

Interesting! We weren't aware that this feature existed. It seems to improve the process at least a bit:

Without -n

real    2m33.859s
user    2m28.928s
sys     0m4.567s

With -n 10

real    1m32.836s
user    2m51.505s
sys     0m9.351s

Would further optimizations be possible?

@tobez
Copy link
Owner

tobez commented Oct 11, 2021

Maybe. One way would be to offload crypto to the GPU, using something like http://shader.kaist.edu/sslshader/sslshader.pdf
This will require some experimentation, and it might not be worth it in the end.

It's also possible to parallelize non-crypto operations, but again, I am not entirely sure whether the gain will be worthwhile.

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