mysql簡單效能測試

zhouwf0726發表於2019-05-17
[mysql@MYSQL-DB01 ~]$ mysqlslap --concurrency=500,1000 --iterations=2 --number-int-cols=4 --number-char-cols=35 --auto-generate-sql --auto-generate-sql-add-autoincrement --auto-generate-sql-load-type=mixed --engine=myisam,innodb --number-of-queries=500000 --debug-info -uroot -p
Enter password:
Benchmark
        Running for engine myisam
        Average number of seconds to run all queries: 48.603 seconds
        Minimum number of seconds to run all queries: 48.429 seconds
        Maximum number of seconds to run all queries: 48.778 seconds
        Number of clients running queries: 500
        Average number of queries per client: 1000
Benchmark
        Running for engine myisam
        Average number of seconds to run all queries: 55.209 seconds
        Minimum number of seconds to run all queries: 54.946 seconds
        Maximum number of seconds to run all queries: 55.472 seconds
        Number of clients running queries: 1000
        Average number of queries per client: 500
Benchmark
        Running for engine innodb
        Average number of seconds to run all queries: 172.293 seconds
        Minimum number of seconds to run all queries: 172.184 seconds
        Maximum number of seconds to run all queries: 172.402 seconds
        Number of clients running queries: 500
        Average number of queries per client: 1000
Benchmark
        Running for engine innodb
        Average number of seconds to run all queries: 141.034 seconds
        Minimum number of seconds to run all queries: 126.069 seconds
        Maximum number of seconds to run all queries: 156.000 seconds
        Number of clients running queries: 1000
        Average number of queries per client: 500

User time 84.97, System time 62.79
Maximum resident set size 39364, Integral resident set size 0
Non-physical pagefaults 44150, Physical pagefaults 2, Swaps 0
Blocks in 0 out 0, Messages in 0 out 0, Signals 0
Voluntary context switches 8051186, Involuntary context switches 13403

[mysql@MYSQL-DB01 data]$ mysqlslap --concurrency=5 --iterations=1 --create-schema='test' --query='select count(1) from test.t' --number-of-queries=20 --debug-info -uroot -p
Enter password:
Benchmark
        Average number of seconds to run all queries: 294.072 seconds
        Minimum number of seconds to run all queries: 294.072 seconds
        Maximum number of seconds to run all queries: 294.072 seconds
        Number of clients running queries: 5
        Average number of queries per client: 4

User time 0.00, System time 0.00
Maximum resident set size 1780, Integral resident set size 0
Non-physical pagefaults 520, Physical pagefaults 0, Swaps 0
Blocks in 0 out 0, Messages in 0 out 0, Signals 0
Voluntary context switches 163, Involuntary context switches 2

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/756652/viewspace-715769/,如需轉載,請註明出處,否則將追究法律責任。

相關文章