¹¤¾ßÔËÐзÖΪ4¸ö²½Ö裺
´´½¨Êý¾Ý¿âºÍ±í
²åÈëÊý¾Ý
Ö´Ðвéѯ¸üеȲÙ×÷ query£¨²âÊÔµÄÖ÷ÒªÄÚÈÝ£©ÒÔϳÆΪ²éѯ
ɾ³ýÊý¾Ý¿â
1.ʹÓÃ×Ô¶¯Éú³ÉµÄ½Å±¾²âÊÔ
mysqlslap --help¿ÉÒԲ鿴¾ßÌåµÄ²ÎÊýµÄÓ÷¨
Àý×Ó£ºmysqlslap --concurrency=50,100,200 --iterations=20
--number-int-cols=4 --number-char-cols=35 --auto-generate-sql
--auto-generate-sql-add-autoincrement
--auto-generate-sql-load-type=read --engine=myisam,innodb
--number-of-queries=200 --verbose
--socket=/usr/local/mysql1/var/mysql.sock -u root -p123
ʹÓÃϵͳ×Ô´øµÄ½Å±¾²âÊÔ£¬Ôö¼Óauto_incrementÒ»ÁУ¬int4ÁÐchar35ÁУ¬²âÊÔ2ÖÖÒýÇæmyisam,innodb¶ÁµÄÐÔÄÜ
·Ö±ðÓÃ50£¬100£¬200¸ö¿Í»§¶Ë¶Ô·þÎñÆ÷½øÐвâÊÔ×ܹ²200¸ö²éѯÓï¾ä Ö´ÐÐ20´Î²éѯ
¼Ó¸ö--only-print²»Á¬½ÓÊý¾Ý¿âÖ»´òÓ¡Òª×öʲô
Benchmark
Running for engine myisam
Average number of seconds to run all queries: 0.897 seconds
Minimum number of seconds to run all queries: 0.081 seconds
Maximum number of seconds to run all queries: 1.239 seconds
Number of clients running queries: 50
Average number of queries per client: 4
###### 50¸ö²¢·¢¿Í»§¶Ë ƽ¾ùÿ¸ö¿Í»§¶Ë4¸ö²éѯ 20´Î²éѯÖÐ×îÉÙµÄʱ¼äÊÇ0.081Ãë¡¢ ×î¶à1.239Ãë¡¢
ƽ¾ù0.897Ãë¡£
Benchmark
Running for engine myisam
Average number of seconds to run all queries: 1.544 seconds
Minimum number of seconds to run all queries: 0.000 seconds
Maximum number of seconds to run all queries: 4.174 seconds
Number of clients running queries: 100
Average number of queries per client: 2
Benchmark
Running for engine myisam
Average number of seconds to run all queries: 1.671 seconds
Minimum number of seconds to run all queries: 0.005 seconds
Maximum number of seconds to run all queries: 5.724 seconds
Number of clients running queries: 200
Average number of queries per client: 1
Benchmark
Running for engine innodb
Average number of seconds to run all queries: 1.074 seconds
Minimum number of seconds to run all queries: 0.000 seconds
Maximum number of seconds to run all queries: 1.994 seconds
Number of clients running queries: 50
Average number of queries per client: 4
Benchmark
Running for engine innodb
Average number of seconds to run all queries: 1.088 seconds
Minimum number of seconds to run all queries: 0.000 seconds
Maximum number of seconds to run all queries: 1.793 seconds
Number of clients running queries: 100
Average number of queries per client: 2
Benchmark
Running for engine innodb
Average number of seconds to run all queries: 1.415 seconds
Minimum number of seconds to run all queries: 0.006 seconds
Maximum number of seconds to run all queries: 2.212 seconds
Number of clients running queries: 200