This is a bit long, but it shows the results of doing some performance
measurement of the pmlogger.
First a configuration is created, only for the target metrics,
e.g. sar. Second the benchmark is run for the specified interval,
1800 seconds in this case. The benchmark counts how many iterations
it runs for that time interval. Then the benchmark is run for that
many iterations simultaneously with pmlogger, which is using an
interval of 1 for 1800 seconds. We wait for both to complete. Next,
similarly, the benchmark is run simultaneously with the tool being
measured, e.g. sar, for an interval of 1 for 1800 seconds. The results
are shown for sar, vmstat, mpstat, and atop
+ /usr/local/libexec/pcp/bin/pmlogconf tmp.conf
+ perf stat ./bench.x -t 1800
Performance counter stats for './bench.x -t 1800':
1791113.938081 task-clock # 0.995 CPUs utilized
197,363 context-switches # 0.110 K/sec
1,907 cpu-migrations # 0.001 K/sec
2,280,748 page-faults # 0.001 M/sec
6,279,172,585,595 cycles # 3.506 GHz
4,454,798,347,513 stalled-cycles-frontend # 70.95% frontend cycles
idle
<not supported> stalled-cycles-backend
2,666,416,999,672 instructions # 0.42 insns per cycle
# 1.67 stalled cycles
per insn
296,771,108,241 branches # 165.691 M/sec
7,469,344,795 branch-misses # 2.52% of all branches
1800.483519233 seconds time elapsed
+ perf stat ./bench.x -n 58382
+ perf stat pmlogger -s 1800sec -c tmp.conf ,tstpmlogconf
Performance counter stats for './bench.x -n 58382':
1794363.586682 task-clock # 0.996 CPUs utilized
184,218 context-switches # 0.103 K/sec
525 cpu-migrations # 0.000 K/sec
2,280,749 page-faults # 0.001 M/sec
6,271,486,162,215 cycles # 3.495 GHz
4,447,205,814,576 stalled-cycles-frontend # 70.91% frontend cycles
idle
<not supported> stalled-cycles-backend
2,665,279,584,673 instructions # 0.42 insns per cycle
# 1.67 stalled cycles
per insn
296,551,093,582 branches # 165.268 M/sec
7,451,988,117 branch-misses # 2.51% of all branches
1801.213657141 seconds time elapsed
Performance counter stats for 'pmlogger -s 1800sec -c tmp.conf
,tstpmlogconf':
369.738871 task-clock # 0.000 CPUs utilized
4,662 context-switches # 0.013 M/sec
624 cpu-migrations # 0.002 M/sec
1,771 page-faults # 0.005 M/sec
1,227,494,241 cycles # 3.320 GHz
1,021,336,694 stalled-cycles-frontend # 83.21% frontend cycles
idle
<not supported> stalled-cycles-backend
416,837,344 instructions # 0.34 insns per cycle
# 2.45 stalled cycles
per insn
82,243,704 branches # 222.437 M/sec
5,005,521 branch-misses # 6.09% of all branches
1801.681621380 seconds time elapsed
+ perf stat ./bench.x -n 58382
+ perf stat sar -o ,sar 1 1800
Performance counter stats for './bench.x -n 58382':
1789560.223457 task-clock # 0.995 CPUs utilized
189,419 context-switches # 0.106 K/sec
896 cpu-migrations # 0.001 K/sec
2,280,754 page-faults # 0.001 M/sec
6,278,385,723,085 cycles # 3.508 GHz
4,455,510,741,060 stalled-cycles-frontend # 70.97% frontend cycles
idle
<not supported> stalled-cycles-backend
2,665,602,509,100 instructions # 0.42 insns per cycle
# 1.67 stalled cycles
per insn
296,611,959,404 branches # 165.746 M/sec
7,441,953,953 branch-misses # 2.51% of all branches
1798.337257278 seconds time elapsed
+ wait 8021
Performance counter stats for 'sar -o ,sar 1 1800':
4891.621116 task-clock # 0.003 CPUs utilized
20,452 context-switches # 0.004 M/sec
1,283 cpu-migrations # 0.262 K/sec
126,834 page-faults # 0.026 M/sec
16,506,832,804 cycles # 3.375 GHz
10,739,847,536 stalled-cycles-frontend # 65.06% frontend cycles
idle
<not supported> stalled-cycles-backend
13,604,226,712 instructions # 0.82 insns per cycle
# 0.79 stalled cycles
per insn
2,867,214,919 branches # 586.148 M/sec
52,007,475 branch-misses # 1.81% of all branches
1814.447569345 seconds time elapsed
mpstat --------------------------------------------------
Creating config file "tmp.conf" using default settings ...
........................................
58710
Performance counter stats for './bench.x -t 1800':
1794014.642909 task-clock # 0.996 CPUs utilized
186,752 context-switches # 0.104 K/sec
1,169 cpu-migrations # 0.001 K/sec
2,293,558 page-faults # 0.001 M/sec
6,300,861,070,404 cycles # 3.512 GHz
4,467,302,014,277 stalled-cycles-frontend # 70.90% frontend cycles
idle
<not supported> stalled-cycles-backend
2,680,483,571,984 instructions # 0.43 insns per cycle
# 1.67 stalled cycles
per insn
298,256,099,683 branches # 166.251 M/sec
7,481,561,526 branch-misses # 2.51% of all branches
1800.460701108 seconds time elapsed
58710
Performance counter stats for './bench.x -n 58710':
1791001.182073 task-clock # 0.997 CPUs utilized
181,735 context-switches # 0.101 K/sec
147 cpu-migrations # 0.000 K/sec
2,293,561 page-faults # 0.001 M/sec
6,294,394,339,250 cycles # 3.514 GHz
4,460,471,460,136 stalled-cycles-frontend # 70.86% frontend cycles
idle
<not supported> stalled-cycles-backend
2,679,809,072,633 instructions # 0.43 insns per cycle
# 1.66 stalled cycles
per insn
298,134,054,814 branches # 166.462 M/sec
7,473,374,094 branch-misses # 2.51% of all branches
1797.020349093 seconds time elapsed
Performance counter stats for 'pmlogger -s 1800sec -c tmp.conf
,tstpmlogconf':
370.733877 task-clock # 0.000 CPUs utilized
4,664 context-switches # 0.013 M/sec
276 cpu-migrations # 0.744 K/sec
1,762 page-faults # 0.005 M/sec
1,218,486,734 cycles # 3.287 GHz
1,012,453,623 stalled-cycles-frontend # 83.09% frontend cycles
idle
<not supported> stalled-cycles-backend
420,291,962 instructions # 0.34 insns per cycle
# 2.41 stalled cycles
per insn
82,786,085 branches # 223.303 M/sec
5,075,540 branch-misses # 6.13% of all branches
1801.766466483 seconds time elapsed
58710
Performance counter stats for './bench.x -n 58710':
1788966.275959 task-clock # 0.996 CPUs utilized
182,991 context-switches # 0.102 K/sec
419 cpu-migrations # 0.000 K/sec
2,293,558 page-faults # 0.001 M/sec
6,289,804,539,602 cycles # 3.516 GHz
4,454,709,912,751 stalled-cycles-frontend # 70.82% frontend cycles
idle
<not supported> stalled-cycles-backend
2,680,142,285,742 instructions # 0.43 insns per cycle
# 1.66 stalled cycles
per insn
298,195,895,062 branches # 166.686 M/sec
7,471,208,294 branch-misses # 2.51% of all branches
1795.434360344 seconds time elapsed
Performance counter stats for 'mpstat -A 1 1800':
674.438322 task-clock # 0.000 CPUs utilized
1,843 context-switches # 0.003 M/sec
227 cpu-migrations # 0.337 K/sec
9,256 page-faults # 0.014 M/sec
2,276,650,649 cycles # 3.376 GHz
1,328,765,737 stalled-cycles-frontend # 58.36% frontend cycles
idle
<not supported> stalled-cycles-backend
2,343,292,330 instructions # 1.03 insns per cycle
# 0.57 stalled cycles
per insn
469,345,160 branches # 695.905 M/sec
10,639,887 branch-misses # 2.27% of all branches
1800.387615509 seconds time elapsed
vmstat --------------------------------------------------
Creating config file "tmp.conf" using default settings ...
........................................
^[q57353
Performance counter stats for './bench.x -t 1800':
1793437.151483 task-clock # 0.996 CPUs utilized
192,241 context-switches # 0.107 K/sec
4,807 cpu-migrations # 0.003 K/sec
2,240,550 page-faults # 0.001 M/sec
6,205,222,526,412 cycles # 3.460 GHz
4,412,366,591,878 stalled-cycles-frontend # 71.11% frontend cycles
idle
<not supported> stalled-cycles-backend
2,618,766,255,466 instructions # 0.42 insns per cycle
# 1.68 stalled cycles
per insn
291,409,027,988 branches # 162.486 M/sec
7,421,111,132 branch-misses # 2.55% of all branches
1800.242833327 seconds time elapsed
Performance counter stats for 'pmlogger -s 1800sec -c tmp.conf
,tstpmlogconf':
376.686346 task-clock # 0.000 CPUs utilized
4,424 context-switches # 0.012 M/sec
581 cpu-migrations # 0.002 M/sec
1,749 page-faults # 0.005 M/sec
1,257,949,530 cycles # 3.340 GHz
1,059,894,186 stalled-cycles-frontend # 84.26% frontend cycles
idle
<not supported> stalled-cycles-backend
403,195,459 instructions # 0.32 insns per cycle
# 2.63 stalled cycles
per insn
79,897,174 branches # 212.105 M/sec
4,843,769 branch-misses # 6.06% of all branches
1800.583603756 seconds time elapsed
57353
Performance counter stats for './bench.x -n 57353':
1786096.774466 task-clock # 0.989 CPUs utilized
183,471 context-switches # 0.103 K/sec
776 cpu-migrations # 0.000 K/sec
2,240,554 page-faults # 0.001 M/sec
6,177,115,984,526 cycles # 3.458 GHz
4,386,856,273,342 stalled-cycles-frontend # 71.02% frontend cycles
idle
<not supported> stalled-cycles-backend
2,618,161,899,279 instructions # 0.42 insns per cycle
# 1.68 stalled cycles
per insn
291,312,437,163 branches # 163.100 M/sec
7,313,057,350 branch-misses # 2.51% of all branches
1806.339979147 seconds time elapsed
57353
Performance counter stats for './bench.x -n 57353':
1752811.726173 task-clock # 0.996 CPUs utilized
179,358 context-switches # 0.102 K/sec
779 cpu-migrations # 0.000 K/sec
2,240,555 page-faults # 0.001 M/sec
6,171,960,899,181 cycles # 3.521 GHz
4,381,060,251,304 stalled-cycles-frontend # 70.98% frontend cycles
idle
<not supported> stalled-cycles-backend
2,617,898,371,062 instructions # 0.42 insns per cycle
# 1.67 stalled cycles
per insn
291,245,474,524 branches # 166.159 M/sec
7,307,763,498 branch-misses # 2.51% of all branches
1759.088424213 seconds time elapsed
Performance counter stats for 'vmstat 1 1800':
228.950861 task-clock # 0.000 CPUs utilized
1,807 context-switches # 0.008 M/sec
11 cpu-migrations # 0.048 K/sec
204 page-faults # 0.891 K/sec
750,877,617 cycles # 3.280 GHz
508,007,024 stalled-cycles-frontend # 67.66% frontend cycles
idle
<not supported> stalled-cycles-backend
581,679,800 instructions # 0.77 insns per cycle
# 0.87 stalled cycles
per insn
124,790,921 branches # 545.055 M/sec
4,924,283 branch-misses # 3.95% of all branches
1799.489218453 seconds time elapsed
atop --------------------------------------------------
Creating config file "tmp.conf" using default settings ...
........................................
58654
Performance counter stats for './bench.x -t 1800':
1793957.276463 task-clock # 0.997 CPUs utilized
186,172 context-switches # 0.104 K/sec
665 cpu-migrations # 0.000 K/sec
2,291,371 page-faults # 0.001 M/sec
6,282,072,750,044 cycles # 3.502 GHz
4,449,712,224,957 stalled-cycles-frontend # 70.83% frontend cycles
idle
<not supported> stalled-cycles-backend
2,677,748,437,567 instructions # 0.43 insns per cycle
# 1.66 stalled cycles
per insn
297,940,745,880 branches # 166.080 M/sec
7,446,622,446 branch-misses # 2.50% of all branches
1799.850253865 seconds time elapsed
Performance counter stats for 'pmlogger -s 1800sec -c tmp.conf
,tstpmlogconf':
338.067761 task-clock # 0.000 CPUs utilized
4,624 context-switches # 0.014 M/sec
763 cpu-migrations # 0.002 M/sec
1,757 page-faults # 0.005 M/sec
1,119,030,826 cycles # 3.310 GHz
917,789,534 stalled-cycles-frontend # 82.02% frontend cycles
idle
<not supported> stalled-cycles-backend
410,974,211 instructions # 0.37 insns per cycle
# 2.23 stalled cycles
per insn
81,093,927 branches # 239.875 M/sec
4,934,869 branch-misses # 6.09% of all branches
1800.787169521 seconds time elapsed
58654
Performance counter stats for './bench.x -n 58654':
1795354.905513 task-clock # 0.996 CPUs utilized
183,121 context-switches # 0.102 K/sec
446 cpu-migrations # 0.000 K/sec
2,291,374 page-faults # 0.001 M/sec
6,283,075,881,561 cycles # 3.500 GHz
4,451,682,413,741 stalled-cycles-frontend # 70.85% frontend cycles
idle
<not supported> stalled-cycles-backend
2,677,584,013,263 instructions # 0.43 insns per cycle
# 1.66 stalled cycles
per insn
297,910,912,892 branches # 165.934 M/sec
7,442,396,972 branch-misses # 2.50% of all branches
1801.795037484 seconds time elapsed
Performance counter stats for 'atop 1 1800':
35249.007782 task-clock # 0.020 CPUs utilized
11,198 context-switches # 0.318 K/sec
1,932 cpu-migrations # 0.055 K/sec
1,800,773 page-faults # 0.051 M/sec
120,306,676,625 cycles # 3.413 GHz
67,894,370,624 stalled-cycles-frontend # 56.43% frontend cycles
idle
<not supported> stalled-cycles-backend
133,912,370,356 instructions # 1.11 insns per cycle
# 0.51 stalled cycles
per insn
29,168,680,766 branches # 827.504 M/sec
289,563,736 branch-misses # 0.99% of all branches
1799.678101214 seconds time elapsed
58654
Performance counter stats for './bench.x -n 58654':
1795060.341207 task-clock # 0.997 CPUs utilized
187,689 context-switches # 0.105 K/sec
1,201 cpu-migrations # 0.001 K/sec
2,291,373 page-faults # 0.001 M/sec
6,294,474,897,877 cycles # 3.507 GHz
4,462,798,686,224 stalled-cycles-frontend # 70.90% frontend cycles
idle
<not supported> stalled-cycles-backend
2,677,484,965,639 instructions # 0.43 insns per cycle
# 1.67 stalled cycles
per insn
297,892,369,583 branches # 165.951 M/sec
7,475,379,816 branch-misses # 2.51% of all branches
1801.156203535 seconds time elapsed
|