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

perf(server): always ack local to gain better latency #1013

Closed
wants to merge 1 commit into from

Conversation

lifepuzzlefun
Copy link
Contributor

for automq ack local is enough. no need goto delayedProducePurgatory. and this reduce write latency ( test via ack=1, ack=-1 )

for automq ack local is enough. no need goto delayedProducePurgatory.
and this reduce write latency ( test via ack=1, ack=-1 )
@lifepuzzlefun
Copy link
Contributor Author

root@mq-dev02:/mnt/nvme-disks/data1/automq/kafka-3.8.0-SNAPSHOT/bin# ./kafka-producer-perf-test.sh --record-size 1024 --throughput -1 --topic automq-test2 --num-records 10000000 --producer-props bootstrap.servers=mq-dev02:9092 acks=all
[2024-03-24 22:22:21,315] 1232035 records sent, 246407.0 records/sec (240.63 MB/sec), 4.1 ms avg latency, 300.0 ms max latency.
[2024-03-24 22:22:26,320] 1408556 records sent, 281711.2 records/sec (275.11 MB/sec), 4.8 ms avg latency, 255.0 ms max latency.
[2024-03-24 22:22:31,321] 1417129 records sent, 283425.8 records/sec (276.78 MB/sec), 3.1 ms avg latency, 71.0 ms max latency.
[2024-03-24 22:22:36,322] 1471167 records sent, 294233.4 records/sec (287.34 MB/sec), 4.4 ms avg latency, 156.0 ms max latency.
[2024-03-24 22:22:41,323] 1442994 records sent, 288598.8 records/sec (281.83 MB/sec), 4.1 ms avg latency, 165.0 ms max latency.
[2024-03-24 22:22:46,324] 1443355 records sent, 288671.0 records/sec (281.91 MB/sec), 3.6 ms avg latency, 196.0 ms max latency.
[2024-03-24 22:22:51,325] 1499744 records sent, 299948.8 records/sec (292.92 MB/sec), 4.9 ms avg latency, 245.0 ms max latency.
10000000 records sent, 283157.775513 records/sec (276.52 MB/sec), 4.16 ms avg latency, 300.00 ms max latency, 3 ms 50th, 9 ms 95th, 36 ms 99th, 176 ms 99.9th.
root@mq-dev02:/mnt/nvme-disks/data1/automq/kafka-3.8.0-SNAPSHOT/bin# ./kafka-producer-perf-test.sh --record-size 1024 --throughput -1 --topic automq-test2 --num-records 10000000 --producer-props bootstrap.servers=mq-dev02:9092 acks=1
[2024-03-24 22:23:04,755] 1275068 records sent, 255013.6 records/sec (249.04 MB/sec), 1.5 ms avg latency, 290.0 ms max latency.
[2024-03-24 22:23:09,760] 1465699 records sent, 293139.8 records/sec (286.27 MB/sec), 0.9 ms avg latency, 38.0 ms max latency.
[2024-03-24 22:23:14,761] 1469064 records sent, 293812.8 records/sec (286.93 MB/sec), 0.9 ms avg latency, 29.0 ms max latency.
[2024-03-24 22:23:19,761] 1334965 records sent, 266993.0 records/sec (260.74 MB/sec), 1.0 ms avg latency, 36.0 ms max latency.
[2024-03-24 22:23:24,762] 1369334 records sent, 273866.8 records/sec (267.45 MB/sec), 0.9 ms avg latency, 31.0 ms max latency.
[2024-03-24 22:23:29,763] 1405412 records sent, 281082.4 records/sec (274.49 MB/sec), 2.1 ms avg latency, 131.0 ms max latency.
[2024-03-24 22:23:34,763] 1432816 records sent, 286563.2 records/sec (279.85 MB/sec), 0.8 ms avg latency, 23.0 ms max latency.
10000000 records sent, 278660.201750 records/sec (272.13 MB/sec), 1.15 ms avg latency, 290.00 ms max latency, 1 ms 50th, 2 ms 95th, 9 ms 99th, 92 ms 99.9th.

@superhx
Copy link
Collaborator

superhx commented Mar 25, 2024

AutoMQ needs delayedProducePurgatory to ensure the data is already persisted to the disk.

You could find more details in ElasticLog#append

@lifepuzzlefun
Copy link
Contributor Author

AutoMQ needs delayedProducePurgatory to ensure the data is already persisted to the disk.

You could find more details in ElasticLog#append

ops, i miss the logic here. by the way if we need force use ack=1 to ack=all or what semantic do we expect for user to set
: )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants