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

Speed up addition of fields to forwarded EVE-JSON #83

Merged
merged 3 commits into from
Jun 16, 2021

Conversation

satta
Copy link
Member

@satta satta commented Jun 15, 2021

We found that specifying many fields in the add-fields section of fever.yaml slows down the processing pipeline a lot. This is due to the fact that each addition needs to parse and refresh the JSON string again, since there is no pre-processed state to work from. This is repeated for each field and event to be processed, reducing the throughput from >100K ev/s to ~25K ev/s for four extra fields.

We circumvent this issue by radically simplifying this mechanism: the set of extra fields is preprocessed (i.e. escaped and formatted as key-value pairs) into a top-level JSON snippet which is then simply inserted at the end of the JSON line carried through the Entry. This will not update existing fields, so a user will need to take care not to create duplicate fields, but this approach will greatly increase throughput even with many added fields.

@satta satta force-pushed the addfield-speedup branch from ad5ecac to f7db307 Compare June 15, 2021 15:51
@satta satta requested a review from 0mbi June 15, 2021 15:53
@satta satta added the enhancement New feature or request label Jun 15, 2021
@satta satta merged commit 077bf65 into DCSO:master Jun 16, 2021
@satta satta deleted the addfield-speedup branch June 16, 2021 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants