perf-bench.txt 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. perf-bench(1)
  2. =============
  3. NAME
  4. ----
  5. perf-bench - General framework for benchmark suites
  6. SYNOPSIS
  7. --------
  8. [verse]
  9. 'perf bench' [<common options>] <subsystem> <suite> [<options>]
  10. DESCRIPTION
  11. -----------
  12. This 'perf bench' command is a general framework for benchmark suites.
  13. COMMON OPTIONS
  14. --------------
  15. -r::
  16. --repeat=::
  17. Specify amount of times to repeat the run (default 10).
  18. -f::
  19. --format=::
  20. Specify format style.
  21. Current available format styles are:
  22. 'default'::
  23. Default style. This is mainly for human reading.
  24. ---------------------
  25. % perf bench sched pipe # with no style specified
  26. (executing 1000000 pipe operations between two tasks)
  27. Total time:5.855 sec
  28. 5.855061 usecs/op
  29. 170792 ops/sec
  30. ---------------------
  31. 'simple'::
  32. This simple style is friendly for automated
  33. processing by scripts.
  34. ---------------------
  35. % perf bench --format=simple sched pipe # specified simple
  36. 5.988
  37. ---------------------
  38. SUBSYSTEM
  39. ---------
  40. 'sched'::
  41. Scheduler and IPC mechanisms.
  42. 'mem'::
  43. Memory access performance.
  44. 'numa'::
  45. NUMA scheduling and MM benchmarks.
  46. 'futex'::
  47. Futex stressing benchmarks.
  48. 'all'::
  49. All benchmark subsystems.
  50. SUITES FOR 'sched'
  51. ~~~~~~~~~~~~~~~~~~
  52. *messaging*::
  53. Suite for evaluating performance of scheduler and IPC mechanisms.
  54. Based on hackbench by Rusty Russell.
  55. Options of *messaging*
  56. ^^^^^^^^^^^^^^^^^^^^^^
  57. -p::
  58. --pipe::
  59. Use pipe() instead of socketpair()
  60. -t::
  61. --thread::
  62. Be multi thread instead of multi process
  63. -g::
  64. --group=::
  65. Specify number of groups
  66. -l::
  67. --nr_loops=::
  68. Specify number of loops
  69. Example of *messaging*
  70. ^^^^^^^^^^^^^^^^^^^^^^
  71. ---------------------
  72. % perf bench sched messaging # run with default
  73. options (20 sender and receiver processes per group)
  74. (10 groups == 400 processes run)
  75. Total time:0.308 sec
  76. % perf bench sched messaging -t -g 20 # be multi-thread, with 20 groups
  77. (20 sender and receiver threads per group)
  78. (20 groups == 800 threads run)
  79. Total time:0.582 sec
  80. ---------------------
  81. *pipe*::
  82. Suite for pipe() system call.
  83. Based on pipe-test-1m.c by Ingo Molnar.
  84. Options of *pipe*
  85. ^^^^^^^^^^^^^^^^^
  86. -l::
  87. --loop=::
  88. Specify number of loops.
  89. Example of *pipe*
  90. ^^^^^^^^^^^^^^^^^
  91. ---------------------
  92. % perf bench sched pipe
  93. (executing 1000000 pipe operations between two tasks)
  94. Total time:8.091 sec
  95. 8.091833 usecs/op
  96. 123581 ops/sec
  97. % perf bench sched pipe -l 1000 # loop 1000
  98. (executing 1000 pipe operations between two tasks)
  99. Total time:0.016 sec
  100. 16.948000 usecs/op
  101. 59004 ops/sec
  102. ---------------------
  103. SUITES FOR 'mem'
  104. ~~~~~~~~~~~~~~~~
  105. *memcpy*::
  106. Suite for evaluating performance of simple memory copy in various ways.
  107. Options of *memcpy*
  108. ^^^^^^^^^^^^^^^^^^^
  109. -l::
  110. --size::
  111. Specify size of memory to copy (default: 1MB).
  112. Available units are B, KB, MB, GB and TB (case insensitive).
  113. -f::
  114. --function::
  115. Specify function to copy (default: default).
  116. Available functions are depend on the architecture.
  117. On x86-64, x86-64-unrolled, x86-64-movsq and x86-64-movsb are supported.
  118. -l::
  119. --nr_loops::
  120. Repeat memcpy invocation this number of times.
  121. -c::
  122. --cycles::
  123. Use perf's cpu-cycles event instead of gettimeofday syscall.
  124. *memset*::
  125. Suite for evaluating performance of simple memory set in various ways.
  126. Options of *memset*
  127. ^^^^^^^^^^^^^^^^^^^
  128. -l::
  129. --size::
  130. Specify size of memory to set (default: 1MB).
  131. Available units are B, KB, MB, GB and TB (case insensitive).
  132. -f::
  133. --function::
  134. Specify function to set (default: default).
  135. Available functions are depend on the architecture.
  136. On x86-64, x86-64-unrolled, x86-64-stosq and x86-64-stosb are supported.
  137. -l::
  138. --nr_loops::
  139. Repeat memset invocation this number of times.
  140. -c::
  141. --cycles::
  142. Use perf's cpu-cycles event instead of gettimeofday syscall.
  143. SUITES FOR 'numa'
  144. ~~~~~~~~~~~~~~~~~
  145. *mem*::
  146. Suite for evaluating NUMA workloads.
  147. SUITES FOR 'futex'
  148. ~~~~~~~~~~~~~~~~~~
  149. *hash*::
  150. Suite for evaluating hash tables.
  151. *wake*::
  152. Suite for evaluating wake calls.
  153. *wake-parallel*::
  154. Suite for evaluating parallel wake calls.
  155. *requeue*::
  156. Suite for evaluating requeue calls.
  157. *lock-pi*::
  158. Suite for evaluating futex lock_pi calls.
  159. SEE ALSO
  160. --------
  161. linkperf:perf[1]