perf-bench.txt 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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. 'all'::
  42. All benchmark subsystems.
  43. SUITES FOR 'sched'
  44. ~~~~~~~~~~~~~~~~~~
  45. *messaging*::
  46. Suite for evaluating performance of scheduler and IPC mechanisms.
  47. Based on hackbench by Rusty Russell.
  48. Options of *messaging*
  49. ^^^^^^^^^^^^^^^^^^^^^^
  50. -p::
  51. --pipe::
  52. Use pipe() instead of socketpair()
  53. -t::
  54. --thread::
  55. Be multi thread instead of multi process
  56. -g::
  57. --group=::
  58. Specify number of groups
  59. -l::
  60. --loop=::
  61. Specify number of loops
  62. Example of *messaging*
  63. ^^^^^^^^^^^^^^^^^^^^^^
  64. ---------------------
  65. % perf bench sched messaging # run with default
  66. options (20 sender and receiver processes per group)
  67. (10 groups == 400 processes run)
  68. Total time:0.308 sec
  69. % perf bench sched messaging -t -g 20 # be multi-thread, with 20 groups
  70. (20 sender and receiver threads per group)
  71. (20 groups == 800 threads run)
  72. Total time:0.582 sec
  73. ---------------------
  74. *pipe*::
  75. Suite for pipe() system call.
  76. Based on pipe-test-1m.c by Ingo Molnar.
  77. Options of *pipe*
  78. ^^^^^^^^^^^^^^^^^
  79. -l::
  80. --loop=::
  81. Specify number of loops.
  82. Example of *pipe*
  83. ^^^^^^^^^^^^^^^^^
  84. ---------------------
  85. % perf bench sched pipe
  86. (executing 1000000 pipe operations between two tasks)
  87. Total time:8.091 sec
  88. 8.091833 usecs/op
  89. 123581 ops/sec
  90. % perf bench sched pipe -l 1000 # loop 1000
  91. (executing 1000 pipe operations between two tasks)
  92. Total time:0.016 sec
  93. 16.948000 usecs/op
  94. 59004 ops/sec
  95. ---------------------
  96. SUITES FOR 'mem'
  97. ~~~~~~~~~~~~~~~~
  98. *memcpy*::
  99. Suite for evaluating performance of simple memory copy in various ways.
  100. Options of *memcpy*
  101. ^^^^^^^^^^^^^^^^^^^
  102. -l::
  103. --length::
  104. Specify length of memory to copy (default: 1MB).
  105. Available units are B, KB, MB, GB and TB (case insensitive).
  106. -r::
  107. --routine::
  108. Specify routine to copy (default: default).
  109. Available routines are depend on the architecture.
  110. On x86-64, x86-64-unrolled, x86-64-movsq and x86-64-movsb are supported.
  111. -i::
  112. --iterations::
  113. Repeat memcpy invocation this number of times.
  114. -c::
  115. --cycle::
  116. Use perf's cpu-cycles event instead of gettimeofday syscall.
  117. -o::
  118. --only-prefault::
  119. Show only the result with page faults before memcpy.
  120. -n::
  121. --no-prefault::
  122. Show only the result without page faults before memcpy.
  123. *memset*::
  124. Suite for evaluating performance of simple memory set in various ways.
  125. Options of *memset*
  126. ^^^^^^^^^^^^^^^^^^^
  127. -l::
  128. --length::
  129. Specify length of memory to set (default: 1MB).
  130. Available units are B, KB, MB, GB and TB (case insensitive).
  131. -r::
  132. --routine::
  133. Specify routine to set (default: default).
  134. Available routines are depend on the architecture.
  135. On x86-64, x86-64-unrolled, x86-64-stosq and x86-64-stosb are supported.
  136. -i::
  137. --iterations::
  138. Repeat memset invocation this number of times.
  139. -c::
  140. --cycle::
  141. Use perf's cpu-cycles event instead of gettimeofday syscall.
  142. -o::
  143. --only-prefault::
  144. Show only the result with page faults before memset.
  145. -n::
  146. --no-prefault::
  147. Show only the result without page faults before memset.
  148. SEE ALSO
  149. --------
  150. linkperf:perf[1]