Commit 567c09ad authored by Rich Prohaska's avatar Rich Prohaska

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

parent a8ca3e2a
...@@ -182,13 +182,24 @@ if [ $load -ne 0 -a $testresult = "PASS" -a $engine != "tokudb" ] ; then ...@@ -182,13 +182,24 @@ if [ $load -ne 0 -a $testresult = "PASS" -a $engine != "tokudb" ] ; then
if [ $exitcode -ne 0 ] ; then testresult="FAIL"; fi if [ $exitcode -ne 0 ] ; then testresult="FAIL"; fi
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 # load the data
if [ $load -ne 0 -a $testresult = "PASS" ] ; then if [ $load -ne 0 -a $testresult = "PASS" ] ; then
echo `date` load data >>$runfile echo `date` load data >>$runfile
start=$(date +%s) 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=$? exitcode=$?
let loadtime=$(date +%s)-$start let loadtime=$(date +%s)-$start
echo `date` load data loadtime=$loadtime $exitcode >>$runfile echo `date` load data loadtime=$loadtime $exitcode >>$runfile
......
...@@ -230,10 +230,9 @@ if [ $load != 0 -a $testresult = "PASS" ] ; then ...@@ -230,10 +230,9 @@ if [ $load != 0 -a $testresult = "PASS" ] ; then
echo `date` load table $tblname >>$runfile echo `date` load table $tblname >>$runfile
ls -l $tpchdir/data/tpch${SCALE}G/$tblname.tbl >>$runfile ls -l $tpchdir/data/tpch${SCALE}G/$tblname.tbl >>$runfile
start=$(date +%s) 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 tokudb_load_save_space=$tokudb_load_save_space;\
load data infile '$tpchdir/data/tpch${SCALE}G/$tblname.tbl' into table $tblname fields terminated by '|';\ load data infile '$tpchdir/data/tpch${SCALE}G/$tblname.tbl' into table $tblname fields terminated by '|';" >>$runfile 2>&1
set global tokudb_loader_memory_size=$default_loader_memory_size" >>$runfile 2>&1
exitcode=$? exitcode=$?
let loadtime=$(date +%s)-$start let loadtime=$(date +%s)-$start
echo `date` load table $tblname $exitcode loadtime=$loadtime>>$runfile echo `date` load table $tblname $exitcode loadtime=$loadtime>>$runfile
...@@ -245,11 +244,10 @@ if [ $check != 0 -a $testresult = "PASS" ] ; then ...@@ -245,11 +244,10 @@ if [ $check != 0 -a $testresult = "PASS" ] ; then
for tblname in lineitem ; do for tblname in lineitem ; do
echo `date` add clustering index $tblname >>$runfile echo `date` add clustering index $tblname >>$runfile
start=$(date +%s) 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 tokudb_load_save_space=$tokudb_load_save_space;\
set session tokudb_create_index_online=0;\ set tokudb_create_index_online=0;\
create clustering index i_shipdate on lineitem (l_shipdate);\ create clustering index i_shipdate on lineitem (l_shipdate);" >>$runfile 2>&1
set global tokudb_loader_memory_size=$default_loader_memory_size" >>$runfile 2>&1
exitcode=$? exitcode=$?
let loadtime=$(date +%s)-$start let loadtime=$(date +%s)-$start
echo `date` add clustering index $tblname $exitcode loadtime=$loadtime >>$runfile echo `date` add clustering index $tblname $exitcode loadtime=$loadtime >>$runfile
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment