Skip to content

Performance Luxun vs. Apache Kafka

bulldog2011 edited this page Apr 17, 2013 · 15 revisions

#Performance Benchmark - Luxun vs. Apache Kafka

Note, in the following test, when flush is enabled, following setting are used by Luxun and Kafka brokers.

log.flush.count=10000
log.default.flush.interval.ms=1000
log.default.flush.scheduler.interval.ms=1000

Apache Kafka(0.7.2) Tests on single machine

In the following tests, one producer process, one consumer process and one broker process are all run on my server(CentOS 6.3, HD with EXT4), and there is only one active topic on broker for testing in each round. These tests are performed to check the pure performance of Apache Kafka messaging system by separating the impact of network. See full hardware spec for benchmark here.

JVM setting:

  1. producer : -Xmx1g
  1. consuemr : -Xmx1g
  2. broker : -Xmx4g

###Test Suite 1 - Standalone Async Producing(batch size = 200, flush enabled)

Test Case messge size(bytes) thread number nMsgs sent throughput(MB/s) speed(nMsg/s)
TC11 100 1 2000000 8.9108 93436.1131
TC12 1024 1 2000000 34.6360 35467.2814
TC13 2048 1 2000000 41.8233 21413.5055
TC14 4096 1 2000000 45.4029 11622.9064
TC15 100 10 2000000 10.8317 113578.2838
TC16 1024 10 2000000 50.8123 52031.8435
TC17 2048 10 2000000 66.2953 33943.1791
TC18 4096 10 2000000 77.9504 19955.3001

###Test Suite 2 - Standalone Async Producing(batch size = 200, flush disabled)

Test Case messge size(bytes) thread number nMsgs sent throughput(MB/s) speed(nMsg/s)
TC21 100 1 2000000 30.7985 322945.2608
TC22 1024 1 2000000 47.1473 48278.8587
TC23 2048 1 2000000 45.0782 23080.0300
TC24 4096 1 2000000 45.3011 11597.0938
TC25 100 10 2000000 58.8870 617474.5292
TC26 1024 10 2000000 75.1520 76955.6351
TC27 2048 10 2000000 71.7283 36724.8756
TC28 4096 10 2000000 78.9102 20200.9999

###Test Suite 3 - Standalone Sync Producing(flush enabled)

Test Case messge size(bytes) thread number nMsgs sent throughput(MB/s) speed(nMsg/s)
TC31 100 1 2000000 9.7101 101817.4413
TC32 1024 1 2000000 35.6540 36509.6751
TC33 2048 1 2000000 41.2870 21138.9676
TC34 4096 1 2000000 43.1964 11058.2771
TC35 100 10 2000000 11.0854 116238.5214
TC36 1024 10 2000000 49.6070 50797.5211
TC37 2048 10 2000000 68.1505 34893.0528
TC38 4096 10 2000000 77.3768 19808.4523

###Test Suite 4 - Standalone Sync Producing(flush disabled)

Test Case messge size(bytes) thread number nMsgs sent throughput(MB/s) speed(nMsg/s)
TC41 100 1 2000000 46.5207 487804.8780
TC42 1024 1 2000000 48.6797 49847.9637
TC43 2048 1 2000000 46.2936 23702.2991
TC44 4096 1 2000000 44.8036 11469.7314
TC45 100 10 2000000 81.1983 851426.1388
TC46 1024 10 2000000 81.8234 83787.1806
TC47 2048 10 2000000 65.9851 33784.3545
TC48 4096 10 2000000 69.0455 17675.6518

###Test Suite 5 - Standalone Consuming(fetch size = 1024 * 1024bytes)

Test Case messge size(bytes) thread number nMsgs fetched throughput(MB/s) speed(nMsg/s)
TC51 100 1 2000000 91.7436 962000.9620
TC52 1024 1 2000000 95.4607 97751.7107
TC53 2048 1 2000000 97.6465 49995.0005
TC54 4096 1 2000000 100.4616 25718.1802

Luxun 0.6.0 Tests on single machine

In the following tests, one producer process, one consumer process and one broker process are all run on my server(CentOS 6.3, HD with EXT4), and there is only one active topic on broker for testing in each round. These tests are performed to check the pure performance of Luxun messaging system by separating the impact of network. See full hardware spec for benchmark here.

JVM setting:

  1. producer : -Xmx1g
  1. consuemr : -Xmx1g
  2. broker : -Xmx4g

###Test Suite 1 - Standalone Async Producing(batch size = 200, flush enabled)

Test Case messge size(bytes) thread number nMsgs sent throughput(MB/s) speed(nMsg/s)
TC11 100 1 2000000 144.0596 1510574.0181
TC12 1024 1 2000000 468.8250 480076.8123
TC13 2048 1 2000000 468.8250 240038.4061
TC14 4096 1 2000000 205.1279 52512.7343
TC15 100 10 2000000 152.2226 1596169.1939
TC16 1024 10 2000000 441.0851 451671.1834
TC17 2048 10 2000000 205.1817 105053.0518
TC18 4096 10 2000000 249.8481 63961.1116

###Test Suite 2 - Standalone Async Producing(batch size = 200, flush disabled)

Test Case messge size(bytes) thread number nMsgs sent throughput(MB/s) speed(nMsg/s)
TC21 100 1 2000000 121.7975 1277139.2082
TC22 1024 1 2000000 241.0968 246883.1009
TC23 2048 1 2000000 173.5186 88841.5068
TC24 4096 1 2000000 181.1594 46376.8116
TC25 100 10 2000000 158.1549 1658374.7927
TC26 1024 10 2000000 392.5090 401929.2605
TC27 2048 10 2000000 332.4185 170198.2810
TC28 4096 10 2000000 238.8778 61152.7289

###Test Suite 3 - Standalone Sync Producing(flush enabled)

Test Case messge size(bytes) thread number nMsgs sent throughput(MB/s) speed(nMsg/s)
TC31 100 1 2000000 3.3632 35265.9049
TC32 1024 1 2000000 19.7999 20275.1336
TC33 2048 1 2000000 29.9148 15316.3985
TC34 4096 1 2000000 41.6130 10652.9173
TC35 100 10 2000000 3.8596 40471.0834
TC36 1024 10 2000000 23.4655 24028.6421
TC37 2048 10 2000000 34.0032 17409.6223
TC38 4096 10 2000000 42.6451 10917.1498

###Test Suite 4 - Standalone Sync Producing(flush disabled)

Test Case messge size(bytes) thread number nMsgs sent throughput(MB/s) speed(nMsg/s)
TC41 100 1 2000000 17.9346 188058.2981
TC42 1024 1 2000000 107.1968 109769.4841
TC43 2048 1 2000000 177.2667 90760.5736
TC44 4096 1 2000000 216.5627 55440.0554
TC45 100 10 2000000 20.3537 213424.3944
TC46 1024 10 2000000 136.0115 139275.7660
TC47 2048 10 2000000 218.8130 112032.2653
TC48 4096 10 2000000 198.0857 50709.9391

###Test Suite 5 - Standalone Consuming(fetch size = 1024 * 1024bytes)

Test Case messge size(bytes) thread number nMsgs fetched throughput(MB/s) speed(nMsg/s)
TC51 100 1 2000000 162.3275 1702127.6596
TC52 1024 1 2000000 123.2411 126198.8894
TC53 2048 1 2000000 211.0118 108038.0294
TC54 4096 1 2000000 116.9361 29935.6384