-
Notifications
You must be signed in to change notification settings - Fork 227
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
Use sonic instead of standard json library #7352
base: master
Are you sure you want to change the base?
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adriengentil The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test ? |
@adriengentil: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/test edge-subsystem-kubeapi-aws edge-subsystem-aws edge-unit-test edge-e2e-metal-assisted-4-18 |
/cc @rccrdpccl |
/test edge-subsystem-kubeapi-aws edge-subsystem-aws |
@adriengentil: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Last investigations have shown that assisted spend a lot of time de-serializing json, and it can struggle at processing large inventories.
sonic is a performant json library that can help the assisted at coping with these scalability issues. The advantage of this library is that is it an almost drop-in library for the standard json library: to keep the maximum compatibility, I ensured that we used
ConfigStd
on marshaling operations because it makes the json strings comparable (keys will be sorted).I did not update the
pkg/
folder to avoid public users of our library to be forced to use this library.Memory is slightly higher:

CPU usage is divided by 2:

p90 time to monitor a host is divided by 5:

average time to monitor a host is divided by 3.5:
