Here is a lot of issues with the DBT2 which is downloaded from mysql's website.
I still got error after I have fixed 8 bugs:
./configure --prefix=$HOME/dbt2 --with-mysql=/mysql/mysqlc/
fix bug 1:path is incorrect
vi create_dbt2_files.sh
line 160: change path 'scr' to 'bin'
fix bug 2:default user is root
vi start_ndb.sh
line 255: change MYSQL_USER='root' MYSQL_USER=$USER
fix bug 3:remove the support of postgresql
vi configure.ac
Remove the lines 434~443
fix bug 4:ERROR: ld.so: object 'libtcmalloc_minimal.so.0' from LD_PRELOAD cannot be preloaded: ignored.
remove the definition of MALLOC_LIB
grep -n libtcmalloc_minimal *
bench_prepare.sh:1429:MALLOC_LIB="/usr/lib64/libtcmalloc_minimal.so.0"
run_oltp.sh:865:MALLOC_LIB="/usr/lib64/libtcmalloc_minimal.so.0"
start_ndb.sh:279:MALLOC_LIB="/usr/lib64/libtcmalloc_minimal.so"
tar cvf dbt2-0.37.50.tar dbt2-0.37.50
rm -f dbt2-0.37.50.tar.gz; gizp dbt2-0.37.50.tar
fix bug:ERROR 157 (HY000) at line 1: Could not connect to storage engine
fix bug 4:missing errmsg.sys
tar -zxf mysql-cluster-gpl-7.1.18-linux-x86_64-glibc23.tar.gz
(cd mysql-cluster-gpl-7.1.18-linux-x86_64-glibc23/share;cp -R english mysql)
tar cf mysql-cluster-gpl-7.1.18-linux-x86_64-glibc23.tar mysql-cluster-gpl-7.1.18-linux-x86_64-glibc23
rm mysql-cluster-gpl-7.1.18-linux-x86_64-glibc23.tar.gz
gzip mysql-cluster-gpl-7.1.18-linux-x86_64-glibc23.tar
fix bug 5: default configure location
mkdir -p /usr/local/mysql/mysql-cluster
chown vincenthe.mysql /usr/local/mysql/mysql-cluster
chmod 775 /usr/local/mysql/mysql-cluster
fix bug 6: numactl: command not found
yum install numactl
numactl --show
numactl --hardware
TASKSET="numactl"
SERVER_CPUS="0,2,4,6,8,10" #CPU bind, the range should be in the list of 'numactl --show'
SERVER_BIND="0" #node bind, #bind the CPUs, the range should be in the list of 'numactl --show'
SERVER_MEM_POLICY="interleaved"
BENCHMARK_CPUS="1,3,5,7,9,11"
BENCHMARK_BIND="1"
BENCHMARK_MEM_POLICY="local"
fix bug 7: automake: command not found
yum install automake
Try running a 2 data node cluster on 'localhost'/one server first and see if you can make it run.
$ mkdir bench; cd bench
$ mkdir tarballs dbt2_data ndb_data
wget
$ cp mysql-cluster-gpl-7.1.18-linux-x86_64-glibc23.tar.gz tarballs/
$ cp dbt2-0.37.50.tar.gz tarballs/
$ tar -zvf dbt2-0.37.50.tar.gz
$ cp dbt2-0.37.50/scripts/bench_prepare.sh .
$ cp dbt2-0.37.50/examples/autobench.conf .
Edit autobench.conf
*********
BENCHMARK_TO_RUN="dbt2"
TARBALL_DIR="/home/vincent/bench/tarballs"
MYSQL_VERSION="mysql-cluster-gpl-7.1.18-linux-x86_64-glibc23"
#You must add this line if the mysql tarball is not binary
USE_BINARY_MYSQL_TARBALL="no"
#DRIZZLE_VERSION="drizzle-2009.11.1208"
#LIBDRIZZLE_VERSION="libdrizzle-0.5"
#SYSBENCH_VERSION="sysbench-0.4.13"
DBT2_VERSION="dbt2-0.37.50"
SERVER_HOST="127.0.0.1"
SERVER_PORT="3306"
DATA_DIR_BASE="/home/vincent/bench/ndb_data"
#WINDOWS_REMOTE="no"
#BUILD_REMOTE="no"
#REMOTE_BIN_INSTALL_DIR="/data1/bench/mysql"
#REMOTE_SRC_INSTALL_DIR="/data1/bench/src_build"
ENGINE="ndb"
MYSQL_BASE="5.1"
TEST_DESCRIPTION="mysql-cluster-7.1.18"
USE_NDBMTD="yes"
#On some systems it's hard to use pid files on the file system (e.g. NFS)
NDB_MGMD_NODES="127.0.0.1"
NDBD_NODES="127.0.0.1;127.0.0.1"
SERVER_HOST="127.0.0.1"
NDB_MULTI_CONNECTION="2"
NDB_REPLICAS="2"
NDB_DATA_MEMORY="3G"
NDB_INDEX_MEMORY="300M"
#TASKSET="numactl"
#SERVER_CPUS=""
#SERVER_BIND="2-7"
#SERVER_MEM_POLICY="interleaved"
#BENCHMARK_CPUS=""
#BENCHMARK_BIND="0-1"
#BENCHMARK_MEM_POLICY="local"
*********
Leave other params commented out for now/use defaults.
$ cp autobench.conf dbt2_data/
Build the dbt2 binaries so that you can create the dbt2 dataset.
mkdir $HOME/dbt2
$ dbt2-0.37.50/scripts/create_dbt2_files.sh --base_dir /home/vincenthe/dbt2 \
--data_dir ~/bench/dbt2_data --num_warehouses 10
Run the test
======================================
./bench_prepare.sh --skip-build-remote --default-directory /home/vincenthe/bench/dbt2_data
./bench_prepare.sh --help
There are 5 stages in this execution:
1) Create config files for the various scripts used
2) Build sysbench, DBT2 and MySQL locally
3) Build MySQL remotely
4) Execute test
5) Cleanup after test
Parameters:
-----------
--default-directory : Directory where autobench.conf is placed, this
directory is also used to place builds, results
and other temporary storage needed to run the
test.
--skip-build-local : Skip building locally
--skip-build-remote : Skip building remotely
--skip-test : Skip running test completely
--skip-run : Skip execute test
--skip-start : Skip start/stop MySQL Server/Cluster
--skip-stop : Skip stop MySQL Server/Cluster
--skip-cleanup : Skip cleanup phase
--generate-dbt2-data : Generate load files for DBT2 benchmark, can only
be done in conjunction with build locally
======================================
I think these scripts have been primarily tested with building mysql binaries from source as part of the test. You
might have less issues if you use the mysql source instead of the binary package.
Using the mysql binary package there is at least on difference in where some localization files are stored
compared the source build.
Check if you have 'mysql-cluster-gpl-7.1.18-linux-x86_64-glibc23/share/english/error.msg'. If you do you might
need to create this directory structure instead: mysql-cluster-gpl-7.1.18-linux-x86_64-
glibc23/share/mysql/english/error.msg
And then create a new mysql-cluster-gpl-7.1.18-linux-x86_64-glibc23.tar.gz and put it into the 'tarballs' folder.
I hope this will help you get further in your efforts to run these dbt2 tests and that you are able to engage our
PS as soon as possible.
tar -zxf mysql-cluster-gpl-7.1.18-linux-x86_64-glibc23.tar.gz
(cd mysql-cluster-gpl-7.1.18-linux-x86_64-glibc23/share;cp -R english mysql)
tar cf mysql-cluster-gpl-7.1.18-linux-x86_64-glibc23.tar mysql-cluster-gpl-7.1.18-linux-x86_64-glibc23
rm mysql-cluster-gpl-7.1.18-linux-x86_64-glibc23.tar.gz
gzip mysql-cluster-gpl-7.1.18-linux-x86_64-glibc23.tar
================================
Failed to create directory '/usr/local/mysql/mysql-cluster', error: 2
-- Could not create directory '/usr/local/mysql/mysql-cluster'
Either create it manually or specify a different directory with --configdir=<path>
Failed with script
/home/vincenthe/bench/dbt2_data/src/dbt2-0.37.50/scripts/start_ndb.sh\
--default-directory /home/vincenthe/bench/dbt2_data --ssh_port 22 --cluster_id 1 \
--home-base /home/vincenthe --ndb_mgmd --nodeid 1 --initial 127.0.0.1
using parameters
mkdir -p /usr/local/mysql/mysql-cluster
chown vincenthe.mysql /usr/local/mysql/mysql-cluster
chmod 775 /usr/local/mysql/mysql-cluster
这个是mysql官方发布的那个dbt2,我拿来测试cluster,没用自动化,只用的run_mysql.sh这个脚本去压,但 只能看到连接建立了,show processlist 看不到sql执行,最后结果也都是0. 你遇到过么
--转自