mimaison commented on PR #19030:
URL: https://github.com/apache/kafka/pull/19030#issuecomment-2714174251

   I ran a few benchmarks on my laptop. For both trunk and my branch I ran a 
single broker in combined mode with all default settings. All topics have a 
single partition with all default settings.
   
   I ran each test 3 to 4 times. Each time I typically got a variation of ~5%, 
but some runs had over 10% difference (up or down). I selected runs with 
average results.
   
   - This branch:
   
     - 100 bytes records:
     ```
     ./bin/kafka-producer-perf-test.sh --producer-props 
bootstrap.servers=localhost:9092 --topic test100 --num-records 100000000 
--record-size 100 --throughput -1
     9429081 records sent, 1885439.1 records/sec (179.81 MB/sec), 0.2 ms avg 
latency, 125.0 ms max latency.
     10088373 records sent, 2017674.6 records/sec (192.42 MB/sec), 0.1 ms avg 
latency, 11.0 ms max latency.
     9771451 records sent, 1952337.9 records/sec (186.19 MB/sec), 0.2 ms avg 
latency, 29.0 ms max latency.
     9387492 records sent, 1877498.4 records/sec (179.05 MB/sec), 0.2 ms avg 
latency, 22.0 ms max latency.
     9604608 records sent, 1920921.6 records/sec (183.19 MB/sec), 0.2 ms avg 
latency, 13.0 ms max latency.
     9579300 records sent, 1915860.0 records/sec (182.71 MB/sec), 0.2 ms avg 
latency, 8.0 ms max latency.
     9606236 records sent, 1921247.2 records/sec (183.22 MB/sec), 0.1 ms avg 
latency, 9.0 ms max latency.
     9687044 records sent, 1937408.8 records/sec (184.77 MB/sec), 0.1 ms avg 
latency, 9.0 ms max latency.
     9301652 records sent, 1860330.4 records/sec (177.41 MB/sec), 0.2 ms avg 
latency, 20.0 ms max latency.
     9563020 records sent, 1912604.0 records/sec (182.40 MB/sec), 0.2 ms avg 
latency, 11.0 ms max latency.
     100000000 records sent, 1918391.6 records/sec (182.95 MB/sec), 0.17 ms avg 
latency, 125.00 ms max latency, 0 ms 50th, 1 ms 95th, 1 ms 99th, 8 ms 99.9th.
     
     ./bin/kafka-consumer-perf-test.sh --bootstrap-server localhost:9092 
--topic test100 --messages 100000000
     start.time, end.time, data.consumed.in.MB, MB.sec, data.consumed.in.nMsg, 
nMsg.sec, rebalance.time.ms, fetch.time.ms, fetch.MB.sec, fetch.nMsg.sec
     2025-03-11 13:44:03:713, 2025-03-11 13:44:22:922, 9536.7432, 496.4727, 
100000000, 5205893.0710, 3172, 16037, 594.6713, 6235580.2207
     ```
   
     - 1000 bytes records:
     ```
     ./bin/kafka-producer-perf-test.sh --producer-props 
bootstrap.servers=localhost:9092 --topic test1000 --num-records 10000000 
--record-size 1000 --throughput -1
     1303041 records sent, 260608.2 records/sec (248.54 MB/sec), 17.7 ms avg 
latency, 123.0 ms max latency.
     1342704 records sent, 268540.8 records/sec (256.10 MB/sec), 0.4 ms avg 
latency, 15.0 ms max latency.
     1355664 records sent, 271132.8 records/sec (258.57 MB/sec), 0.4 ms avg 
latency, 15.0 ms max latency.
     1343360 records sent, 268672.0 records/sec (256.23 MB/sec), 0.4 ms avg 
latency, 16.0 ms max latency.
     1311728 records sent, 262345.6 records/sec (250.19 MB/sec), 0.6 ms avg 
latency, 25.0 ms max latency.
     1318896 records sent, 263779.2 records/sec (251.56 MB/sec), 0.4 ms avg 
latency, 16.0 ms max latency.
     1292272 records sent, 258454.4 records/sec (246.48 MB/sec), 0.5 ms avg 
latency, 18.0 ms max latency.
     10000000 records sent, 264424.3 records/sec (252.17 MB/sec), 3.24 ms avg 
latency, 123.00 ms max latency, 0 ms 50th, 6 ms 95th, 103 ms 99th, 120 ms 
99.9th.
     
     ./bin/kafka-consumer-perf-test.sh --bootstrap-server localhost:9092 
--topic test1000 --messages 10000000
     start.time, end.time, data.consumed.in.MB, MB.sec, data.consumed.in.nMsg, 
nMsg.sec, rebalance.time.ms, fetch.time.ms, fetch.MB.sec, fetch.nMsg.sec
     2025-03-11 11:19:01:606, 2025-03-11 11:19:09:366, 9536.7432, 1228.9617, 
10000000, 1288659.7938, 3153, 4607, 2070.0550, 2170609.9414
     ```
   
     - 10000 bytes records:
     ```
     ./bin/kafka-producer-perf-test.sh --producer-props 
bootstrap.servers=localhost:9092 --topic test10000 --num-records 1000000 
--record-size 10000 --throughput -1
     110376 records sent, 22075.2 records/sec (210.53 MB/sec), 89.2 ms avg 
latency, 166.0 ms max latency.
     123542 records sent, 24708.4 records/sec (235.64 MB/sec), 82.9 ms avg 
latency, 100.0 ms max latency.
     126983 records sent, 25396.6 records/sec (242.20 MB/sec), 80.7 ms avg 
latency, 98.0 ms max latency.
     126496 records sent, 25299.2 records/sec (241.27 MB/sec), 81.0 ms avg 
latency, 98.0 ms max latency.
     126856 records sent, 25371.2 records/sec (241.96 MB/sec), 80.7 ms avg 
latency, 103.0 ms max latency.
     131991 records sent, 26382.4 records/sec (251.60 MB/sec), 77.7 ms avg 
latency, 96.0 ms max latency.
     135059 records sent, 27011.8 records/sec (257.60 MB/sec), 75.8 ms avg 
latency, 104.0 ms max latency.
     1000000 records sent, 25181.9 records/sec (240.15 MB/sec), 80.95 ms avg 
latency, 166.00 ms max latency, 81 ms 50th, 91 ms 95th, 108 ms 99th, 147 ms 
99.9th.
     
     ./bin/kafka-consumer-perf-test.sh --bootstrap-server localhost:9092 
--topic test10000 --messages 1000000
     start.time, end.time, data.consumed.in.MB, MB.sec, data.consumed.in.nMsg, 
nMsg.sec, rebalance.time.ms, fetch.time.ms, fetch.MB.sec, fetch.nMsg.sec
     2025-03-11 11:23:54:157, 2025-03-11 11:24:01:264, 9536.7432, 1341.8803, 
1000000, 140706.3459, 3162, 3945, 2417.4254, 253485.4246
     ```
     
     - 100000 bytes records:
     ```
     ./bin/kafka-producer-perf-test.sh --producer-props 
bootstrap.servers=localhost:9092 --topic test100000 --num-records 100000 
--record-size 100000 --throughput -1
     34718 records sent, 6943.6 records/sec (662.19 MB/sec), 1.0 ms avg 
latency, 119.0 ms max latency.
     35390 records sent, 7078.0 records/sec (675.01 MB/sec), 0.6 ms avg 
latency, 19.0 ms max latency.
     100000 records sent, 7027.4 records/sec (670.19 MB/sec), 0.73 ms avg 
latency, 119.00 ms max latency, 0 ms 50th, 2 ms 95th, 14 ms 99th, 25 ms 99.9th.
     
     ./bin/kafka-consumer-perf-test.sh --bootstrap-server localhost:9092 
--topic test100000 --messages 100000
     start.time, end.time, data.consumed.in.MB, MB.sec, data.consumed.in.nMsg, 
nMsg.sec, rebalance.time.ms, fetch.time.ms, fetch.MB.sec, fetch.nMsg.sec
     2025-03-11 11:29:42:118, 2025-03-11 11:29:49:301, 9536.7432, 1327.6825, 
100000, 13921.7597, 3164, 4019, 2372.9144, 24881.8114
     ```
     
   - trunk 
(https://github.com/apache/kafka/commit/278a93c45d9622ecb30a31506420213bf70e521d)
   
     - 100 bytes records:
     ```
     ./bin/kafka-producer-perf-test.sh --producer-props 
bootstrap.servers=localhost:9092 --topic test100 --num-records 100000000 
--record-size 100 --throughput -1
     7961217 records sent, 1592243.4 records/sec (151.85 MB/sec), 1.3 ms avg 
latency, 125.0 ms max latency.
     8229347 records sent, 1645869.4 records/sec (156.96 MB/sec), 0.1 ms avg 
latency, 12.0 ms max latency.
     8374181 records sent, 1674836.2 records/sec (159.72 MB/sec), 0.2 ms avg 
latency, 13.0 ms max latency.
     8453908 records sent, 1690443.5 records/sec (161.21 MB/sec), 0.1 ms avg 
latency, 10.0 ms max latency.
     8171968 records sent, 1634393.6 records/sec (155.87 MB/sec), 0.1 ms avg 
latency, 10.0 ms max latency.
     8255884 records sent, 1651176.8 records/sec (157.47 MB/sec), 0.1 ms avg 
latency, 13.0 ms max latency.
     8277936 records sent, 1655587.2 records/sec (157.89 MB/sec), 0.1 ms avg 
latency, 5.0 ms max latency.
     8402700 records sent, 1680540.0 records/sec (160.27 MB/sec), 0.2 ms avg 
latency, 9.0 ms max latency.
     8305908 records sent, 1661181.6 records/sec (158.42 MB/sec), 0.1 ms avg 
latency, 13.0 ms max latency.
     8217552 records sent, 1643510.4 records/sec (156.74 MB/sec), 0.1 ms avg 
latency, 9.0 ms max latency.
     8199792 records sent, 1639958.4 records/sec (156.40 MB/sec), 0.1 ms avg 
latency, 7.0 ms max latency.
     8350604 records sent, 1670120.8 records/sec (159.28 MB/sec), 0.1 ms avg 
latency, 8.0 ms max latency.
     100000000 records sent, 1653739.9 records/sec (157.71 MB/sec), 0.23 ms avg 
latency, 125.00 ms max latency, 0 ms 50th, 1 ms 95th, 1 ms 99th, 34 ms 99.9th.
     
     ./bin/kafka-consumer-perf-test.sh --bootstrap-server localhost:9092 
--topic test100 --messages 100000000
     start.time, end.time, data.consumed.in.MB, MB.sec, data.consumed.in.nMsg, 
nMsg.sec, rebalance.time.ms, fetch.time.ms, fetch.MB.sec, fetch.nMsg.sec
     2025-03-11 13:26:50:688, 2025-03-11 13:27:09:896, 9536.7432, 496.4985, 
100000000, 5206164.0983, 3170, 16038, 594.6342, 6235191.4204
     ```
     
     - 1000 bytes records:
     ```
     ./bin/kafka-producer-perf-test.sh --producer-props 
bootstrap.servers=localhost:9092 --topic test1000 --num-records 10000000 
--record-size 1000 --throughput -1
     1284401 records sent, 256880.2 records/sec (244.98 MB/sec), 19.7 ms avg 
latency, 124.0 ms max latency.
     1220048 records sent, 244009.6 records/sec (232.71 MB/sec), 0.4 ms avg 
latency, 13.0 ms max latency.
     1229792 records sent, 245958.4 records/sec (234.56 MB/sec), 0.8 ms avg 
latency, 22.0 ms max latency.
     1223408 records sent, 244681.6 records/sec (233.35 MB/sec), 0.4 ms avg 
latency, 14.0 ms max latency.
     1231040 records sent, 246208.0 records/sec (234.80 MB/sec), 0.4 ms avg 
latency, 17.0 ms max latency.
     1296016 records sent, 259203.2 records/sec (247.20 MB/sec), 0.4 ms avg 
latency, 15.0 ms max latency.
     1252368 records sent, 250473.6 records/sec (238.87 MB/sec), 0.3 ms avg 
latency, 14.0 ms max latency.
     1259216 records sent, 251843.2 records/sec (240.18 MB/sec), 0.8 ms avg 
latency, 21.0 ms max latency.
     10000000 records sent, 249862.6 records/sec (238.29 MB/sec), 2.98 ms avg 
latency, 124.00 ms max latency, 0 ms 50th, 4 ms 95th, 99 ms 99th, 104 ms 99.9th.
     
     ./bin/kafka-consumer-perf-test.sh --bootstrap-server localhost:9092 
--topic test1000 --messages 10000000
     start.time, end.time, data.consumed.in.MB, MB.sec, data.consumed.in.nMsg, 
nMsg.sec, rebalance.time.ms, fetch.time.ms, fetch.MB.sec, fetch.nMsg.sec
     2025-03-11 12:25:04:613, 2025-03-11 12:25:12:575, 9536.7432, 1197.7824, 
10000000, 1255965.8377, 3189, 4773, 1998.0606, 2095118.3742
     ```
     
     - 10000 bytes records:
     ```
     ./bin/kafka-producer-perf-test.sh --producer-props 
bootstrap.servers=localhost:9092 --topic test10000 --num-records 1000000 
--record-size 10000 --throughput -1
     112057 records sent, 22411.4 records/sec (213.73 MB/sec), 87.8 ms avg 
latency, 156.0 ms max latency.
     118458 records sent, 23691.6 records/sec (225.94 MB/sec), 86.4 ms avg 
latency, 168.0 ms max latency.
     124853 records sent, 24970.6 records/sec (238.14 MB/sec), 82.1 ms avg 
latency, 98.0 ms max latency.
     123908 records sent, 24781.6 records/sec (236.34 MB/sec), 82.7 ms avg 
latency, 112.0 ms max latency.
     126338 records sent, 25267.6 records/sec (240.97 MB/sec), 81.1 ms avg 
latency, 104.0 ms max latency.
     123995 records sent, 24799.0 records/sec (236.50 MB/sec), 82.6 ms avg 
latency, 99.0 ms max latency.
     123272 records sent, 24654.4 records/sec (235.12 MB/sec), 82.8 ms avg 
latency, 108.0 ms max latency.
     123019 records sent, 24603.8 records/sec (234.64 MB/sec), 83.5 ms avg 
latency, 103.0 ms max latency.
     1000000 records sent, 24402.1 records/sec (232.72 MB/sec), 83.54 ms avg 
latency, 168.00 ms max latency, 82 ms 50th, 92 ms 95th, 102 ms 99th, 150 ms 
99.9th.
     
     ./bin/kafka-consumer-perf-test.sh --bootstrap-server localhost:9092 
--topic test10000 --messages 1000000
     start.time, end.time, data.consumed.in.MB, MB.sec, data.consumed.in.nMsg, 
nMsg.sec, rebalance.time.ms, fetch.time.ms, fetch.MB.sec, fetch.nMsg.sec
     2025-03-11 12:14:03:785, 2025-03-11 12:14:11:743, 9536.7432, 1198.3844, 
1000000, 125659.7135, 3161, 4797, 1988.0640, 208463.6231
     ```
     
     - 10000 bytes records:
     ```
     ./bin/kafka-producer-perf-test.sh --producer-props 
bootstrap.servers=localhost:9092 --topic test100000 --num-records 100000 
--record-size 100000 --throughput -1
     34325 records sent, 6865.0 records/sec (654.70 MB/sec), 0.8 ms avg 
latency, 120.0 ms max latency.
     35328 records sent, 7065.6 records/sec (673.83 MB/sec), 0.5 ms avg 
latency, 14.0 ms max latency.
     100000 records sent, 6998.9 records/sec (667.47 MB/sec), 0.65 ms avg 
latency, 120.00 ms max latency, 0 ms 50th, 2 ms 95th, 11 ms 99th, 20 ms 99.9th.
     
     ./bin/kafka-consumer-perf-test.sh --bootstrap-server localhost:9092 
--topic test100000 --messages 100000
     start.time, end.time, data.consumed.in.MB, MB.sec, data.consumed.in.nMsg, 
nMsg.sec, rebalance.time.ms, fetch.time.ms, fetch.MB.sec, fetch.nMsg.sec
     2025-03-11 12:17:39:396, 2025-03-11 12:17:47:135, 9536.7432, 1232.2966, 
100000, 12921.5661, 3171, 4568, 2087.7284, 21891.4186
     ```
     
   Summary
   
   
![image](https://github.com/user-attachments/assets/3bf8b971-d633-4c1a-977d-b2d179208774)
   
   Overall on my laptop I get similar numbers when running the producer and 
consumer performance tools on my branch and trunk. Without knowing the branch I 
would not be able to tell the difference as the results are all within the 
variations I observed for all tests.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to