-
Notifications
You must be signed in to change notification settings - Fork 961
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
perf: auto batch flush (more than 2x times performance gain) #2950
base: main
Are you sure you want to change the base?
Conversation
@tishun Hi, bro, could you help evaluate this PR? Got huge performance gain! |
This reverts commit 9f2edeb.
1269990
to
3241d42
Compare
0c74788
to
2b57334
Compare
1817719
to
2058db3
Compare
2058db3
to
0d94a5b
Compare
batching will cause latency, AFAIK, netty already has flush balance handler for this: FlushConsolidationHandler |
…ble activation command in drainStackUponChannelInactive()
6df7b23
to
e328aa0
Compare
@Roiocam Thx for the comments! I did a benchmark of my solution against FlushConsolidationHandler, Can conclude that my solution gets advantage when QPS is high. |
3592e3a
to
ebe5381
Compare
ebe5381
to
a80453e
Compare
Hey @okg-cxf , thanks for filing this PR. Since it is a large change that touches quite critical pieces of the code I will need some more time to go through it. Currently I am mainly focused on #2933 but I will come back to this issue as soon as possible. |
c4dffec
to
d7dcf54
Compare
…e before autoBatchFlushEndPointContext.done(1) othewise the flyingTaskNum could be negative; 2, make sure lastEventLoop is never null
d7dcf54
to
5ad30d0
Compare
502981f
to
e9cfc31
Compare
1bef7b3
to
24233a8
Compare
Refer to issue: #2945 #2302
Make sure that:
mvn formatter:format
target. Don’t submit any formatting related changes.The optimization idea comes from
group commit
in database technology.Bench result:
Test Env:
AWS EC2: t2.2xlarge
Redis Version:
7.1.0
Redis Server:
cache.r7g.large
Test Model:
multi thread sync get, 512 threads, each thread do 10,000 get
Benchmark code:
Bench result: