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

POC: allow to buffer messages in save #597

Draft
wants to merge 1 commit into
base: 3.0.x
Choose a base branch
from
Draft

Conversation

DavidBadura
Copy link
Member

@DavidBadura DavidBadura commented Apr 26, 2024

Storing 10k aggregates takes 8 seconds, which is very long.
As a proof of concept, I added a flag, which buffers messages and may solve the problem if you use transactions.

@DavidBadura DavidBadura added the enhancement New feature or request label Apr 26, 2024
Copy link

github-actions bot commented Apr 26, 2024

Hello 👋

here is the most recent benchmark result:

SplitStreamBench
================

+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                         | time (kde mode)                                     | memory                                     |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                 | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad10000Events () | 4.800ms (±0.00%)   | 4.930ms (±0.00%)   | -2.64%    | 38.098mb        | 37.578mb   | +1.39%      |
| benchSave10000Events () | 342.322ms (±0.00%) | 357.293ms (±0.00%) | -4.19%    | 37.599mb        | 37.070mb   | +1.43%      |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

SimpleSetupBench
================

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad1Event ()                     | 23.014ms (±0.00%)  | 979.400μs (±0.00%) | +2249.77% | 33.498mb        | 33.761mb   | -0.78%      |
| benchLoad10000Events ()                | 71.192ms (±0.00%)  | 50.238ms (±0.00%)  | +41.71%   | 33.498mb        | 33.761mb   | -0.78%      |
| benchSave1Event ()                     | 86.500μs (±0.00%)  | 842.700μs (±0.00%) | -89.74%   | 14.295mb        | 33.761mb   | -57.66%     |
| benchSave10000Events ()                | 11.804ms (±0.00%)  | 218.787ms (±0.00%) | -94.60%   | 115.504mb       | 33.761mb   | +242.12%    |
| benchSave10000Aggregates ()            | 838.573ms (±0.00%) | 6.508s (±0.00%)    | -87.12%   | 26.731mb        | 33.761mb   | -20.82%     |
| benchSave10000AggregatesTransaction () | 605.562ms (±0.00%) | 4.713s (±0.00%)    | -87.15%   | 47.136mb        | 33.762mb   | +39.62%     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

SnapshotsBench
==============

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad10000EventsMissingSnapshot () | 50.199ms (±0.00%)  | 50.379ms (±0.00%)  | -0.36%    | 34.291mb        | 33.762mb   | +1.57%      |
| benchLoad10000Events ()                | 847.100μs (±0.00%) | 874.200μs (±0.00%) | -3.10%    | 34.291mb        | 33.762mb   | +1.57%      |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

PersonalDataBench
=================

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad1Event ()                     | 886.800μs (±0.00%) | 934.300μs (±0.00%) | -5.08%    | 35.420mb        | 34.891mb   | +1.51%      |
| benchLoad10000Events ()                | 82.746ms (±0.00%)  | 84.504ms (±0.00%)  | -2.08%    | 35.420mb        | 34.891mb   | +1.51%      |
| benchSave1Event ()                     | 1.345ms (±0.00%)   | 1.389ms (±0.00%)   | -3.20%    | 35.420mb        | 34.891mb   | +1.51%      |
| benchSave10000Events ()                | 247.125ms (±0.00%) | 246.192ms (±0.00%) | +0.38%    | 35.422mb        | 34.893mb   | +1.51%      |
| benchSave10000Aggregates ()            | 10.250s (±0.00%)   | 10.351s (±0.00%)   | -0.98%    | 35.420mb        | 34.891mb   | +1.51%      |
| benchSave10000AggregatesTransaction () | 8.755s (±0.00%)    | 8.756s (±0.00%)    | -0.02%    | 35.420mb        | 35.392mb   | +0.08%      |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

SubscriptionEngineBench
=======================

+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
|                           | time (kde mode)                               | memory                                     |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
| subject                   | Tag: <current>  | Tag: base       | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
| benchHandle10000Events () | 3.078s (±0.00%) | 3.095s (±0.00%) | -0.57%    | 34.689mb        | 34.161mb   | +1.55%      |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+

This comment gets update everytime a new commit comes in!

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.

None yet

1 participant