-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
aws: fork mbedtls 2.25.0 base64 utility to avoid 2.26.0+ performance hit #4422
Conversation
2b7baf3
to
0434352
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@edsiper I'd like your review/approval on this as well.
@PettitWesley base64 unit test is failing https://github.com/fluent/fluent-bit/runs/4478384757?check_suite_focus=true#step:5:1810 |
Why not to make it generic use instead of just aws scoped? I think it could be useful as flb_base64.c alone |
Strange how it passes on some operating systems. Grateful for the crossplatform unit test runner. I'll take a look. I can refactor this to flb_base64 Since I did some refactoring to the aws unit test structure for the base64 test, I might switch to an aws placeholder test that noops, so future tests to aws can be added easily if that is alright. |
4adf509
to
3c08a68
Compare
@PettitWesley Could you take a look at the changes? 3c08a68 I think I resolved the problem with the testcase, it may have just been a lack of a null character when calling strlen. I initialize the array to 0 now in the decode test case. |
@matthewfala CI says the tests are still failing? I am good to approve/merge once everything passes. |
3c08a68
to
43c1a59
Compare
Need to refactor the commit messages, then this should be done |
43c1a59
to
c06daed
Compare
@edsiper Could you please take a look at this when you get the chance? |
@matthewfala @PettitWesley @krispraws
|
thanks @nokute78 for the hints about mbedtls, I will make sure to upgrade in the 1.8 branch |
Hi @nokute78, According to Ramya's testing as described in the following issue: It appears the newest base64 implementation is still slower than the older implementation as described by the changelog message in
Would forking be considered above just upgrading mbedtls? |
@matthewfala In my opinion, forking can be a risk and take a porting cost. e.g. Watching upstream and merging patches. How much slower is it using mbedtls v2.28 ? |
Thank you @nokute78. I like the interim patch idea. I'll fix the merge conflicts. We can assess the speed difference after, though I am not familiar with profiling, so I'll either learn or ask someone else on the team do help. |
c06daed
to
aae6d5c
Compare
c06daed
to
49c3d50
Compare
@nokute78 Could you take a look? Resolved merge conflicts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add test case to compare performance between flb_base64_*
and mbedtls_base64_*
?
The test fails when mbedtls_base64_*
are faster than flb_base64_*
or the performance of mbedtls_base64_*
becomes acceptable.
We can detect it is the time to drop the interim patch and back to mbedtls.
…ce hit Signed-off-by: Matthew Fala <[email protected]>
Signed-off-by: Matthew Fala <[email protected]>
Signed-off-by: Matthew Fala <[email protected]>
Signed-off-by: Matthew Fala <[email protected]>
49c3d50
to
6775238
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthewfala Thank you for updating.
LGTM.
@nokute78 YW. Could you give me an eta on when this will be merged? |
@matthewfala I can't merge since "Merging can be performed automatically with 1 approving review." . |
@matthewfala would you please submit a PR for 1.8 branch ? |
Definitely! Will publish a pr to 1.8 today. |
Here is the backport PR!: #4801 |
Migrate to performant 2.25.0-mbedtls base64 implementation.
Tested via unit tests + 1 end to end test
Sent logs to firehose via the out_kinesis_firehose plugin which utilizes the implementation.
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
Documentation
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.