eventstore icon indicating copy to clipboard operation
eventstore copied to clipboard

Make global `$all` stream building a separate task

Open slashdotdash opened this issue 7 years ago • 1 comments

All events appended to a stream are linked to the globally ordered all events stream (named $all). Because the events must be assigned a unique, monotonically incrementing, and gapless event number the linking is blocking, resulting in single writer performance.

To improve append event performance the all stream building could be moved to a separate async process which won't block event inserts into a stream. It should also be possible to disable all stream building via a config option.

Running the existing append events benchmark with/without all stream building resulted in a significant speed up.

AppendEventsBench

  • append events, 10 concurrent writers -79.53%
  • append events, 50 concurrent writers -71.69%
  • append events, 20 concurrent writers -59.88%
  • append events, single writer -38.53%

Above comparison shows the difference in time between all stream building enabled and disabled (commented out).

slashdotdash avatar Oct 31 '18 10:10 slashdotdash

This feature could be combined with the changes needed for #169.

slashdotdash avatar Jun 28 '19 11:06 slashdotdash