Permalink
Browse files

#183 run atc and tpch table loads with a configurable memory size

  • Loading branch information...
prohaska committed Feb 14, 2014
1 parent 057e1a1 commit a8f56409a64a8481b84c2d02dddb4db73305e88f
Showing with 18 additions and 9 deletions.
  1. +13 −2 scripts/run.atc.ontime.bash
  2. +5 −7 scripts/run.tpch.bash
@@ -182,13 +182,24 @@ if [ $load -ne 0 -a $testresult = "PASS" -a $engine != "tokudb" ] ; then
if [ $exitcode -ne 0 ] ; then testresult="FAIL"; fi
fi
-mysql -S $mysqlsocket -u $mysqluser -D $dbname -e "show create table $tblname" >>$runfile 2>&1
+if [ $testresult = "PASS" ] ; then
+ mysql -S $mysqlsocket -u $mysqluser -D $dbname -e "show create table $tblname" >>$runfile 2>&1
+fi
+
+if [ $testresult = "PASS" ] ; then
+ let default_loader_memory_size="$(mysql -S $mysqlsocket -u $mysqluser -e'select @@tokudb_loader_memory_size' --silent --skip-column-names)"
+ exitcode=$?
+ echo `date` get tokudb_loader_memory_size $exitcode >>$runfile
+ if [ $exitcode -ne 0 ] ; then testresult="FAIL"; fi
+ if [ "$tokudb_loader_memory_size" = "" ] ; then tokudb_loader_memory_size=$default_loader_memory_size; fi
+fi
# load the data
if [ $load -ne 0 -a $testresult = "PASS" ] ; then
echo `date` load data >>$runfile
start=$(date +%s)
- mysql -S $mysqlsocket -u $mysqluser -D $dbname -e "set tokudb_load_save_space=$tokudb_load_save_space; load data infile '$basedir/atc_On_Time_Performance.mysql.csv' into table $tblname" >>$runfile 2>&1
+ mysql -S $mysqlsocket -u $mysqluser -D $dbname -e "set tokudb_loader_memory_size=$tokudb_loader_memory_size;\
+ set tokudb_load_save_space=$tokudb_load_save_space; load data infile '$basedir/atc_On_Time_Performance.mysql.csv' into table $tblname" >>$runfile 2>&1
exitcode=$?
let loadtime=$(date +%s)-$start
echo `date` load data loadtime=$loadtime $exitcode >>$runfile
View
@@ -230,10 +230,9 @@ if [ $load != 0 -a $testresult = "PASS" ] ; then
echo `date` load table $tblname >>$runfile
ls -l $tpchdir/data/tpch${SCALE}G/$tblname.tbl >>$runfile
start=$(date +%s)
- mysql -S $mysqlsocket -u $mysqluser -D $dbname -e "set global tokudb_loader_memory_size=$tokudb_loader_memory_size;\
+ mysql -S $mysqlsocket -u $mysqluser -D $dbname -e "set tokudb_loader_memory_size=$tokudb_loader_memory_size;\
set tokudb_load_save_space=$tokudb_load_save_space;\
- load data infile '$tpchdir/data/tpch${SCALE}G/$tblname.tbl' into table $tblname fields terminated by '|';\
- set global tokudb_loader_memory_size=$default_loader_memory_size" >>$runfile 2>&1
+ load data infile '$tpchdir/data/tpch${SCALE}G/$tblname.tbl' into table $tblname fields terminated by '|';" >>$runfile 2>&1
exitcode=$?
let loadtime=$(date +%s)-$start
echo `date` load table $tblname $exitcode loadtime=$loadtime>>$runfile
@@ -245,11 +244,10 @@ if [ $check != 0 -a $testresult = "PASS" ] ; then
for tblname in lineitem ; do
echo `date` add clustering index $tblname >>$runfile
start=$(date +%s)
- mysql -S $mysqlsocket -u $mysqluser -D $dbname -e "set global tokudb_loader_memory_size=$tokudb_loader_memory_size;\
+ mysql -S $mysqlsocket -u $mysqluser -D $dbname -e "set tokudb_loader_memory_size=$tokudb_loader_memory_size;\
set tokudb_load_save_space=$tokudb_load_save_space;\
- set session tokudb_create_index_online=0;\
- create clustering index i_shipdate on lineitem (l_shipdate);\
- set global tokudb_loader_memory_size=$default_loader_memory_size" >>$runfile 2>&1
+ set tokudb_create_index_online=0;\
+ create clustering index i_shipdate on lineitem (l_shipdate);" >>$runfile 2>&1
exitcode=$?
let loadtime=$(date +%s)-$start
echo `date` add clustering index $tblname $exitcode loadtime=$loadtime >>$runfile

0 comments on commit a8f5640

Please sign in to comment.