Skip to content

Instantly share code, notes, and snippets.

View mmgaggle's full-sized avatar

Kyle Bader mmgaggle

View GitHub Profile
#!/usr/local/bin/Rscript
filenames <- list.files("./",pattern="output*",full.names=TRUE)
files <- lapply(filenames, function(filename){ read.csv(file=filename,sep=';',stringsAsFactors=FALSE,skip=4) })
post_ramp_subsets <- lapply(files, function(file) { subset(file,file[50]>=60000) })
results <- lapply(post_ramp_subsets, function(thread_subset) {
threads <- unique(thread_subset[,3])
thread_subsets <- lapply(threads, function(thread){ subset(thread_subset,thread_subset[,3]==thread) })
means <- lapply(thread_subsets, function(thread_subset){ mean(thread_subset[,49]) })
thread_sum <- Reduce("+",means)
#!/usr/local/bin/Rscript
library(zoo)
multmerge = function(mypath){
filenames=list.files(path=mypath, full.names=TRUE)
datalist = lapply(filenames, function(x){read.zoo(file=x,sep=',',header=T)})
Reduce(function(x,y) {merge(x,y)}, datalist)
}
merge = multmerge("merge/merge")
#define _GNU_SOURCE
#define O_DIRECT 00040000ULL
#define O_ATOMIC 040000000ULL
#include<stdio.h>
#include <unistd.h>
#include <fcntl.h>
int main ()
{
diff --git a/benchmark/rbdfio.py b/benchmark/rbdfio.py
index 6b6f1e2..c2e5d8a 100644
--- a/benchmark/rbdfio.py
+++ b/benchmark/rbdfio.py
@@ -76,7 +76,7 @@ class RbdFio(Benchmark):
# populate the fio files
logger.info('Attempting to populating fio files...')
- pre_cmd = 'sudo %s --ioengine=%s --rw=write --numjobs=%s --bs=4M --size %dM %s > /dev/null' % (self.cmd_path, self.ioengine, self.numjobs, self.vol_size*0.9, self.names)
+ pre_cmd = 'sudo %s --ioengine=%s --rw=write --numjobs=%s --bs=4M --size %dM %s > /dev/null' % (self.cmd_path, self.ioengine, self.numjobs, self.vol_size*0.9/self.concurrent_procs, self.names)
cluster:
head: "cbt"
clients: ["client1","client2","client3"]
osds: ["osd1","osd2","osd3"]
mons: ["mon1","mon2","mon3"]
osds_per_node: 1
fs: xfs
mkfs_opts: -f -i size=2048 -n size=64k
mount_opts: -o inode64,noatime,logbsize=256k
conf_file: /etc/ceph/ceph.conf
#define _GNU_SOURCE
#include<stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
int main ()
{
FILE *fp;
<disk type='network' device='disk'>
<driver name='qemu'/>
<auth username='libvirt'>
<secret type='ceph' uuid='d41d3f5b-b437-4684-8e1c-65d365d00046'/>
</auth>
<source protocol='rbd' name='cbtmysql-pool/centos7nodexx'>
<host name='172.18.174.21' port='6789'/>
</source>
<target dev='vdb' bus='scsi'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
@mmgaggle
mmgaggle / fio.sh
Last active August 29, 2015 14:27
#!/bin/bash
uuid=$(uuidgen)
mkdir -p /tmp/${uuid}.out/collectl
echo " [+] starting collectl"
sudo collectl -s+mYZ -i 1:10 -F0 -f /tmp/${uuid}.out/collectl
echo " [+] waiting 60s to establish baseline"
sleep 60
echo " [+] starting single disk fio"
for i in $( ls /dev/disk/by-path/pci-0000\:03\:00.0-sas-0x5000c500587* | head -n1)
[global]
...
[mon]
....
[client.$(name)]
rbd cache = true
...
@mmgaggle
mmgaggle / gist:7953750
Created December 13, 2013 23:54
numa-maps-summary
kyle@synapse ~ $ > ./numa-maps-summary.pl < gistfile1.txt
N0 : 41397 ( 0.16 GB)
N1 : 20625 ( 0.08 GB)
active : 48558 ( 0.19 GB)
anon : 60595 ( 0.23 GB)
dirty : 60413 ( 0.23 GB)
mapmax : 924 ( 0.00 GB)
mapped : 1432 ( 0.01 GB)
swapcache : 185 ( 0.00 GB)