sysbench压力测试工具mysql以及postgresql

sysbench压力测试工具mysql以及postgresql

sysbench工具安装

[postgres@oradb sysbench-1.0.20]$ ./autogen.sh 
./autogen.sh: running `libtoolize --copy --force' 
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.
libtoolize: copying file `config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
./autogen.sh: running `aclocal -I m4' 
./autogen.sh: running `autoheader' 
./autogen.sh: running `automake -c --foreign --add-missing' 
configure.ac:59: installing 'config/ar-lib'
configure.ac:45: installing 'config/compile'
configure.ac:27: installing 'config/config.guess'
configure.ac:27: installing 'config/config.sub'
configure.ac:32: installing 'config/install-sh'
configure.ac:32: installing 'config/missing'
src/Makefile.am: installing 'config/depcomp'
parallel-tests: installing 'config/test-driver'
./autogen.sh: running `autoconf' 
Libtoolized with: libtoolize (GNU libtool) 2.4.2
Automade with: automake (GNU automake) 1.13.4
Configured with: autoconf (GNU Autoconf) 2.69
[postgres@oradb sysbench-1.0.20]$ 

yum install automake
yum install libtool.x86_64
yum -y install postgresql-devel

[postgres@oradb sysbench-1.0.20]$ yum list |grep automake
automake.noarch                         1.13.4-3.el7                   @anaconda
[postgres@oradb sysbench-1.0.20]$ 
[postgres@oradb sysbench-1.0.20]$ yum list |grep libtool
libtool.x86_64                          2.4.2-22.el7_3                 @anaconda
libtool-ltdl.x86_64                     2.4.2-22.el7_3                 @anaconda
[postgres@oradb sysbench-1.0.20]$ yum list |grep postgresql-devel
postgresql-devel.x86_64                 9.2.24-2.el7                   locao    
[postgres@oradb sysbench-1.0.20]$ yum install -y postgresql-devel

./configure --prefix=/opt/sysbench --without-mysql --with-pgsql
make
make install


[postgres@oradb sysbench-1.0.20]$ ./configure --prefix=/opt/sysbench --without-mysql --with-pgsql
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking how to run the C preprocessor... gcc -E
checking whether gcc -std=gnu99 and cc understand -c and -o together... yes
checking for a sed that does not truncate output... /bin/sed
checking for C compiler vendor... gnu
checking for gcc architecture flag... 
checking for x86 cpuid 0 output... 16:756e6547:6c65746e:49656e69
checking for x86 cpuid 1 output... 906e9:10800:defa220b:178bfbff
checking whether C compiler accepts -march=core2... yes
checking for gcc architecture flag... -march=core2
checking for ar... ar
checking the archiver (ar) interface... ar
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc -std=gnu99... /bin/ld
checking if the linker (/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /bin/nm -B
checking the name lister (/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /bin/nm -B output from gcc -std=gnu99 object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no
checking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC
checking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... yes
checking if gcc -std=gnu99 static flag -static works... no
checking if gcc -std=gnu99 supports -c -o file.o... yes
checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes
checking whether the gcc -std=gnu99 linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for pkg-config... yes
checking for C compiler vendor... (cached) gnu
checking whether to compile with MySQL support... no
checking whether to compile with Drizzle support... no
checking whether to compile with libattachsql support... no
checking whether to compile with Oracle support... no
checking whether to compile with PostgreSQL support... yes
checking for pkg-config... /bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking whether to build with system or bundled LuaJIT... bundled
checking whether to build with system or bundled Concurrency Kit... bundled
checking whether SHM_HUGETLB is declared... yes
checking whether O_SYNC is declared... yes
checking for xsltproc... xsltproc
checking whether xsltproc works... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for sqrt in -lm... yes
checking for ld used by GCC... /bin/ld -m elf_x86_64
checking if the linker (/bin/ld -m elf_x86_64) is GNU ld... yes
checking for shared library run path origin... done
checking for pg_config... /usr/local/pgsql/bin/pg_config
checking PostgreSQL C flags... -I/usr/local/pgsql/include
checking PostgreSQL linker flags... -L/usr/local/pgsql/lib -lpq
checking libaio.h usability... yes
checking libaio.h presence... yes
checking for libaio.h... yes
checking for io_queue_init in -laio... yes
checking if io_getevents() has an old interface... no
checking for malloc in -lumem... no
checking for malloc in -lmtmalloc... no
checking for ANSI C header files... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/aio.h usability... no
checking sys/aio.h presence... no
checking for sys/aio.h... no
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/shm.h usability... yes
checking sys/shm.h presence... yes
checking for sys/shm.h... yes
checking thread.h usability... no
checking thread.h presence... no
checking for thread.h... no
checking for unistd.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking for off_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for thread local storage (TLS) class... __thread
checking for __attribute__((format))... yes
checking for __attribute__((unused))... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking size of size_t... 8
checking size of bool... 1
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... yes
checking for library containing clock_gettime... none required
checking for alarm... yes
checking for clock_gettime... yes
checking for directio... no
checking for fdatasync... yes
checking for gettimeofday... yes
checking for isatty... yes
checking for memalign... yes
checking for memset... yes
checking for posix_memalign... yes
checking for pthread_yield... yes
checking for setvbuf... yes
checking for sqrt... yes
checking for strdup... yes
checking for thr_setconcurrency... no
checking for valloc... yes
checking for pthread_once... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/xsl/Makefile
config.status: creating doc/xsl/catalog.xml
config.status: creating doc/Makefile
config.status: creating third_party/luajit/Makefile
config.status: creating third_party/concurrency_kit/Makefile
config.status: creating src/Makefile
config.status: creating src/drivers/Makefile
config.status: creating src/drivers/mysql/Makefile
config.status: creating src/drivers/drizzle/Makefile
config.status: creating src/drivers/oracle/Makefile
config.status: creating src/drivers/pgsql/Makefile
config.status: creating src/drivers/attachsql/Makefile
config.status: creating src/tests/Makefile
config.status: creating src/tests/cpu/Makefile
config.status: creating src/tests/fileio/Makefile
config.status: creating src/tests/memory/Makefile
config.status: creating src/tests/threads/Makefile
config.status: creating src/tests/mutex/Makefile
config.status: creating src/lua/Makefile
config.status: creating src/lua/internal/Makefile
config.status: creating tests/Makefile
config.status: creating tests/include/config.sh
config.status: creating snap/snapcraft.yaml
config.status: creating config/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
===============================================================================
sysbench version   : 1.0.20
CC                 : gcc -std=gnu99
CFLAGS             : -O2 -funroll-loops  -Wall -Wextra -Wpointer-arith -Wbad-function-cast -Wstrict-prototypes -Wnested-externs -Wno-format-zero-length -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align -Wvla   -pthread
CPPFLAGS           : -D_GNU_SOURCE   -I$(top_srcdir)/src -I$(abs_top_builddir)/third_party/luajit/inc -I$(abs_top_builddir)/third_party/concurrency_kit/include
LDFLAGS            :  
LIBS               : -laio -lm 
EXTRA_LDFLAGS      : prefix             : /opt/sysbench
bindir             : ${prefix}/bin
libexecdir         : ${prefix}/libexec
mandir             : ${prefix}/share/man
datadir            : ${prefix}/shareMySQL support      : no
Drizzle support    : no
AttachSQL support  : no
Oracle support     : no
PostgreSQL support : yesLuaJIT             : bundled
LUAJIT_CFLAGS      : -I$(abs_top_builddir)/third_party/luajit/inc
LUAJIT_LIBS        : $(abs_top_builddir)/third_party/luajit/lib/libluajit-5.1.a -ldl
LUAJIT_LDFLAGS     : -rdynamicConcurrency Kit    : bundled
CK_CFLAGS          : -I$(abs_top_builddir)/third_party/concurrency_kit/include
CK_LIBS            : $(abs_top_builddir)/third_party/concurrency_kit/lib/libck.a
configure flags    : 
===============================================================================
[postgres@oradb sysbench-1.0.20]$ 

安装完成确认

[postgres@oradb bin]$ ./sysbench --help
Usage:sysbench [options]... [testname] [command]Commands implemented by most tests: prepare run cleanup helpGeneral options:--threads=N                     number of threads to use [1]--events=N                      limit for total number of events [0]--time=N                        limit for total execution time in seconds [10]--forced-shutdown=STRING        number of seconds to wait after the --time limit before forcing shutdown, or 'off' to disable [off]--thread-stack-size=SIZE        size of stack per thread [64K]--rate=N                        average transactions rate. 0 for unlimited rate [0]--report-interval=N             periodically report intermediate statistics with a specified interval in seconds. 0 disables intermediate reports [0]--report-checkpoints=[LIST,...] dump full statistics and reset all counters at specified points in time. The argument is a list of comma-separated values representing the amount of time in seconds elapsed from start of test when report checkpoint(s) must be performed. Report checkpoints are off by default. []--debug[=on|off]                print more debugging info [off]--validate[=on|off]             perform validation checks where possible [off]--help[=on|off]                 print help and exit [off]--version[=on|off]              print version and exit [off]--config-file=FILENAME          File containing command line options--tx-rate=N                     deprecated alias for --rate [0]--max-requests=N                deprecated alias for --events [0]--max-time=N                    deprecated alias for --time [0]--num-threads=N                 deprecated alias for --threads [1]Pseudo-Random Numbers Generator options:--rand-type=STRING random numbers distribution {uniform,gaussian,special,pareto} [special]--rand-spec-iter=N number of iterations used for numbers generation [12]--rand-spec-pct=N  percentage of values to be treated as 'special' (for special distribution) [1]--rand-spec-res=N  percentage of 'special' values to use (for special distribution) [75]--rand-seed=N      seed for random number generator. When 0, the current time is used as a RNG seed. [0]--rand-pareto-h=N  parameter h for pareto distribution [0.2]Log options:--verbosity=N verbosity level {5 - debug, 0 - only critical messages} [3]--percentile=N       percentile to calculate in latency statistics (1-100). Use the special value of 0 to disable percentile calculations [95]--histogram[=on|off] print latency histogram in report [off]General database options:--db-driver=STRING  specifies database driver to use ('help' to get list of available drivers)--db-ps-mode=STRING prepared statements usage mode {auto, disable} [auto]--db-debug[=on|off] print database-specific debug information [off]Compiled-in database drivers:pgsql - PostgreSQL driverpgsql options:--pgsql-host=STRING     PostgreSQL server host [localhost]--pgsql-port=N          PostgreSQL server port [5432]--pgsql-user=STRING     PostgreSQL user [sbtest]--pgsql-password=STRING PostgreSQL password []--pgsql-db=STRING       PostgreSQL database name [sbtest]Compiled-in tests:fileio - File I/O testcpu - CPU performance testmemory - Memory functions speed testthreads - Threads subsystem performance testmutex - Mutex performance testSee 'sysbench <testname> help' for a list of options for each test.[postgres@oradb bin]$ [postgres@oradb bin]$ ./sysbench --version
sysbench 1.0.20
[postgres@oradb bin]$ 

安装完成后检查确认,安装后的目录/opt/sysbench/bin,/opt/sysbench/share,
其中bin目录下是可执行文件,share目录下是一些自定义的lua脚本

[postgres@oradb sysbench]$ ll
total 0
drwxrwxr-x 2 postgres postgres 22 Jan 26 15:09 bin
drwxrwxr-x 4 postgres postgres 33 Jan 26 15:09 share
[postgres@oradb sysbench]$ ll
total 0
drwxrwxr-x 2 postgres postgres 22 Jan 26 15:09 bin
drwxrwxr-x 4 postgres postgres 33 Jan 26 15:09 share
[postgres@oradb sysbench]$ cd share/
[postgres@oradb share]$ ll
total 4
drwxrwxr-x 3 postgres postgres   22 Jan 26 15:09 doc
drwxrwxr-x 3 postgres postgres 4096 Jan 26 15:09 sysbench
[postgres@oradb share]$ cd sysbench/
[postgres@oradb sysbench]$ ll
total 60
-rwxr-xr-x 1 postgres postgres  1452 Jan 26 15:09 bulk_insert.lua
-rw-r--r-- 1 postgres postgres 14369 Jan 26 15:09 oltp_common.lua
-rwxr-xr-x 1 postgres postgres  1290 Jan 26 15:09 oltp_delete.lua
-rwxr-xr-x 1 postgres postgres  2415 Jan 26 15:09 oltp_insert.lua
-rwxr-xr-x 1 postgres postgres  1265 Jan 26 15:09 oltp_point_select.lua
-rwxr-xr-x 1 postgres postgres  1649 Jan 26 15:09 oltp_read_only.lua
-rwxr-xr-x 1 postgres postgres  1824 Jan 26 15:09 oltp_read_write.lua
-rwxr-xr-x 1 postgres postgres  1118 Jan 26 15:09 oltp_update_index.lua
-rwxr-xr-x 1 postgres postgres  1127 Jan 26 15:09 oltp_update_non_index.lua
-rwxr-xr-x 1 postgres postgres  1440 Jan 26 15:09 oltp_write_only.lua
-rwxr-xr-x 1 postgres postgres  1919 Jan 26 15:09 select_random_points.lua
-rwxr-xr-x 1 postgres postgres  2118 Jan 26 15:09 select_random_ranges.lua
drwxr-xr-x 4 postgres postgres    49 Jan 26 15:09 tests

模拟测试

./sysbench \
--db-driver=pgsql \
--pgsql-host=127.0.0.1 \
--pgsql-port=5432 \
--pgsql-user=postgres \
--pgsql-password=postgres \
--pgsql-db=test_db \
--tables=4 \
--table-size=100000 \
--threads=50 \
--time=60 \
--events=0 \
--report-interval=10 \
--percentile=99 \
/opt/sysbench/share/sysbench/oltp_read_write.lua \
prepare## --db-driver=pgsql : 设置pgsql驱动
## --tables=4 :设置为N个table的测试
## --table-size=100000 :每张table的生成测试数据条数,有的版本设置参数为  --oltp-table-size=100000
## --threads=50 :压测发起线程数(并发连接)
## --time=60 : 压测时长,单位秒 , 如果设置events,则无需设置该时间
## --events=0:压测时设置的总请求书,因为上面已经定义了总执行时长,所以总请求数可以设定为 0;也可以只设定总请求数,不设定最大执行时长
## --report-interval=10 :表示每10秒输出一次测试进度报告,输出对应下面的,压测中的测试报告
## --percentile=99  表示设定采样比例,默认是 95%,即丢弃1%的长请求,在剩余的99%里取最大值,根据需要设定[postgres@oradb bin]$ ./sysbench --db-driver=pgsql --pgsql-host=127.0.0.1 --pgsql-port=5432 --pgsql-user=postgres --pgsql-password=postgres --pgsql-db=test_db --tables=4 --table-size=100000 --threads=50 --time=60 --events=0 --report-interval=10 --percentile=99 /opt/sysbench/share/sysbench/oltp_read_write.lua prepare
sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)Initializing worker threads...Creating table 'sbtest2'...
Creating table 'sbtest3'...
Creating table 'sbtest1'...
Creating table 'sbtest4'...
Inserting 100000 records into 'sbtest4'
Inserting 100000 records into 'sbtest2'
Inserting 100000 records into 'sbtest3'
Inserting 100000 records into 'sbtest1'
Creating a secondary index on 'sbtest2'...
Creating a secondary index on 'sbtest4'...
Creating a secondary index on 'sbtest1'...
Creating a secondary index on 'sbtest3'...
[postgres@oradb bin]$ ./sysbench \
--db-driver=pgsql \
--pgsql-host=127.0.0.1 \
--pgsql-port=5432 \
--pgsql-user=postgres \
--pgsql-password=postgres \
--pgsql-db=test_db \
--tables=4 \
--table-size=10000000 \
--threads=50 \
--time=60 \
--events=0 \
--report-interval=10 \
--percentile=99 \
/opt/sysbench/share/sysbench/oltp_read_write.lua \
run[postgres@oradb bin]$ ./sysbench \
> --db-driver=pgsql \
> --pgsql-host=127.0.0.1 \
> --pgsql-port=5432 \
> --pgsql-user=postgres \
> --pgsql-password=postgres \
> --pgsql-db=test_db \
> --tables=4 \
> --table-size=10000000 \
> --threads=50 \
> --time=60 \
> --events=0 \
> --report-interval=10 \
> --percentile=99 \
> /opt/sysbench/share/sysbench/oltp_read_write.lua \
> run
sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)Running the test with following options:
Number of threads: 50
Report intermediate results every 10 second(s)
Initializing random number generator from current timeInitializing worker threads...Threads started![ 10s ] thds: 50 tps: 531.59 qps: 10688.54 (r/w/o: 7490.91/541.39/2656.24) lat (ms,99%): 267.41 err/s: 0.00 reconn/s: 0.00
[ 20s ] thds: 50 tps: 564.62 qps: 11294.86 (r/w/o: 7907.22/594.12/2793.51) lat (ms,99%): 147.61 err/s: 0.00 reconn/s: 0.00
[ 30s ] thds: 50 tps: 492.70 qps: 9847.37 (r/w/o: 6891.55/530.89/2424.93) lat (ms,99%): 219.36 err/s: 0.00 reconn/s: 0.00
[ 40s ] thds: 50 tps: 530.54 qps: 10616.09 (r/w/o: 7433.75/586.42/2595.92) lat (ms,99%): 337.94 err/s: 0.00 reconn/s: 0.00
[ 50s ] thds: 50 tps: 546.21 qps: 10929.92 (r/w/o: 7650.79/624.86/2654.27) lat (ms,99%): 227.40 err/s: 0.00 reconn/s: 0.00
[ 60s ] thds: 50 tps: 489.99 qps: 9790.48 (r/w/o: 6853.25/570.69/2366.55) lat (ms,99%): 320.17 err/s: 0.00 reconn/s: 0.00
SQL statistics:queries performed:read:                            442484write:                           34537other:                           155099total:                           632120transactions:                        31606  (525.82 per sec.)queries:                             632120 (10516.34 per sec.)ignored errors:                      0      (0.00 per sec.)reconnects:                          0      (0.00 per sec.)General statistics:total time:                          60.1069stotal number of events:              31606Latency (ms):min:                                    2.37avg:                                   95.02max:                                 1281.3099th percentile:                      253.35sum:                              3003184.77Threads fairness:events (avg/stddev):           632.1200/11.06execution time (avg/stddev):   60.0637/0.03[postgres@oradb bin]$ 

清理测试数据

[postgres@oradb bin]$ ./sysbench \
> --db-driver=pgsql \
> --pgsql-host=127.0.0.1 \
> --pgsql-port=5432 \
> --pgsql-user=postgres \
> --pgsql-password=postgres \
> --pgsql-db=test_db \
> --tables=4 \
> --table-size=10000000 \
> --threads=50 \
> --time=60 \
> --events=0 \
> --report-interval=10 \
> --percentile=99 \
> /opt/sysbench/share/sysbench/oltp_read_write.lua \
> cleanup
sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)Dropping table 'sbtest1'...
Dropping table 'sbtest2'...
Dropping table 'sbtest3'...
Dropping table 'sbtest4'...
[postgres@oradb bin]$ 
[postgres@oradb bin]$ 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/11566.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

stm32硬件实现与w25qxx通信

使用的型号为stm32f103c8t6与w25q64。 STM32CubeMX配置与引脚衔接 根据stm32f103c8t6引脚手册&#xff0c;采用B12-B15四个引脚与W25Q64连接&#xff0c;实现SPI通信。 W25Q64SCK&#xff08;CLK&#xff09;PB13MOSI&#xff08;DI&#xff09;PB15MISO(DO)PB14CS&#xff08…

软件工程概论试题五

一、多选 1.好的软件的基本属性包括()。 A. 效率 B. 可依赖性和信息安全性 C. 可维护性 D.可接受性 正答&#xff1a;ABCD 2.软件工程的三要素是什么()? A. 结构化 B. 工具 C.面向对象 D.数据流! E.方法 F.过程 正答&#xff1a;BEF 3.下面中英文术语对照哪些是正确的、且是属…

FBX SDK的使用:基础知识

Windows环境配置 FBX SDK安装后&#xff0c;目录下有三个文件夹&#xff1a; include 头文件lib 编译的二进制库&#xff0c;根据你项目的配置去包含相应的库samples 官方使用案列 动态链接 libfbxsdk.dll, libfbxsdk.lib是动态库&#xff0c;需要在配置属性->C/C->预…

知识库管理在提升企业决策效率与知识共享中的应用探讨

内容概要 知识库管理是指企业对内部知识、信息进行系统化整理和管理的过程&#xff0c;其重要性在于为企业决策提供了坚实的数据支持与参考依据。知识库管理不仅能够提高信息的获取速度&#xff0c;还能有效减少重复劳动&#xff0c;提升工作效率。在如今快速变化的商业环境中…

基于vue船运物流管理系统设计与实现(源码+数据库+文档)

船运物流管理系统目录 目录 基于springboot船运物流管理系统设计与实现 一、前言 二、系统功能设计 三、系统实现 1、管理员登录 2、货运单管理 3、公告管理 4、公告类型管理 5、新闻管理 6、新闻类型管理 四、数据库设计 1、实体ER图 五、核心代码 六、论文参考…

【自然语言处理(NLP)】深度学习架构:Transformer 原理及代码实现

文章目录 介绍Transformer核心组件架构图编码器&#xff08;Encoder&#xff09;解码器&#xff08;Decoder&#xff09; 优点应用代码实现导包基于位置的前馈网络残差连接后进行层规范化编码器 Block编码器解码器 Block解码器训练预测 个人主页&#xff1a;道友老李 欢迎加入社…

Spring Boot 实例解析:配置文件

SpringBoot 的热部署&#xff1a; Spring 为开发者提供了一个名为 spring-boot-devtools 的模块来使用 SpringBoot 应用支持热部署&#xff0c;提高开发者的效率&#xff0c;无需手动重启 SpringBoot 应用引入依赖&#xff1a; <dependency> <groupId>org.springfr…

Linux网络 HTTPS 协议原理

概念 HTTPS 也是一个应用层协议&#xff0c;不过 是在 HTTP 协议的基础上引入了一个加密层。因为 HTTP的内容是明文传输的&#xff0c;明文数据会经过路由器、wifi 热点、通信服务运营商、代理服务器等多个物理节点&#xff0c;如果信息在传输过程中被劫持&#xff0c;传输的…

java练习(5)

ps:题目来自力扣 给你两个 非空 的链表&#xff0c;表示两个非负的整数。它们每位数字都是按照 逆序 的方式存储的&#xff0c;并且每个节点只能存储 一位 数字。 请你将两个数相加&#xff0c;并以相同形式返回一个表示和的链表。 你可以假设除了数字 0 之外&#xff0c;这…

深入 Rollup:从入门到精通(三)Rollup CLI命令行实战

准备阶段&#xff1a;初始化项目 初始化项目&#xff0c;这里使用的是pnpm&#xff0c;也可以使用yarn或者npm # npm npm init -y # yarn yarn init -y # pnpm pnpm init安装rollup # npm npm install rollup -D # yarn yarn add rollup -D # pnpm pnpm install rollup -D在…

MySQL数据库环境搭建

下载MySQL 官网&#xff1a;https://downloads.mysql.com/archives/installer/ 下载社区版就行了。 安装流程 看b站大佬的视频吧&#xff1a;https://www.bilibili.com/video/BV12q4y1477i/?spm_id_from333.337.search-card.all.click&vd_source37dfd298d2133f3e1f3e3c…

松灵机器人 scout ros2 驱动 安装

必须使用 ubuntu22 必须使用 链接的humble版本 #打开can 口 sudo modprobe gs_usbsudo ip link set can0 up type can bitrate 500000sudo ip link set can0 up type can bitrate 500000sudo apt install can-utilscandump can0mkdir -p ~/ros2_ws/srccd ~/ros2_ws/src git cl…

【最长上升子序列Ⅱ——树状数组,二分+DP,纯DP】

题目 代码&#xff08;只给出树状数组的&#xff09; #include <bits/stdc.h> using namespace std; const int N 1e510; int n, m; int a[N], b[N], f[N], tr[N]; //f[i]表示以a[i]为尾的LIS的最大长度 void init() {sort(b1, bn1);m unique(b1, bn1) - b - 1;for(in…

Linux安装zookeeper

1, 下载 Apache ZooKeeperhttps://zookeeper.apache.org/releases.htmlhttps://zookeeper.apache.org/releases.htmlhttps://zookeeper.apache.org/releases.htmlhttps://zookeeper.apache.org/releases.htmlhttps://zookeeper.apache.org/releases.htmlhttps://zookeeper.apa…

day6手机摄影社区,可以去苹果摄影社区学习拍摄技巧

逛自己手机的社区&#xff1a;即&#xff08;手机牌子&#xff09;摄影社区 拍照时防止抖动可以控制自己的呼吸&#xff0c;不要大喘气 拍一张照片后&#xff0c;如何简单的用手机修图&#xff1f; HDR模式就是让高光部分和阴影部分更协调&#xff08;拍风紧时可以打开&…

linux本地部署deepseek-R1模型

国产开源大模型追平甚至超越了CloseAI的o1模型&#xff0c;大国崛起时刻&#xff01;&#xff01;&#xff01; DeepSeek R1 本地部署指南   在人工智能技术飞速发展的今天&#xff0c;本地部署AI模型成为越来越多开发者和企业关注的焦点。本文将详细介绍如何在本地部署DeepS…

小程序-基础加强-自定义组件

前言 这次讲自定义组件 1. 准备今天要用到的项目 2. 初步创建并使用自定义组件 这样就成功在home中引入了test组件 在json中引用了这个组件才能用这个组件 现在我们来实现全局引用组件 在app.json这样使用就可以了 3. 自定义组件的样式 发现页面里面的文本和组件里面的文…

c语言(关键字)

前言&#xff1a; 感谢b站鹏哥c语言 内容&#xff1a; 栈区&#xff08;存放局部变量&#xff09; 堆区 静态区&#xff08;存放静态变量&#xff09; rigister关键字 寄存器&#xff0c;cpu优先从寄存器里边读取数据 #include <stdio.h>//typedef&#xff0c;类型…

【最长不下降子序列——树状数组、线段树、LIS】

题目 代码 #include <bits/stdc.h> using namespace std; const int N 1e510; int a[N], b[N], tr[N];//a保存权值&#xff0c;b保存索引,tr保存f&#xff0c;g前缀属性最大值 int f[N], g[N]; int n, m; bool cmp(int x, int y) {if(a[x] ! a[y]) return a[x] < a[…

springboot 启动原理

目标&#xff1a; SpringBootApplication注解认识了解SpringBoot的启动流程 了解SpringFactoriesLoader对META-INF/spring.factories的反射加载认识AutoConfigurationImportSelector这个ImportSelector starter的认识和使用 目录 SpringBoot 启动原理SpringBootApplication 注…