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

Examine performance impact of batch writing #1658

Closed
Zelldon opened this issue Nov 14, 2018 · 2 comments
Closed

Examine performance impact of batch writing #1658

Zelldon opened this issue Nov 14, 2018 · 2 comments
Labels
kind/toil Categorizes an issue or PR as general maintenance, i.e. cleanup, refactoring, etc. scope/broker Marks an issue or PR to appear in the broker section of the changelog

Comments

@Zelldon
Copy link
Member

Zelldon commented Nov 14, 2018

With #1645 we introduced batch writing on each record write, which means events are copied to an internal buffer and on #tryWrite they are written to the dispatcher. On writing single events the performance degrades, because before the change we do not copied the events and write directly to the dispatcher. See as an example the LogStreamWriterImpl.

We should examine if this is on average a real problem.

If so we could fix this with writing to the internal buffer only on second event() call and using the references like in LogStreamWriterImpl for single records.
There parts in the code base where this might not work for example ParallelSplitHandler or JobBatchActivateProcessor, which are writing in a loop records with the same reference. They would overwrite each other.

bors bot added a commit that referenced this issue Nov 14, 2018
1657: Single write api r=Zelldon a=Zelldon

As discussed (@saig0 ) we will go for the always batch approach, even if this has maybe for now a bit of performance impact. Currently this is the simplest, easiest and fastest way to implement.

I create an issue for this #1658 to take a look in the current implementation and maybe improve on this.

closes #1645 


Co-authored-by: Christopher Zell <zelldon91@googlemail.com>
@menski menski added scope/broker Marks an issue or PR to appear in the broker section of the changelog kind/toil Categorizes an issue or PR as general maintenance, i.e. cleanup, refactoring, etc. and removed broker scope/broker Marks an issue or PR to appear in the broker section of the changelog labels Dec 11, 2018
@npepinpe
Copy link
Member

I don't see us going back on this 😅 - do you still want to do this?

@Zelldon
Copy link
Member Author

Zelldon commented May 26, 2020

No

@Zelldon Zelldon closed this as completed May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/toil Categorizes an issue or PR as general maintenance, i.e. cleanup, refactoring, etc. scope/broker Marks an issue or PR to appear in the broker section of the changelog
Projects
None yet
Development

No branches or pull requests

3 participants