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

Trigger cluster replication immediately after flush to speed up writes. #848

Merged
merged 1 commit into from Mar 11, 2016

Conversation

lscpike
Copy link
Contributor

@lscpike lscpike commented Mar 11, 2016

I think this may only be an issue on Windows. I don't have a Linux box available to test on. The Thread.Sleep(1) causes an average delay of (1/64)/2 seconds delay (8ms) in replication of a cluster. This results in irregular commits to a cluster to take in the region of 10 ms each.

I've removed the sleep and triggered replication from the checkpoint flush event. This reduces writes much closer to the raw flush costs at ~3ms.

I've replaced the existing WaitForFlush with an event as the Monitor.Pulse method has a race between the check for more data and the call to Wait.

I also added a fake type so the queue monitoring on the dashboard shows the replication activity.

gregoryyoung added a commit that referenced this pull request Mar 11, 2016
Trigger cluster replication immediately after flush to speed up writes.
@gregoryyoung gregoryyoung merged commit 0ab5668 into EventStore:release-v3.6.0 Mar 11, 2016
@gregoryyoung
Copy link
Contributor

I was just looking through chaser for related reasons today

@lscpike
Copy link
Contributor Author

lscpike commented Mar 11, 2016

Bit trigger happy there GFY! Second PR to fix the build.

@gregoryyoung
Copy link
Contributor

Has already done locally :)

On Fri, Mar 11, 2016 at 2:18 PM, lscpike notifications@github.com wrote:

Bit trigger happy there GFY! Second PR to fix the build.


Reply to this email directly or view it on GitHub
#848 (comment)
.

Studying for the Turing test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants