perf-bench.txt 4.3 KB

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