Skip to content

Instantly share code, notes, and snippets.

View mfleming's full-sized avatar

Matt Fleming mfleming

View GitHub Profile
FROM ubuntu AS build
RUN apt-get update
RUN apt-get install -y git-core make gcc make flex bison pkg-config
RUN git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
RUN NO_LIBTRACEEVENT=1 NO_JEVENTS=1 NO_LIBELF=1 make -C linux/tools/perf
FROM ubuntu
COPY --from=build linux/tools/perf/perf /bin/perf
ENTRYPOINT ["/bin/perf", "bench", "sched", "pipe"]
#!/usr/bin/env python3
#
# Build three lists of integers with NUM_ELEMS elements where each element is a random integer in
# the range [0,9223372036854775807]. Then measure the time to iterate over all three lists in a
# O(n^3) loop.
import random
import sys
import time
#!/usr/bin/env python3
#
# Copyright 2021 Matt Fleming
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#!/bin/bash
mins=10
echo "Collecting metrics for $mins minutes..."
dstat_outfile="dstat-`hostname`.csv"
echo "Writing dstat output to $dstat_outfile"
#dstat --output $dstat_outfile -pmgsdr --disk-util -nyct -C $(seq --separator=, 0 `grep -c processor /proc/cpuinfo`),total 1 $mins*60 &
dstat --output "dstat-`hostname`.csv" -pmgsdr --disk-util --disk-avgqu --disk-avgrq --disk-svctm --disk-tps --disk-wait -nyct -C $(seq --separator=, 0 `grep -c processor /proc/cpuinfo`),total 1 $mins*60 &
LOCAL_READ_LAT
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
2244.99 2001.08 2094.19 2091.63 2177.90 2135.08 2070.21 2209.53 2555.59 2210.66 2617.31 2380.47 2079.81 1940.16 2167.33 2000.25 2282.22 2138.76 2174.56 2323.89 2337.70 2103.62 2662.23 2328.45 2348.95 2094.92 2090.17 2082.72 2455.15 2375.50
2240.54 2058.54 2089.79 2076.53 2226.89 2089.16 2144.17 2252.17 2561.54 2126.63 2620.43 2446.84 2046.34 1945.04 2208.63 2077.38 2259.14 2151.39 2166.32 2284.87 2356.72 2174.22 2732.14 2343.50 2339.06 2173.02 2253.94 2229.47 2482.65 2372.21
2228.58 2031.92 2085.99 2029.90 2203.40 2043.77 2240.10 2283.07 2540.45 2069.83 2597.42 2408.73 2038.06 1937.33 2198.60 2139.98 2268.66 2202.33 2120.18 2233.41 2285.04 2119.7
LOCAL_WRITE_LAT
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
84.80 80.70 84.07 80.62 82.38 80.59 79.77 85.54 96.62 81.12 95.94 95.64 80.59 80.50 82.54 80.38 85.66 80.80 82.34 83.12 82.20 80.13 87.56 81.72 84.81 81.30 81.46 80.29 80.53 79.18
82.50 81.62 83.31 80.56 81.44 80.42 80.52 83.79 95.82 80.17 94.71 95.12 80.24 80.09 81.43 80.17 83.16 80.56 81.34 81.42 81.59 79.93 85.47 81.29 82.16 81.15 82.27 81.36 80.58 78.91
82.49 80.91 82.97 80.47 81.20 80.42 81.84 84.99 95.82 79.83 94.72 94.58 80.28 80.09 81.15 81.55 82.12 81.72 81.27 81.20 81.58 80.
COORD_READ_LAT
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
6464.33 5916.96 6638.47 6510.93 7873.74 6877.09 7386.31 6761.11 7152.74 8009.55 8056.09 7940.02 6305.71 7426.24 7559.26 6905.72 7268.96 7287.93 7752.62 7066.10 7825.82 6693.06 9337.75 6572.58 7178.10 6658.93 6723.55 6366.19 6703.86 6932.12
6475.93 6644.72 6438.52 6982.24 7793.96 7323.42 7836.99 7089.70 8184.44 7429.05 9102.36 8066.60 6529.72 7417.02 7249.17 7135.08 7531.55 7157.15 7466.89 7095.56 8080.41 6935.30 8786.00 7061.77 7383.55 7469.78 7743.11 7083.60 6820.78 6874.24
6538.87 6008.39 6441.62 6920.38 7608.94 6901.87 7525.84 7537.04 7116.79 7036.94 7961.29 7225.64 6398.30 6927.24 6317.50 7044.15 7178.79 7082.67 7066.30 6598.25 8098.58 6602.6
COORD_WRITE_LAT
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
5542.47 4922.48 5001.43 6273.38 6254.66 6542.20 6649.51 5872.03 7141.65 6697.36 8171.66 7944.98 6181.90 6476.50 7006.39 6407.96 6796.33 6319.05 6846.58 6317.67 6920.60 6291.46 9227.47 6146.82 6789.09 6915.61 6217.61 6291.46 6271.48 6213.78
5397.41 5655.43 5061.05 6496.61 6407.96 6547.21 7249.64 6238.36 7773.93 6227.26 9047.71 7843.35 6594.38 6682.45 6543.11 6951.67 6984.87 6765.81 6750.21 6437.77 7340.03 6710.89 7444.89 6375.34 7107.02 6656.18 7340.03 6815.74 6558.04 6188.08
5115.78 5056.84 5082.06 6110.67 6193.91 5806.00 7295.41 6045.70 7319.47 5799.27 8609.36 7562.46 6005.48 6075.57 5744.37 7017.39 6943.90 7100.36 6214.73 5856.68 6269.61 6348.
#!/bin/bash
mins=60
echo "Collecting metrics for $mins minutes..."
dstat_outfile="dstat-`hostname`.csv"
echo "Writing dstat output to $dstat_outfile"
dstat --output $dstat_outfile -pmgsdr --disk-util -nyct -C $(seq --separator=, 0 `grep -c processor /proc/cpuinfo`),total 1 $mins &
latency_outfile="jmx-lat-`hostname`.csv"
This file has been truncated, but you can view the full file.
clear_user: file format elf64-x86-64
Disassembly of section .init:
0000000000005718 <_init>:
5718: 48 83 ec 08 sub $0x8,%rsp
571c: 48 8b 05 c5 08 25 00 mov 0x2508c5(%rip),%rax # 255fe8 <__gmon_start__>
5723: 48 85 c0 test %rax,%rax