-
Notifications
You must be signed in to change notification settings - Fork 195
Optimize shm watchdog storage #1869
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
Optimize shm watchdog storage #1869
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1869 +/- ##
==========================================
- Coverage 71.03% 70.91% -0.12%
==========================================
Files 364 365 +1
Lines 61519 61615 +96
==========================================
- Hits 43699 43695 -4
- Misses 17820 17920 +100 ☔ View full report in Codecov by Sentry. |
- Optimize global segment ID generation and indexing - Optimize some structures on stack - Mutex -> RWLock
…ner is now not sensitive to it's size
Finally, around 600k msgs\sec added in SHM mode (2.4 -> 3M) |
… (when there is memory in arena, but no more metadata cells) - optimize allocation
} | ||
|
||
impl ConfirmedSegment { | ||
fn new(segment: Arc<MetadataSegment>, task_kick: std::sync::mpsc::Sender<()>) -> Self { | ||
let channel_size = 65536 * 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we document why we chose two times of 64KB here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
And thanks to your comment, I understood that I have a hidden bug with validator, I fixed that!
} | ||
|
||
impl WatchdogValidator { | ||
pub fn new(interval: Duration) -> Self { | ||
let storage = Arc::new(ValidatedStorage::default()); | ||
let channel_size = 65536 * 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And also here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
- fix potential bug with watchdog validator (thatks to YuYuan)
- optimize some things
Uh oh!
There was an error while loading. Please reload this page.