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

accounts-db: relax intrabatch account locks #4253

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

2501babe
Copy link
Member

@2501babe 2501babe commented Jan 3, 2025

aka "simd83 account locking"

TODO confirm it behaves right with the feature on, dedupe transactions via messagehash, write tests

Problem

Summary of Changes

Fixes #

@2501babe 2501babe force-pushed the 20250103_simd83locking branch from 3e016b3 to f748a5f Compare January 3, 2025 10:46
@2501babe 2501babe self-assigned this Jan 3, 2025
@2501babe 2501babe force-pushed the 20250103_simd83locking branch 4 times, most recently from 2fb8527 to 11d1dcb Compare January 7, 2025 11:23
@2501babe 2501babe changed the title accounts-db: only lock accounts across threads accounts-db: disable intrabatch account locks Jan 7, 2025
accounts-db/src/accounts.rs Outdated Show resolved Hide resolved
// HANA TODO the vec allocation here is unfortunate but hard to avoid
// we cannot do this in one closure because of borrow rules
// play around with alternate strategies, according to benches this may be up to
// 50% slower for small batches and few locks, but for large batches and many locks
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bench using jemalloc? i'd think it would do a reasonable job of just keeping the mem in thread-local cache for re-use

@2501babe 2501babe force-pushed the 20250103_simd83locking branch from 95b17b3 to d1ec289 Compare January 13, 2025 12:13
@2501babe 2501babe changed the title accounts-db: disable intrabatch account locks accounts-db: relax intrabatch account locks Jan 13, 2025
@2501babe 2501babe force-pushed the 20250103_simd83locking branch from 61a81eb to 7280007 Compare January 14, 2025 12:27
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.

3 participants