Skip to content

Instantly share code, notes, and snippets.

View mfleming's full-sized avatar

Matt Fleming mfleming

View GitHub Profile
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
//
// Compile with:
//
// g++ clear_user.cc -std=c++11 -isystem <path to googlebenchmark>/include \
// -L<path to googlebenchmark>/build/src -lbenchmark -lpthread -o clear_user
//
#include <benchmark/benchmark.h>
#define BUF_SIZE (64*1024)
/*
* Copyright 2020 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
*
* Unless required by applicable law or agreed to in writing, software
@mfleming
mfleming / nop.c
Last active May 31, 2017 11:23
LMBench nop
void
do_int64_mul(unsigned int iterations, unsigned int N)
{
int64_t r = (int64_t)N + 37420;
r += (int64_t)(N + 6)<<32;
while (iterations-- > 0)
;
use_int((int)r);
@mfleming
mfleming / foo.c
Last active May 29, 2017 20:42
LMBench ops model example
#include <stdint.h>
#define TEN(a) a a a a a a a a a a
static volatile uint64_t use_result_dummy;
void
use_int(int result) { use_result_dummy += result; }
void
do_int64_mul(unsigned int iterations, unsigned int N)
diff -r 02bc14ed1569 mh.c
--- a/mh.c Tue Dec 08 09:12:09 2015 -0800
+++ b/mh.c Sun Jan 15 21:35:48 2017 +0000
@@ -1908,6 +1908,7 @@
struct maildir *md; /* list of messages in the mailbox */
struct maildir **last, *p;
int i;
+ int count = 0;
HASH *fnames; /* hash table for quickly looking up the base filename
for a maildir message */
struct grub_cpu_idt_descriptor
{
grub_uint16_t limit;
grub_uint32_t base;
} __attribute__ ((packed));
static struct grub_cpu_idt_descriptor no_idt __attribute__((aligned(16)));
/* The main routine. */
void __attribute__ ((noreturn))