8 $prog_name [options] <config-file>...
11 -a,--archive-dir directory in which the test result is stored, default to $PWD/cbt-archive
12 --build-dir directory where CMakeCache.txt is located, default to $PWD
13 --cbt directory of cbt if you have already a copy of it. ceph/cbt:master will be cloned from github if not specified
14 -h,--help print this help message
15 --source-dir the path to the top level of Ceph source tree, default to $PWD/..
16 --use-existing do not setup/teardown a vstart cluster for testing
19 $prog_name --cbt ~/dev/cbt -a /tmp ../src/test/crimson/cbt/radosbench_4K_read.yaml
23 prog_name
=$
(basename $0)
24 archive_dir
=$PWD/cbt-archive
26 source_dir
=$
(dirname $PWD)
29 opts
=$
(getopt
--options "a:h" --longoptions "archive-dir:,build-dir:,source-dir:,cbt:,help,use-existing,classical" --name $prog_name -- "$@")
67 echo "unexpected argument $1" 1>&2
73 if test $# -gt 0; then
76 echo "$prog_name: please specify one or more .yaml files" 1>&2
81 if test -z "$cbt_dir"; then
83 git clone
--depth 1 -b master https
://github.com
/ceph
/cbt.git
$cbt_dir
86 # store absolute path before changing cwd
87 source_dir
=$
(readlink
-f $source_dir)
88 if ! $use_existing; then
90 # seastar uses 128*8 aio in reactor for io and 10003 aio for events pooling
91 # for each core, if it fails to enough aio context, the seastar application
92 # bails out. and take other process into consideration, let's make it
94 max_io
=$
(expr 32768 \
* "$(nproc)")
95 if test "$(/sbin/sysctl --values fs.aio-max-nr)" -lt $max_io; then
96 sudo
/sbin
/sysctl
-q -w fs.aio-max-nr
=$max_io
99 MDS
=0 MGR
=1 OSD
=3 MON
=1 $source_dir/src
/vstart.sh
-n -X \
102 MDS
=0 MGR
=1 OSD
=3 MON
=1 $source_dir/src
/vstart.sh
-n -X \
103 --without-dashboard --cyanstore \
104 -o "memstore_device_bytes=34359738368" \
105 --crimson --nodaemon --redirect-output \
106 --osd-args "--memory 4G"
111 # i need to read the performance events,
112 # see https://www.kernel.org/doc/Documentation/sysctl/kernel.txt
113 if /sbin
/capsh
--supports=cap_sys_admin
; then
114 perf_event_paranoid
=$
(/sbin
/sysctl
--values kernel.perf_event_paranoid
)
115 if test $perf_event_paranoid -gt 0; then
116 sudo
/sbin
/sysctl
-q -w kernel.perf_event_paranoid
=0
119 echo "without cap_sys_admin, $(whoami) cannot read the perf events"
122 for config_file
in $config_files; do
123 echo "testing $config_file"
124 cbt_config
=$
(mktemp
$config_file.XXXX.yaml
)
125 python3
$source_dir/src
/test
/crimson
/cbt
/t2c.py \
126 --build-dir $build_dir \
127 --input $config_file \
129 python3
$cbt_dir/cbt.py \
130 --archive $archive_dir \
131 --conf $build_dir/ceph.conf \
136 if test -n "$perf_event_paranoid"; then
137 # restore the setting
138 sudo
/sbin
/sysctl
-q -w kernel.perf_event_paranoid
=$perf_event_paranoid
141 if ! $use_existing; then
142 cd $build_dir ||
exit
144 $source_dir/src
/stop.sh
146 $source_dir/src
/stop.sh
--crimson