2018-12-12 12:36:56 +00:00
|
|
|
#!/usr/bin/env Rscript
|
|
|
|
|
|
|
|
library(sqldf)
|
|
|
|
library(plyr)
|
|
|
|
library(plot3D)
|
|
|
|
library(ggplot2)
|
|
|
|
|
|
|
|
|
|
|
|
args = commandArgs(trailingOnly=TRUE)
|
|
|
|
print(args)
|
|
|
|
if (2 != length(args)) {
|
|
|
|
print("Requires 2 parameters)")
|
|
|
|
q()
|
|
|
|
}
|
|
|
|
|
|
|
|
file_db = args[1]
|
|
|
|
folder_out = args[2]
|
|
|
|
print(file_db)
|
|
|
|
|
|
|
|
make_facet_label <- function(variable, value){
|
|
|
|
return(paste0(value, " KiB"))
|
|
|
|
}
|
|
|
|
|
2018-12-14 18:00:16 +00:00
|
|
|
to_fn_str <- function(name) {
|
|
|
|
tolower(chartr(' ', '_', name))
|
|
|
|
}
|
|
|
|
|
2018-12-12 12:36:56 +00:00
|
|
|
|
|
|
|
#connection = dbConnect(SQLite(), dbname='results.ddnime.db')
|
|
|
|
print(file_db)
|
|
|
|
connection = dbConnect(SQLite(), dbname=file_db)
|
|
|
|
|
2018-12-14 18:00:16 +00:00
|
|
|
dbdata = dbGetQuery(connection,'select * from p' )
|
2018-12-12 12:36:56 +00:00
|
|
|
dbdata[,"blocksize"] = dbdata$t
|
|
|
|
|
|
|
|
|
|
|
|
summary(dbdata)
|
|
|
|
|
|
|
|
nn_lab <- sprintf(fmt="NN=%d", unique(dbdata$nn))
|
|
|
|
names(nn_lab) <- unique(dbdata$nn)
|
|
|
|
ppn_lab <- sprintf(fmt="PPN=%d", unique(dbdata$ppn))
|
|
|
|
names(ppn_lab) <- unique(dbdata$ppn)
|
|
|
|
breaks <- c(unique(dbdata$blocksize))
|
|
|
|
|
|
|
|
|
|
|
|
dbdata$lab_access <- dbdata$access
|
|
|
|
dbdata$lab_access[dbdata$lab_access == "write"] = "Write"
|
|
|
|
dbdata$lab_access[dbdata$lab_access == "read"] = "Read"
|
|
|
|
|
2018-12-14 18:00:16 +00:00
|
|
|
dbdata$lab_fs <- dbdata$fs
|
|
|
|
dbdata$lab_fs[dbdata$lab_fs == "gpfs"] = "IBM Spectrum Scale"
|
|
|
|
dbdata$lab_fs[dbdata$lab_fs == "fuse"] = "IME FUSE"
|
|
|
|
dbdata$lab_fs[dbdata$lab_fs == "ime"] = "IME"
|
2018-12-12 12:36:56 +00:00
|
|
|
|
2018-12-14 18:00:16 +00:00
|
|
|
dbdata$lab_count <- sprintf('Iteration %d', dbdata$count)
|
2018-12-12 12:36:56 +00:00
|
|
|
|
|
|
|
|
2018-12-14 18:00:16 +00:00
|
|
|
max_y=3500
|
2018-12-12 12:36:56 +00:00
|
|
|
|
2018-12-14 18:00:16 +00:00
|
|
|
for (lab_fs in unique(dbdata$lab_fs)) {
|
2018-12-19 18:20:12 +00:00
|
|
|
for (scale in c("linear", "logarithmic")) {
|
|
|
|
#for (scale in c("linear")) {
|
2018-12-14 18:00:16 +00:00
|
|
|
|
|
|
|
p = ggplot(data=dbdata[dbdata$lab_fs==lab_fs,], aes(x=nn, y=bwMiB, colour=as.factor(blocksize/1024), group=blocksize), ymin=0) +
|
2018-12-12 12:36:56 +00:00
|
|
|
#aes(x=nn, y=bwMiB) +
|
2018-12-14 18:00:16 +00:00
|
|
|
ggtitle(sprintf("%s independent random access to a shared file with IOR", lab_fs)) +
|
2018-12-19 18:20:12 +00:00
|
|
|
#facet_grid(ppn ~ lab_access + lab_count, labeller = labeller(nn = as_labeller(nn_lab), ppn = as_labeller(ppn_lab))) +
|
|
|
|
facet_grid(ppn ~ lab_access, labeller = labeller(nn = as_labeller(nn_lab), ppn = as_labeller(ppn_lab))) +
|
2018-12-12 12:36:56 +00:00
|
|
|
xlab("Nodes") +
|
|
|
|
ylab("Performance in MiB/s") +
|
|
|
|
theme(axis.text.x=element_text(angle=90, hjust=0.95, vjust=0.5)) +
|
|
|
|
theme(legend.position="bottom") +
|
|
|
|
#scale_x_continuous(breaks = c(unique(data$nn))) +
|
|
|
|
scale_x_log10(breaks = c(unique(dbdata$nn))) +
|
|
|
|
scale_color_manual(name="Blocksize in KiB: ", values=c('#999999','#E69F00', '#56B4E9', '#000000'), breaks=sort(unique(dbdata$blocksize)/1024)) +
|
|
|
|
#stat_summary(fun.y="median", geom="line", aes(group=factor(blocksize))) +
|
|
|
|
stat_summary(fun.y="mean", geom="line", aes(group=factor(blocksize))) +
|
2018-12-14 18:00:16 +00:00
|
|
|
#ylim(0, max_y) +
|
2018-12-12 12:36:56 +00:00
|
|
|
#geom_boxplot()
|
|
|
|
geom_point()
|
|
|
|
#geom_point(data=dbdata, aes(x=nn, y=PortRcvData), colour='red') +
|
|
|
|
#geom_point(data=dbdata, aes(x=nn, y=PortXmitData), colour='blue')
|
|
|
|
|
|
|
|
if ( "logarithmic" == scale ) {
|
|
|
|
p = p + scale_y_log10()
|
|
|
|
}
|
|
|
|
|
2018-12-14 18:00:16 +00:00
|
|
|
filename_eps = sprintf("%s/%s_%s_performance.eps", folder_out, to_fn_str(lab_fs), scale)
|
|
|
|
filename_png = sprintf("%s/%s_%s_performance.png", folder_out, to_fn_str(lab_fs), scale)
|
2018-12-19 18:20:12 +00:00
|
|
|
ggsave(filename_png, width = 8, height = 8)
|
|
|
|
ggsave(filename_eps, width = 8, height = 8)
|
2018-12-12 12:36:56 +00:00
|
|
|
#system(sprintf("epstopdf %s", filename_eps))
|
|
|
|
system(sprintf("rm %s", filename_eps))
|
|
|
|
|
2018-12-14 18:00:16 +00:00
|
|
|
p = ggplot(data=dbdata[dbdata$lab_fs==lab_fs,], ymin=0) +
|
2018-12-12 12:36:56 +00:00
|
|
|
aes(x=nn, y=(PortXmitData + PortRcvData) * 4 / ppn, colour=as.factor(blocksize/1024), group=blocksize) +
|
|
|
|
#aes(x=nn, y=bwMiB) +
|
2018-12-14 18:00:16 +00:00
|
|
|
ggtitle(sprintf('%s Infiniband throughput (PortRcvData and PortXmitData by "perfquery -x")', lab_fs)) +
|
2018-12-19 18:20:12 +00:00
|
|
|
#facet_grid(ppn ~ lab_access + lab_count, labeller = labeller(nn = as_labeller(nn_lab), ppn = as_labeller(ppn_lab))) +
|
2018-12-20 19:23:22 +00:00
|
|
|
facet_grid(ppn ~ lab_access + pid, labeller = labeller(nn = as_labeller(nn_lab), ppn = as_labeller(ppn_lab))) +
|
2018-12-12 12:36:56 +00:00
|
|
|
xlab("Nodes") +
|
|
|
|
ylab("Performance in MiB/s") +
|
|
|
|
theme(axis.text.x=element_text(angle=90, hjust=0.95, vjust=0.5)) +
|
|
|
|
theme(legend.position="bottom") +
|
|
|
|
#scale_x_continuous(breaks = c(unique(data$nn))) +
|
|
|
|
scale_x_log10(breaks = c(unique(dbdata$nn))) +
|
|
|
|
scale_color_manual(name="Blocksize in KiB: ", values=c('#999999','#E69F00', '#56B4E9', '#000000'), breaks=sort(unique(dbdata$blocksize)/1024)) +
|
|
|
|
stat_summary(fun.y="mean", geom="line", aes(group=factor(blocksize))) +
|
2018-12-14 18:00:16 +00:00
|
|
|
#ylim(0, max_y) +
|
2018-12-12 12:36:56 +00:00
|
|
|
#geom_point(data=dbdata, aes(x=nn, y=PortXmitData), colour='blue')
|
|
|
|
geom_point()
|
|
|
|
|
|
|
|
if ( "logarithmic" == scale ) {
|
|
|
|
p = p + scale_y_log10()
|
|
|
|
}
|
|
|
|
|
2018-12-14 18:00:16 +00:00
|
|
|
filename_eps = sprintf("%s/%s_%s_ib.eps", folder_out, to_fn_str(lab_fs), scale)
|
|
|
|
filename_png = sprintf("%s/%s_%s_ib.png", folder_out, to_fn_str(lab_fs), scale)
|
2018-12-19 18:20:12 +00:00
|
|
|
ggsave(filename_png, width = 8, height = 8)
|
|
|
|
ggsave(filename_eps, width = 8, height = 8)
|
2018-12-12 12:36:56 +00:00
|
|
|
#system(sprintf("epstopdf %s", filename_eps))
|
|
|
|
system(sprintf("rm %s", filename_eps))
|
|
|
|
|
2018-12-14 18:00:16 +00:00
|
|
|
}}
|