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

Removes the account debits/credits posted/pending indexes #1505

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

batiati
Copy link
Contributor

@batiati batiati commented Jan 31, 2024

Removes the account debits/credits posted/pending indexes, as they're too expensive for little practical benefits: If the user ever needs to query accounts by the balance, it is more likely that they will need to filter by the net debit/credit balance and not by the accumulated balance as we index it today.

If it becomes a use-case, we can add them in the future as derived indexes.

On My Machine™, it reduced ~300MiB of memory and increased +15% in TPS.

Before After
1258 batches in 46.94 s load offered = 1000000 tx/s load accepted = 213039 tx/s batch latency p1 = 0 ms batch latency p10 = 8 ms batch latency p20 = 8 ms batch latency p30 = 8 ms batch latency p40 = 10 ms batch latency p50 = 16 ms batch latency p60 = 19 ms batch latency p70 = 24 ms batch latency p80 = 32 ms batch latency p90 = 39 ms batch latency p95 = 49 ms batch latency p99 = 666 ms batch latency p100 = 852 ms 1265 batches in 38.66 s load offered = 1000000 tx/s load accepted = 258678 tx/s batch latency p1 = 0 ms batch latency p10 = 5 ms batch latency p20 = 7 ms batch latency p30 = 8 ms batch latency p40 = 8 ms batch latency p50 = 13 ms batch latency p60 = 18 ms batch latency p70 = 21 ms batch latency p80 = 28 ms batch latency p90 = 37 ms batch latency p95 = 44 ms batch latency p99 = 515 ms batch latency p100 = 775 ms

Let's do that after #1503 so we can compare both.

@batiati batiati added this pull request to the merge queue Feb 1, 2024
Merged via the queue into main with commit fdbb10b Feb 1, 2024
25 checks passed
@batiati batiati deleted the batiati-drop-indexes branch February 1, 2024 13:49
@matklad
Copy link
Member

matklad commented Feb 1, 2024

It is visible!

image

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

3 participants