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

New request process pipeline #314

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

lzydmxy
Copy link
Contributor

@lzydmxy lzydmxy commented Jun 17, 2024

Which issues of this PR fixes:

This PR try to fix #302

Experimental Method Description

3 raft nodes with 16C32G disk NVME
100 client nodes and event node hold 1 sessions and several request threads

result(time unit us)

bench1 (100 create, 900 list)

#every threads
string prefix(50, 'c')
while(time < 30sec)
    for(int i=0;i<100;++i)
        create_node('path/prefix_i')
    for(int i=0;i<900;++i)
        list_node('path')

native (one thread)

Thread per session (100session) QPS avgRT p50 p90 p99 p999 err_count
1 376478.5 262.0 187.4 411.9 1266.6 1837.4 0.0
2 334998.7 592.8 499.6 1029.3 2403.4 4517.9 0.0
3 313959.9 948.9 822.7 1615.1 3726.3 6490.6 0.0
4 323105.6 1231.4 1120.5 1936.4 4031.0 7027.0 0.0
5 326951.3 1521.8 1410.2 2329.7 4928.4 7978.7 0.0
7 315303.3 2209.9 2071.4 3463.1 7997.8 9919.6 0.0
10 274853.7 3610.9 2928.4 6871.9 14112.3 19331.3 0.0

new process pipeline (parallel)

Thread per session (100session) QPS avgRT p50 p90 p99 p999 err_count
1 365195.5 269.0 181.0 347.9 1534.0 2197.3 0.0
2 466910.5 423.4 311.0 676.4 2396.3 3509.7 0.0
3 506937.1 586.1 452.6 970.9 3371.6 4871.0 0.0
4 490630.7 807.6 609.9 1178.1 5036.3 6801.9 0.0
5 509710.8 972.6 788.7 1423.4 5190.9 7107.4 0.0
7 500796.5 1587.4 1336.2 2247.2 7877.7 12046.7 0.0
10 494864.8 2005.8 1676.0 2702.3 11515.8 15856.6 0.0

bench2 (create:100 set:800 get:4500 list:4500 delete:100)

#every threads
string prefix(50, 'c')
while(time < 30sec)
    for(int i=0;i<100;++i)
        create_node('path/prefix_i')
    for(int i=0;i<800;++i)
        set_node('path/prefix_{rand}')
    for(int i=0;i<4500;++i)
        get_node('path/prefix_{rand}')
    for(int i=0;i<4500;++i)
        list('path')
    for(int i=0;i<100;++i)
        delete_node('path/prefix_i')

native (one thread)

Thread per session (100session) QPS avgRT p50 p90 p99 p999 err_count
1 354951.15 280.55 178.25 667.0 1805.6 2493.9 0.0
2 377711.6 527.8 380.85 1189.05 3211.0 4340.5 0.0
3 347238.95 862.6 668.45 1692.6 4682.9 6256.4 0.0
5 329363.9 1515.2 1084.25 2718.15 7543.1 9654.6 0.0
7 302855.55 2308.25 1651.25 5021.6 9745.5 11839.95 0.0
10 302955.2 3295.15 2084.2 9840.6 14087.8 16852.65 0.0

new process pipeline (parallel)

Thread per session (100session) QPS avgRT p50 p90 p99 p999 err_count
1 356793.9 278.8 177.95 651.4 1726.95 2413.2 0.0
2 374539.2 533.2 395.05 1098.3 3101.1 4208.1 0.0
3 396142.85 755.75 613.45 1271.8 4208.8 5257.45 0.0
5 365994.25 1363.5 1023.5 1874.2 7275.25 9063.4 0.0
7 303905.2 2310.0 1374.0 7107.75 9849.1 11485.05 0.0
10 335890.05 2971.15 1904.1 6593.55 13675.05 15885.55 0.0

bench2 (only create)

native (one thread)

ThreadNum QPS avgRT p50 p90 p99 p999 err_count

new process pipeline (parallel)

ThreadNum QPS avgRT p50 p90 p99 p999 err_count

Change log:

@lzydmxy
Copy link
Contributor Author

lzydmxy commented Jun 19, 2024

@JackyWoo Should we trace process xid for every session in RequestProcessor? An commit request may got error when replication(for example timeout), but still successfully committed. So we can find it both in error_requests and committed_requests. It's a bug, but we currently cannot avoid this situation. Maybe we trace process xid for every session to handle this situation.

@JackyWoo
Copy link
Contributor

JackyWoo commented Jun 19, 2024

Need more benchmark test.

@JackyWoo
Copy link
Contributor

@JackyWoo Should we trace process xid for every session in RequestProcessor? An commit request may got error when replication(for example timeout), but still successfully committed. So we can find it both in error_requests and committed_requests. It's a bug, but we currently cannot avoid this situation. Maybe we trace process xid for every session to handle this situation.

@lzydmxy please have a try.

@JackyWoo JackyWoo added this to the Release v2.1.1 milestone Jun 19, 2024
@JackyWoo JackyWoo added the performance Performance promotion label Jun 19, 2024
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.

Better RequestProcessor pipeline
2 participants