Commit e789dee8 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a1b91494
...@@ -47,10 +47,20 @@ GOPATH=${GOPATH%:} ...@@ -47,10 +47,20 @@ GOPATH=${GOPATH%:}
# lmbench # lmbench
export PATH=$X/lmbench/lmbench3/bin/`cd $X/lmbench/lmbench3/src; ../scripts/os`:$PATH export PATH=$X/lmbench/lmbench3/bin/`cd $X/lmbench/lmbench3/src; ../scripts/os`:$PATH
# ioping
export PATH=$X/ioping:$PATH
# XXX for mysqld # XXX for mysqld
export PATH=$PATH:/usr/sbin export PATH=$PATH:/usr/sbin
EOF EOF
# NOTE lmbench before env.sh becuase env.sh uses `scripts/os` from lmbench
git clone -o kirr -b x/kirr https://lab.nexedi.com/kirr/lmbench.git
pushd lmbench/lmbench3/src
make -j`nproc`
go build -o ../bin/`../scripts/os`/lat_tcp_go lat_tcp.go
popd
. env.sh . env.sh
pip install git+https://lab.nexedi.com/nexedi/wendelin.core.git@master # XXX does not show git in ver pip install git+https://lab.nexedi.com/nexedi/wendelin.core.git@master # XXX does not show git in ver
...@@ -71,10 +81,9 @@ EOF ...@@ -71,10 +81,9 @@ EOF
go get -v lab.nexedi.com/kirr/neo/go/... go get -v lab.nexedi.com/kirr/neo/go/...
go get -v github.com/pkg/profile # used by zhash.go go get -v github.com/pkg/profile # used by zhash.go
git clone https://lab.nexedi.com/kirr/lmbench.git git clone -o kirr -b x/hist https://lab.nexedi.com/kirr/ioping.git
pushd lmbench/lmbench3/src pushd ioping
make -j`nproc` make -j`nproc`
go build -o ../bin/`../scripts/os`/lat_tcp_go lat_tcp.go
popd popd
echo ok >deployed echo ok >deployed
...@@ -114,22 +123,20 @@ $@ ...@@ -114,22 +123,20 @@ $@
# ---------------------------------------- # ----------------------------------------
# XXX neo/go - must be `go install'ed`
# XXX use `go run ...` so it does not need go install?
# XXX neo/py, wendelin.core, ... - must be pip install'ed # XXX neo/py, wendelin.core, ... - must be pip install'ed
# XXX neo/py: run via relative path to neomaster? (../../neo/neomaster) so we do not need to `pip install -e` ? # XXX neo/py: run via relative path to neomaster? (../../neo/neomaster) so we do not need to `pip install -e` ?
# local IPv6 address # local external address IPv4 or IPv6
myaddr6=$(getent hosts `hostname` |grep -v 127.0 |awk '{print $1}') myaddr=$(getent hosts `hostname` |grep -v 127.0 |awk '{print $1}')
# port allocations # port allocations ([] works for IPv4 too)
Abind=[$myaddr6]:5551 # NEO admin Abind=[$myaddr]:5551 # NEO admin
Mbind=[$myaddr6]:5552 # NEO master Mbind=[$myaddr]:5552 # NEO master
Zbind=[$myaddr6]:5553 # ZEO Zbind=[$myaddr]:5553 # ZEO
# NEO storage. bind not strictly needed but we make sure no 2 storages are # NEO storage. bind not strictly needed but we make sure no 2 storages are
# started at the same time # started at the same time
Sbind=[$myaddr6]:5554 Sbind=[$myaddr]:5554
# disk allocation # disk allocation
log=`pwd`/log; mkdir -p $log log=`pwd`/log; mkdir -p $log
...@@ -380,11 +387,12 @@ pyver() { ...@@ -380,11 +387,12 @@ pyver() {
# show data/versions # show data/versions
header() { header() {
echo -n "# "; date --rfc-2822 echo -n "# "; date --rfc-2822
echo "# `whoami`@`hostname --fqdn` ($myaddr6)"; echo "# `whoami`@`hostname --fqdn` ($myaddr)";
echo -n "# "; grep "^model name" /proc/cpuinfo |head -1 |sed -e 's/model name\s*: //' echo -n "# "; grep "^model name" /proc/cpuinfo |head -1 |sed -e 's/model name\s*: //'
echo -n "# "; uname -a echo -n "# "; uname -a
echo -n "# "; python --version echo -n "# "; python --version
echo -n "# "; go version echo -n "# "; go version
echo -n "# "; python -c 'import sqlite3 as s; print "sqlite %s (py mod %s)" % (s.sqlite_version, s.version)'
echo -n "# "; mysqld --version echo -n "# "; mysqld --version
pyver neoppod neo pyver neoppod neo
...@@ -394,10 +402,6 @@ header() { ...@@ -394,10 +402,6 @@ header() {
pyver wendelin.core pyver wendelin.core
} }
# build go client
# (we run it several times and in parallel - for go build not to infere with benchmarking)
go build -o zhash_go zhash.go
# run benchmarks # run benchmarks
Nrun=4 # repeat benchmarks N time Nrun=4 # repeat benchmarks N time
Npar=8 # run so many parallel clients in parallel phase Npar=8 # run so many parallel clients in parallel phase
...@@ -453,7 +457,7 @@ bench_go() { ...@@ -453,7 +457,7 @@ bench_go() {
# command: benchmark when client and storage are on the same computer # command: benchmark when client and storage are on the same computer
cmd_bench_local() { cmd_bench-local() {
echo -e ">>> bench-local" echo -e ">>> bench-local"
header header
install_trap install_trap
...@@ -499,7 +503,7 @@ cmd_bench_local() { ...@@ -499,7 +503,7 @@ cmd_bench_local() {
} }
# command: benchmark when server runs locally and client is on another node # command: benchmark when server runs locally and client is on another node
cmd_bench_cluster() { cmd_bench-cluster() {
url=$1 url=$1
test -z "$url" && die "Usage: neotest bench-cluster [user@]<host>:<path>" test -z "$url" && die "Usage: neotest bench-cluster [user@]<host>:<path>"
...@@ -585,7 +589,7 @@ cmd_bench_cluster() { ...@@ -585,7 +589,7 @@ cmd_bench_cluster() {
} }
# command: run client workload against sepearate server # command: run client workload against sepearate server
cmd_run_client() { cmd_run-client() {
goonly="" goonly=""
case "$1" in case "$1" in
--goonly) --goonly)
...@@ -601,14 +605,14 @@ cmd_run_client() { ...@@ -601,14 +605,14 @@ cmd_run_client() {
} }
# command: print information about local node # command: print information about local node
cmd_info_local() { cmd_info-local() {
header header
} }
# ---- main driver ---- # ---- main driver ----
usage() { usage() {
cat 1>&2 << 'EOF' cat 1>&2 << EOF
Neotest is a tool to functionally test and benchmark NEO. Neotest is a tool to functionally test and benchmark NEO.
Usage: Usage:
...@@ -630,24 +634,16 @@ EOF ...@@ -630,24 +634,16 @@ EOF
} }
case "$1" in case "$1" in
bench-local) # commands that require build
shift bench-local | \
cmd_bench_local "$@" run-client | \
;;
run-client)
shift
cmd_run_client "$@"
;;
bench-cluster) bench-cluster)
shift
cmd_bench_cluster "$@"
;; ;;
info-local) info-local)
shift shift
cmd_info_local "$@" cmd_info-local "$@"
exit 0
;; ;;
-h) -h)
...@@ -659,3 +655,13 @@ info-local) ...@@ -659,3 +655,13 @@ info-local)
exit 1 exit 1
;; ;;
esac esac
# rebuild go bits
go install -v lab.nexedi.com/kirr/neo/go/...
go build -o zhash_go zhash.go
# run the command
cmd="$1"
shift
cmd_$cmd "$@"
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