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

Recommendations for running hyperscan on multicore setup #407

Open
venkatsvpr opened this issue Jul 5, 2023 · 2 comments
Open

Recommendations for running hyperscan on multicore setup #407

venkatsvpr opened this issue Jul 5, 2023 · 2 comments

Comments

@venkatsvpr
Copy link

venkatsvpr commented Jul 5, 2023

Hello,

This is not directly a issue on the hyperscan package. Posted it here if incase folks have some suggestions.

I'm currently experimenting with using Hyperscan for regex matching in a test service written in Go. To interact with the Hyperscan library, I'm using the flier/gohs package.

So far, I've had a great experience using Hyperscan on a single-core machine. However, when I tried running it on a multi-core machine, I didn't observe any significant performance improvements. You can find more details about this issue in this link: flier/gohs#56.

The tests in the link are benchmark tests written in Go. I do see from the blog that the performance increases linearly with the cores. https://www.intel.com/content/www/us/en/developer/articles/technical/introduction-to-hyperscan.html).

I am unable to understand why the perf doesn't increases linearly. I'm not sure if I'm missing any configuration or if I'm testing it correctly.

Do you have any suggestions?

Thank you!

@variar
Copy link

variar commented Jul 5, 2023

I use hyperscan from c++ application. To utilize several cores I split the input between them, and then merge the results. This way I do see almost linear speedup.

@hongyang7
Copy link
Contributor

@venkatsvpr Hyperscan is a pure single-core matching library, not involving any multi-thread design. The scalability on multi-core generally means when facing multiple inputs and one pattern set, different core is for different scanning thread on different input, but with shared copy of the same bytecode (read-only).

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

3 participants