-
Notifications
You must be signed in to change notification settings - Fork 11.7k
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
[ISSUE #8765] fix low performance of delay message when enable rocksdb consume queue #8766
base: develop
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #8766 +/- ##
=============================================
- Coverage 47.52% 47.35% -0.17%
+ Complexity 11592 11560 -32
=============================================
Files 1282 1282
Lines 89848 89882 +34
Branches 11557 11565 +8
=============================================
- Hits 42697 42567 -130
- Misses 41927 42056 +129
- Partials 5224 5259 +35
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@yuz10 Is there profiling metrics verifying that prefetch actually improves perf? |
The performance loss is not related to prefetching. The schedule message deliver speed is 160/s because every time the iterator only returns 16 messages, and the deliver thread will sleep 100ms after iterate finish. See org.apache.rocketmq.broker.schedule.ScheduleMessageService.DeliverDelayedMessageTimerTask#executeOnTimeUp |
@lizhanhui I found no difference between batch and single get key from rocksdb. I will remove prefetch code. Single: |
@yuz10 Got your update and review it tomorrow. |
It would be best to make further comparisons in terms of performance(why multi-get at present), code maintenance, ... Another issue is option 2, aka, this pull request, changes original behavior. We need to verify the change does not impact semantics of upper layer code bases. |
I did not compare the performance of RocksIterator with current solution, It can be optimized later, the current solution just deals with the issue of delay message. Another solustion is not to sleep 100ms after each iteration. |
Which Issue(s) This PR Fixes
Fixes #8765
Brief Description
How Did You Test This Change?