benchmark_0.13.0.rst 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. 0.13.0 Benchmark (2015-11-08)
  2. =============================
  3. Benchmark with the [emqtt_benchmark](https://github.com/emqtt/emqtt_benchmark) tool.
  4. Server: 8 Core, 32G Memory CentOS6.
  5. etc/vm.args
  6. -----------
  7. ::
  8. ## max process numbers
  9. +P 1000000
  10. ## Sets the maximum number of simultaneously existing ports for this system
  11. +Q 409600
  12. ## max atom number
  13. ## +t
  14. ## Set the distribution buffer busy limit (dist_buf_busy_limit) in kilobytes.
  15. ## Valid range is 1-2097151. Default is 1024.
  16. ## +zdbbl 8192
  17. ##-------------------------------------------------------------------------
  18. ## Env
  19. ##-------------------------------------------------------------------------
  20. ## Increase number of concurrent ports/sockets, deprecated in R17
  21. -env ERL_MAX_PORTS 409600
  22. -env ERTS_MAX_PORTS 409600
  23. 250K Subscribers on five nodes
  24. ------------------------------
  25. Create 50K connections on each node and subscribe test/%i topics::
  26. ./emqtt_bench_sub -h server -p 1883 -c 50000 -i 5 -t test/%i -q 1
  27. Publish 4K msg/sec on server
  28. ------------------------------
  29. Publish qos1 messages at the rate of 4K(msg/sec) on the server::
  30. ./emqtt_bench_pub -h localhost -c 40 -i 10 -I 10 -t test/%i -q 1
  31. Each node will receive 4k msg/sec.
  32. Benchmark Result
  33. ----------------
  34. 250K Connections,
  35. 50K Topics,
  36. 250K Subscribers,
  37. 4K Qos1 Messages/Sec In,
  38. 20K Qos1 Messages/Sec Out,
  39. 12M+(bps) In, 56M+(bps) Out Traffic
  40. Consumed about 3.1G memory and 400+ CPU.
  41. ./bin/emqttd_ctl broker
  42. -----------------------
  43. sysdescr : Erlang MQTT Broker
  44. version : 0.13.0
  45. uptime : 20 minutes, 25 seconds
  46. datetime : 2015-11-08 10:38:30
  47. ./bin/emqttd_ctl broker stats
  48. -----------------------
  49. ```
  50. clients/count : 250040
  51. clients/max : 250040
  52. queues/count : 0
  53. queues/max : 0
  54. retained/count : 2
  55. retained/max : 2
  56. sessions/count : 0
  57. sessions/max : 0
  58. subscribers/count : 250000
  59. subscribers/max : 250000
  60. topics/count : 50050
  61. topics/max : 50050
  62. ```
  63. ./bin/emqttd_ctl listeners
  64. -----------------------
  65. ```
  66. listener on http:8083
  67. acceptors : 4
  68. max_clients : 64
  69. current_clients : 0
  70. shutdown_count : []
  71. listener on mqtts:8883
  72. acceptors : 4
  73. max_clients : 512
  74. current_clients : 0
  75. shutdown_count : []
  76. listener on mqtt:1883
  77. acceptors : 64
  78. max_clients : 1000000
  79. current_clients : 250040
  80. shutdown_count : []
  81. listener on http:18083
  82. acceptors : 4
  83. max_clients : 512
  84. current_clients : 0
  85. shutdown_count : []
  86. ```
  87. ./bin/emqttd_ctl vm
  88. -----------------------
  89. ```
  90. cpu/load1 : 13.44
  91. cpu/load5 : 10.43
  92. cpu/load15 : 5.98
  93. memory/total : 2710277048
  94. memory/processes : 1420519328
  95. memory/processes_used : 1419564424
  96. memory/system : 1289757720
  97. memory/atom : 512601
  98. memory/atom_used : 486464
  99. memory/binary : 380872488
  100. memory/code : 13077799
  101. memory/ets : 408483440
  102. process/limit : 1048576
  103. process/count : 500353
  104. io/max_fds : 500000
  105. io/active_fds : 75
  106. ```
  107. ./bin/emqttd_ctl recon node_stats
  108. ---------------------------------
  109. ```
  110. {[{process_count,500353},
  111. {run_queue,41},
  112. {error_logger_queue_len,0},
  113. {memory_total,2698242896},
  114. {memory_procs,1408734784},
  115. {memory_atoms,486706},
  116. {memory_bin,380825008},
  117. {memory_ets,408483456}],
  118. [{bytes_in,256851},
  119. {bytes_out,1202095},
  120. {gc_count,24423},
  121. {gc_words_reclaimed,4092612},
  122. {reductions,1850034},
  123. {scheduler_usage,[{1,0.46640942781698586},
  124. {2,0.5293768498814092},
  125. {3,0.441425019999723},
  126. {4,0.45550895378436373},
  127. {5,0.45318168320081786},
  128. {6,0.4627325387117833},
  129. {7,0.5144161001107628},
  130. {8,0.46406643808409137}]}]}
  131. ```