You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

168 lines
5.4 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. Benchmarks
  2. ======================
  3. Do we really need the benchmark? People always use benchmark to compare systems.
  4. But benchmarks are misleading. The resources, e.g., CPU, disk, memory, network,
  5. all matter a lot. And with Seaweed File System, single node vs multiple nodes,
  6. benchmarking on one machine vs several multiple machines, all matter a lot.
  7. Here is the steps on how to run benchmark if you really need some numbers.
  8. Unscientific Single machine benchmarking
  9. ##################################################
  10. I start weed servers in one console for simplicity. Better run servers on different consoles.
  11. For more realistic tests, please start them on different machines.
  12. .. code-block:: bash
  13. # prepare directories
  14. mkdir 3 4 5
  15. # start 3 servers
  16. ./weed server -dir=./3 -master.port=9333 -volume.port=8083 &
  17. ./weed volume -dir=./4 -port=8084 &
  18. ./weed volume -dir=./5 -port=8085 &
  19. ./weed benchmark -server=localhost:9333
  20. What does the test do?
  21. #############################
  22. By default, the benchmark command would start writing 1 million files, each having 1KB size, uncompressed.
  23. For each file, one request is sent to assign a file key, and a second request is sent to post the file to the volume server.
  24. The written file keys are stored in a temp file.
  25. Then the benchmark command would read the list of file keys, randomly read 1 million files.
  26. For each volume, the volume id is cached, so there is several request to lookup the volume id,
  27. and all the rest requests are to get the file content.
  28. Many options are options are configurable. Please check the help content:
  29. .. code-block:: bash
  30. ./weed benchmark -h
  31. Different Benchmark Target
  32. ###############################
  33. The default "weed benchmark" uses 1 million 1KB file. This is to stress the number of files per second.
  34. Increasing the file size to 100KB or more can show much larger number of IO throughput in KB/second.
  35. My own unscientific single machine results
  36. ###################################################
  37. My Own Results on Mac Book with Solid State Disk, CPU: 1 Intel Core i7 at 2.2GHz.
  38. .. code-block:: bash
  39. Write 1 million 1KB file:
  40. Concurrency Level: 64
  41. Time taken for tests: 182.456 seconds
  42. Complete requests: 1048576
  43. Failed requests: 0
  44. Total transferred: 1073741824 bytes
  45. Requests per second: 5747.01 [#/sec]
  46. Transfer rate: 5747.01 [Kbytes/sec]
  47. Connection Times (ms)
  48. min avg max std
  49. Total: 0.3 10.9 430.9 5.7
  50. Percentage of the requests served within a certain time (ms)
  51. 50% 10.2 ms
  52. 66% 12.0 ms
  53. 75% 12.6 ms
  54. 80% 12.9 ms
  55. 90% 14.0 ms
  56. 95% 14.9 ms
  57. 98% 16.2 ms
  58. 99% 17.3 ms
  59. 100% 430.9 ms
  60. Randomly read 1 million files:
  61. Concurrency Level: 64
  62. Time taken for tests: 80.732 seconds
  63. Complete requests: 1048576
  64. Failed requests: 0
  65. Total transferred: 1073741824 bytes
  66. Requests per second: 12988.37 [#/sec]
  67. Transfer rate: 12988.37 [Kbytes/sec]
  68. Connection Times (ms)
  69. min avg max std
  70. Total: 0.0 4.7 254.3 6.3
  71. Percentage of the requests served within a certain time (ms)
  72. 50% 2.6 ms
  73. 66% 2.9 ms
  74. 75% 3.7 ms
  75. 80% 4.7 ms
  76. 90% 10.3 ms
  77. 95% 16.6 ms
  78. 98% 26.3 ms
  79. 99% 34.8 ms
  80. 100% 254.3 ms
  81. My own replication 001 single machine results
  82. ##############################################
  83. Create benchmark volumes directly
  84. .. code-block:: bash
  85. curl "http://localhost:9333/vol/grow?collection=benchmark&count=3&replication=001&pretty=y"
  86. # Later, after finishing the test, remove the benchmark collection
  87. curl "http://localhost:9333/col/delete?collection=benchmark&pretty=y"
  88. Write 1million 1KB files results:
  89. Concurrency Level: 64
  90. Time taken for tests: 174.949 seconds
  91. Complete requests: 1048576
  92. Failed requests: 0
  93. Total transferred: 1073741824 bytes
  94. Requests per second: 5993.62 [#/sec]
  95. Transfer rate: 5993.62 [Kbytes/sec]
  96. Connection Times (ms)
  97. min avg max std
  98. Total: 0.3 10.4 296.6 4.4
  99. Percentage of the requests served within a certain time (ms)
  100. 50% 9.7 ms
  101. 66% 11.5 ms
  102. 75% 12.1 ms
  103. 80% 12.4 ms
  104. 90% 13.4 ms
  105. 95% 14.3 ms
  106. 98% 15.5 ms
  107. 99% 16.7 ms
  108. 100% 296.6 ms
  109. Randomly read results:
  110. Concurrency Level: 64
  111. Time taken for tests: 53.987 seconds
  112. Complete requests: 1048576
  113. Failed requests: 0
  114. Total transferred: 1073741824 bytes
  115. Requests per second: 19422.81 [#/sec]
  116. Transfer rate: 19422.81 [Kbytes/sec]
  117. Connection Times (ms)
  118. min avg max std
  119. Total: 0.0 3.0 256.9 3.8
  120. Percentage of the requests served within a certain time (ms)
  121. 50% 2.7 ms
  122. 66% 2.9 ms
  123. 75% 3.2 ms
  124. 80% 3.5 ms
  125. 90% 4.4 ms
  126. 95% 5.6 ms
  127. 98% 7.4 ms
  128. 99% 9.4 ms
  129. 100% 256.9 ms
  130. How can the replication 001 writes faster than no replication?
  131. I could not tell. Very likely, the computer was in turbo mode.
  132. I can not reproduce it consistently either. Posted the number here just to illustrate that number lies.
  133. Don't quote on the exact number, just get an idea of the performance would be good enough.