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

Handle response serialization in the IO thread #250

Merged
merged 5 commits into from
Jun 4, 2024

Conversation

lzydmxy
Copy link
Contributor

@lzydmxy lzydmxy commented May 9, 2024

Which issues of this PR fixes:

This PR try to fix #172

Change log:

Perform response serialization in the IO thread to reduce the overhead of one copy.

Optimization result:

thread_size,tps,avgRT(microsecond),TP90(microsecond),TP99(microsecond),TP999(microsecond),failRate
playload: 100(avg 113513)
200,114625,1757.0,3300.0,4200.0,6900.0,0.0
200,112991,1782.0,3400.0,4300.0,7200.0,0.0
200,112925,1781.0,3300.0,4200.0,6400.0,0.0

playload: 100(avg 117602)  # after optimize
200,117966,1707.0,3300.0,4200.0,5300.0,0.0
200,117983,1696.0,3200.0,4000.0,5400.0,0.0
200,116858,1724.0,3300.0,4200.0,5500.0,0.0 

playload: 300(avg 97229)
200,98256,2037.0,3900.0,4800.0,6600.0,0.0
200,95491,2110.0,4100.0,5300.0,9900.0,0.0
200,97941,2058.0,4000.0,5000.0,7200.0,0.0

playload: 300 (avg 102292)  # after optimize
200,102283,1967.0,3900.0,4900.0,6700.0,0.0
200,100479,1995.0,4000.0,5100.0,8200.0,0.0
200,104116,1936.0,3900.0,4900.0,6300.0,0.0

@JackyWoo JackyWoo added this to the Release v2.0.5 milestone May 9, 2024
@JackyWoo JackyWoo added the performance Performance promotion label May 9, 2024
@JackyWoo JackyWoo self-assigned this May 9, 2024
@lzydmxy lzydmxy force-pushed the handle_responses_in_IO_thread branch from e3eb4eb to f60227b Compare May 31, 2024 08:15
src/Service/ConnectionHandler.cpp Outdated Show resolved Hide resolved
src/Service/ConnectionHandler.cpp Show resolved Hide resolved
src/Service/ForwardConnectionHandler.h Outdated Show resolved Hide resolved
src/ZooKeeper/ZooKeeperCommon.h Outdated Show resolved Hide resolved
src/ZooKeeper/ZooKeeperCommon.cpp Outdated Show resolved Hide resolved
@JackyWoo JackyWoo merged commit f6dc73d into JDRaftKeeper:master Jun 4, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance promotion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Just use ZooKeeperResponsePtr in response queue instead of FIFOBuffer
2 participants