一些局部及整体压力测试(基准确定)的工具Benchmarking Tools

 

Full-Stack Tools:测试整个Web应用的一些工具。

ab
ab is a well-known Apache HTTP server benchmarking tool. It shows how many
requests per second your HTTP server is capable of serving. If you are bench-
marking a web application, this translates to how many requests per second the
entire application can satisfy. It’s a very simple tool, but its usefulness is also lim-
ited because it just hammers one URL as fast as it can. More information on ab
is available at http://httpd.apache.org/docs/2.0/programs/ab.html.
http_load
This tool is similar in concept to ab; it is also designed to load a web server, but
it’s more flexible. You can create an input file with many different URLs, and
http_load will choose from among them at random. You can also instruct it to
issue requests at a timed rate, instead of just running them as fast as it can. See
http://www.acme.com/software/http_load/ for more information.
JMeter
JMeter is a Java application that can load another application and measure its
performance. It was designed for testing web applications, but you can also use
it to test FTP servers and issue queries to a database via JDBC.
JMeter is much more complex than ab and http_load. For example, it has fea-
tures that let you simulate real users more flexibly, by controlling such parame-
ters as ramp-up time. It has a graphical user interface with built-in result
graphing, and it offers the ability to record and replay results offline. For more
information, see http://jakarta.apache.org/jmeter/.

 

Single-Component Tools:数据库端的压力测试工具。

mysqlslap
mysqlslap (http://dev.mysql.com/doc/refman/5.1/en/mysqlslap.html) simulates
load on the server and reports timing information. It is part of the MySQL 5.1
server distribution, but it should be possible to run it against MySQL 4.1 and
newer servers. You can specify how many concurrent connections it should use,
and you can give it either a SQL statement on the command line or a file con-
taining SQL statements to run. If you don’t give it statements, it can also auto-
generate SELECT statements by examining the server’s schema.
sysbench
sysbench (http://sysbench.sourceforge.net) is a multithreaded system benchmark-
ing tool. Its goal is to get a sense of system performance, in terms of the factors
important for running a database server. For example, you can measure the per-
formance of file I/O, the OS scheduler, memory allocation and transfer speed,
POSIX threads, and the database server itself. sysbench supports scripting in the
Lua language (http://www.lua.org), which makes it very flexible for testing a vari-
ety of scenarios.
Database Test Suite
The Database Test Suite, designed by The Open-Source Development Labs
(OSDL) and hosted on SourceForge at http://sourceforge.net/projects/osdldbt/,isa
test kit for running benchmarks similar to some industry-standard benchmarks,
such as those published by the Transaction Processing Performance Council
(TPC). In particular, the dbt2 test tool is a free (but uncertified) implementation
of the TPC-C OLTP test. It supports InnoDB and Falcon; at the time of this writ-
ing, the status of other transactional MySQL storage engines is unknown.

MySQL Benchmark Suite (sql-bench)
MySQL distributes its own benchmark suite with the MySQL server, and you
can use it to benchmark several different database servers. It is single-threaded
and measures how quickly the server executes queries. The results show which
types of operations the server performs well.
The main benefit of this benchmark suite is that it contains a lot of predefined
tests that are easy to use, so it makes it easy to compare different storage engines
or configurations. It’s useful as a high-level benchmark, to compare the overall
performance of two servers. You can also run a subset of its tests (for example,
just testing UPDATE performance). The tests are mostly CPU-bound, but there are
short periods that demand a lot of disk I/O.

The biggest disadvantages of this tool are that it’s single-user, it uses a very small
dataset, you can’t test your site-specific data, and its results may vary between
runs. Because it’s single-threaded and completely serial, it will not help you
assess the benefits of multiple CPUs, but it can help you compare single-CPU
servers.
Perl and DBD drivers are required for the database server you wish to bench-
mark. Documentation is available at http://dev.mysql.com/doc/en/mysql-
benchmarks.html/.
Super Smack
Super Smack (http://vegan.net/tony/supersmack/) is a benchmarking, stress-
testing, and load-generating tool for MySQL and PostgreSQL. It is a complex,
powerful tool that lets you simulate multiple users, load test data into the data-
base, and populate tables with randomly generated data. Benchmarks are con-
tained in “smack” files, which use a simple language to define clients, tables,
queries, and so on.

                                                                                          ———-High.Performance.MySQL_Second.Edition

标签: ,

留下回复