-
Notifications
You must be signed in to change notification settings - Fork 95
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
Replace CGO in the critical path #42
Comments
from #80
|
After performing some local tests, it seems that cgo is not the bottleneck of tracee, but the printer. |
What does this mean for this issue? Isn't it still something we should do? |
I still need to find a way to compare a prototype I have with pure go implementation to the current cgo implementation. |
The performance of c to go calls has improved in recent go versions: golang/go#42469 (comment) If there is no strong evidence that this is still an issue for libbpfgo, we may probably close this one for now |
It's also important to note that since we also pass pointers around in our cgo code, that can be much more safely and efficiently done using Cgo Handles as of go 1.17. https://pkg.go.dev/runtime/cgo#Handle |
Hey @yanivagman As i understand, unless we can somehow trigger the perf callback in pure go there is still going to be a massive cpu consumptions as c-to-go is the most expensive directive in cgo |
Hi @guyarb,
A reference implementation is Cilium's ebpf library (that is written in pure go). In your project, how did you find that the performance issues were caused mainly by the cgo perf_buffer_poll call? |
To improve performance, we can bypass libbpf and cgo in the critical path (Libbpf callback)
The text was updated successfully, but these errors were encountered: