sysbench 1.0.17 (using system LuaJIT 2.0.4)
Running the test with following options:
Number of threads: 1280
Report intermediate results every 5 second(s)
Initializing random number generator from current time
Initializing worker threads...
FATAL: Cannot find benchmark '/usr/share/sysbench/oltp_point_select.lua': no such built-in test, file or module
FATAL: unable to connect to MySQL server on host '127.0.0.1', port 3306, aborting...
FATAL: error 2004: Can't create TCP/IP socket (24)
FATAL: `thread_init' function failed: /usr/share/sysbench/oltp_common.lua:349: connection creation failed
FATAL: /usr/share/sysbench/oltp_point_select.lua:22: module 'oltp_common' not found:
ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 63389
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 63389
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
可能看到 open files值为默认1024,这里我们改大:
echo"
* hard nofile 65535
* soft nofile 65535
">>/etc/security/limits.conf
ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 63389
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 65535
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 63389
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
新开ssh窗口或重启系统后重新测试即可。