HP OSMS: MySQL Sizing Guide for HP
ProLiant c-Class Blade Servers
HP Part Number: 5992-4755
Published: March 2008
Edition: 1.0
Table of Contents
Table of Contents
3
4
List of Figures
5
6
List of Tables
7
8
Introduction
HP Open Source Middleware Stacks (OSMS) offer building block applications, such as the Web
Server; technical blueprints, and documents such as this MySQL Sizing Guide which describes
the maximum MySQL workload that HP ProLiant c-Class Blade Servers are capable of supporting;
and consulting services to speed the successful implementation of an open source strategy.
Executive Summary
The HP Open Source Integrated Portfolio (HP OSIP) comprises a range of products and services
designed to verify that customers can successfully realize the cost and feature benefits of adopting
open source software in their IT environments. HP Open Source foundation components include
the base components of an open source-based ecosystem. HP servers and storage are validated
to run the Linux operating system together with the supported commercial Linux distribution.
This results published in this document were achieved using the SysBench benchmark for each
of the HP ProLiant c-Class Blade Servers. Various test configurations and test environments were
used and documented to provide readers an opportunity to understand the testing methodology.
Intended Audience
The intended audience for this document is anyone who is interested in determining the number
of database workload that can be supported on a given HP ProLiant c-Class Blade Server and
details for deploying a hardware environment based on the database requirements of certain
applications.
Scope and Purpose
This document presents the results of a series of benchmark tests performed using the SysBench
software test suite. The tests were conducted running a MySQL database server to evaluate
system performance when running a database under a heavy load. The following HP ProLiant
servers were used in this test: BL460c, BL480c, BL465c, and BL685c. The benchmark data provided
in this sizing guide can assist customers in determining which HP Proliant c-Class Blade Server
meets their MySQL database requirements along with how-to information for configuring the
HP Proliant c-Class Blade Server and storage in a specific production environment.
HP provides quality assurance from extensive integration testing with open source software and
HP hardware so that you can confidently deploy the complete stack. Once you have completed
a successful evaluation, you have the flexibility to “do it yourself” or get assistance from HP to
incorporate open source stacks into your existing IT infrastructure.
HP Services
HP Open Source Consulting Services can help you build and integrate open source and commercial
software across multiple operating system (OS) environments. Additionally, HP Open Source
Support Services provide industry leading technical support for all the products HP sells,
including hardware, operating systems, and open source middleware.
To learn more about HP Open Source Consulting and Support Services, contact your local HP
sales representative or visit the HP Business and IT Services website at:
For the location of the nearest sales office, call:
•
•
•
•
•
In the United States: +1 800 637 7740
In Canada: +1 905 206 4725
In Japan: +81 3 3331 6111
In Latin America: +1 305 267 4220
In Australia/New Zealand: +61 3 9272 2895
Introduction
9
•
•
In Asia Pacific: +8522 599 7777
In Europe/Africa/Middle East: +41 22 780 81 11
10
Typographic Conventions
This document uses the following typographic conventions.
Command
ComputerOut
Ctrl-x
A command name or qualified command phrase.
Text displayed by the computer.
A key sequence. A sequence such as Ctrl-x indicates that
you must hold down the key labeled Ctrl while you press
another key or button.
ENVIRONVAR
The name of an environment variable, for example, PATH.
[ERRORNAME]
The name of an error, usually returned in the errno
variable.
Key
The name of a keyboard key. Return and Enter both refer
to the same key.
Term
UserInput
The defined use of an important word or phrase.
Commands and other text that you type.
VARIABLE
The name of a placeholder in a command, function, or
other syntax display that you replace with an actual value.
\ (continuation character) A backslash (\) at the end of a line of code (such as a
command) indicates that the following line of code is
contiguous, and you must not insert a line break. This
convention facilitates the typesetting of long lines of code
examples on a printed page. If you cut and paste sample
code from this publication, ensure that you remove
backslash characters at line endings.
...
The preceding element can be repeated an arbitrary number
of times.
|
Separates items in a list of choices.
Publishing History
The document publishing date and part number indicate the current edition of the document.
The publishing date changes when a new edition is printed. Minor changes might be made
without changing the publishing date. The document part number changes only when extensive
changes are made. Document updates might be issued between editions to correct errors or
document product changes. For the latest version of this document online, see the HP Technical
Documentation website at:
Manufacturing Part
Number
Supported OS
Edition
Number
Publication Date
5992-4755
Red Hat Enterprise Linux 5 AS Update 1
(RHEL5ASu1)
1
March 2008
HP Encourages Your Comments
HP encourages your comments concerning this document. We are committed to providing
documentation that meets your needs. Send any errors found, suggestions for improvement, or
compliments to:
Include the document title, manufacturing part number, and any comment, error found, or
suggestion for improvement you have concerning this document.
Introduction
11
Benchmark Software
The SysBench test suite is an open source, cross-platform, multi-threaded benchmark tool for
evaluating system performance when running a database under a heavy load. Depending on
the options used, SysBench can be used to test the following system components:
•
•
•
•
•
File I/O performance
Scheduler performance
Memory allocation and transfer speed
POSIX threads implementation performance
Database server performance (OLTP benchmark)
The results documented in this document were obtained using the SysBench test suite to generate
results in an environment using the MySQL database server on Proliant systems (x86_64) running
Table 1 Test Software Environment
Software
Website
SysBench version 0.4.8
Red Hat Enterprise Linux 5 AS Update 1 (RHEL5 AS u1) N/A
MySQL database server version 5.0.46 (for an x86_64
system)
This paper describes the results of overall database server performance based on the OLTP
benchmark. Because this represents a transactional workload, the InnoDB storage engine was
used for the MySQL database server. Four different servers from the HP ProLiant family were
used for each of the OLTP tests. Each test was performed using read-only queries and then with
read/write queries and a varied number of connections. Additionally, each of the tests were
performed when the MySQL data files were located on the local attached storage (SAS), as well
as Fibre Channel attached Storage Area Network (SAN) on an HP StorageWorks 1500 Modular
Smart Array (MSA1500).
Hardware Test Environment
This benchmark was performed within an HP BladeSystem c-Class blade enclosure with enhanced
hardware test environment.
Table 2 Test Hardware Environment
Hardware
BL460c
BL465c
BL480c
BL685c
CPU
(2) Quad-Core Intel® (2) Dual-Core AMD
Xeon® processor X5365 Opteron™ processor
(2) Quad-Core Intel® (2) Dual-Core AMD
Xeon® processor X5365 Opteron processor
(3.0 GHz/4MB L2 cache 2218 (2.6 GHz/1MB L2 (3.0 GHz/4MB L2 cache Model 8218 (2.6
per core)
cache per core)
per core)
GHz/1MB L2 cache per
core)
Memory
16GB (8x2GB PC2-5300 14GB (6x2GB+ 2x1GB 24GB (12x2GB
12GB (6x2GB PC2-5300
DDR2)
DDR2)
PC2-5300 DDR2)
PC2-5300 DDR2)
Disk Storage
2 x 73GB SAS Smart
2 x 73GB SAS Smart
4 x 73GB SAS Smart
2 x 73GB SAS Smart
Array E200i controller Array E200i controller Array P400i controller Array E200i controller
with Battery Backed
Write Cache (BBWC)
and Fibre Channel
attached MSA1500
with Battery Backed
Write Cache (BBWC)
and Fibre Channel
attached MSA1500
with Battery Backed
Write Cache (BBWC)
and Fibre Channel
attached MSA1500
with Battery Backed
Write Cache (BBWC)
and Fibre Channel
attached MSA1500
12
Table 2 Test Hardware Environment (continued)
Hardware
BL460c
BL465c
BL480c
BL685c
File System
Partitioning
(ext3 – no LVM):
Disk0: /, /boot, swap
(ext3 – no LVM):
Disk0: /, /boot, swap
(ext3 – no LVM):
Disk0: /, /boot, swap
(ext3 – no LVM):
Disk0: /, /boot, swap
Disk1: FC attach – 7
Disk1: FC attach – 7
Disk1: FC attach – 7
Disk1: FC attach – 7
36GB disks 10k RPM, 36GB disks 10k RPM, 36GB disks 10k RPM, 36GB disks 10k RPM,
RAID 0
RAID 0
RAID 0
RAID 0
Operating
System
RHEL5 AS u1 SMP
kernel (2.6.18-53.el5)
with errata updates
RHEL5 AS u1 SMP
kernel (2.6.18-53.el5)
with errata updates
RHEL5 AS u1 SMP
kernel (2.6.18-53.el5)
with errata updates
RHEL5 AS u1 SMP
kernel (2.6.18-53.el5)
with errata updates
SysBench Configuration
The OLTP test mode emulates real database usage by issuing common SQL queries on typical
table structures. SysBench populates the following table with oltp-table-size rows at the beginning
of the test.
CREATE TABLE `sbtest` (
`id` int(10) unsigned NOT NULL auto_increment,
`k` int(10) unsigned NOT NULL default '0',
`c` char(120) NOT NULL default '',
`pad` char(60) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `k` (`k`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
To test general purpose database performance, the complex test mode was used. The InnoDB
storage engine supports ACID compliant transactions; therefore, the SysBench uses
in testing.
Table 3 SQL Queries
Type of Query
Point queries
Range queries
SQL Query Syntax
SELECT c FROM sbtest WHERE id=N
SELECT c FROM sbtest WHERE id BETWEEN N and M
SELECT SUM(c) FROM sbtest WHERE id BETWEEN N AND M
Range SUM()
queries
Ordered range
queries
SELECT c FROM sbtest WHERE id BETWEEN N AND M ORDER BY c
SELECT DISTINCT c FROM sbtest WHERE id BETWEEN N AND M ORDER BY c
UPDATE sbtest SET k=k+1 WHERE id=N
Distinct range
queries
Updates on
indexed column
Updates on
non-index column
UPDATE sbtest SET c=N WHERE id=N
Delete queries
Insert queries
DELETE FROM sbtest WHERE id=N
INSERT INTO sbtest VALUES (...)
Table 4 lists the configuration options that were used for SysBench.
SysBench Configuration
13
Table 4 SysBench Options
SysBench option
Value
Description
--test
oltp
OLTP emulates operations that a read database would perform. Other
options are CPU, threads, mutex, memory, and fileio.
--oltp-table-size
1000000
Sets the number of rows in the test table.
--mysql-engine-trx yes
Sets the value for whether the storage engine used is transactional.
--oltp-test-mode
complex
Determines how transactions are performed. Options are simple (very
simple SELECTs), complex (transactional), and nontrx (non-transactional).
--oltp-read-only .
on/off
Sets whether the UPDATE/DELETE/INSERT queries are used. Both cases
were run for these tests.
--oltp-dist-type
--max-requests
special
0
Allows for the ditribution of random numbers
Sets the total number of requests allowed. The value “0” indicates
unlimited requests are allowed.
--num-threads
--init-rng
varied from 1 to 128 Sets the number of worker threads.
on
Initializes the random number generator.
--max-time
180
Sets the limit for total execution time in seconds.
MySQL Installation
The MySQL Certified Software, downloaded from the MySQL Network, provides the
mysql-enterprise-gpl-5.0.46-0.rhel5.x86_64.tarfile for RHEL5 on x86_64 servers.
Table 5 lists the components contained in the tar file.
Table 5 MySQL Installation Packages
RPM Package
Description
MySQL-server-enterprise-gpl-5.0.46-0.rhel5.x86_64.rpm
MySQL-client-enterprise-gpl-5.0.46-0.rhel5.x86_64.rpm
MySQL database server (mysqld, etc)
MySQL client programs (mysql,
mysqladmin, etc)
MySQL-devel-enterprise-gpl-5.0.46-0.rhel5.x86_64.rpm
MySQL header files and libraries
(needed to build SysBench )
MySQL Configuration
The example configuration file (my-large.cnf) that is provided with the MySQL database
the mysqld configuration.
Table 6 MySQL Test Configuration
mysqld Option
Value
1600
10
Description
max_connections
max_connect_errors
Maximum number of connections. The default is 100.
Number of interrupted connections from a host after which
connections are blocked.
table_cache
2048
Number of open tables for all threads. The default is 512.
sort_buffer_size
512K
Buffer size for each thread that needs to sort results. Increase
for faster ORDER BY and GROUP BY operations.
binlog_cache_size
1M
Size of cache to hold SQL statements for the binary log
during a transaction. Increase for large, multiple-statement
transactions.
14
Table 6 MySQL Test Configuration (continued)
mysqld Option
Value
Description
join_buffer_size
1M
Buffer size for joins that do not use indices and require a
full table scan.
thread_cache_size
thread_stack
16
Number of server threads to cache for reuse.
Per-thread stack size. The default is 192K.
192K
0
query_cache_size
Amount of memory allocated for caching query results. The
value “0” disables query cache.
ft_min_word_len
4
Minimum length of the word to be included in a full-text
index.
tmp_table_size
64M
Maximum size of in-memory temp tables. Increase for
GROUP BY.
innodb_data_file_path
innodb_buffer_pool_size
ibdata1:100M\
:autoextend
Path to innodb data files and sizes. Increase size from 10MB
to 100MB.
1900M
Number of bytes of the memory buffer to cache data and
indices.
innodb_additional_mem_pool_size 20M
Number of bytes of memory pool used to store the data
dictionary information and data structures. The default is
1M.
innodb_log_file_size
900M
Size of each log file in log group. The default is 5MB.
innodb_flush_log_at_trx_commit 2
Determines how the log buffer is written to the disk. The
value “2” means data is flushed on every commit, but no
disk flush occurs. The default is 1.
innodb_locks_unsafe_for_binlog 1
Controls next-key locking in search and index scans. The
default is 0 (disabled).
innodb_thread_concurrency
innodb_concurrency_tickets
Innodb_log_buffer_size
1000
Number of threads currently inside the innodb engine. The
default varies with the MySQL version.
500
8M
Number of 'free tickets' to allow re-entry into the innodb
engine.
The size of buffer InnoDB used in the memory to write the
log files. Ranges from 1MB to 8MB. Large log buffer saves
disk I/O operations.
innodb_table_locks
innodb_support_xa
innodb_doublewrite
0
0
Specifies whether InnoDB locks a table internally. The
default is 1 (enabled).
Specifies whether InnoDB supports XA transactions. The
default is 1 (supported).
skip-innodb-doublewrite InnoDB stores all data twice by default. Disable it by using
the --skip-innodb-doublewrite parameter when starting the
MySQL server.
innodb_checksums
skip-innodb-checksums Checksum validation is used on all data pages by default.
Disable it by using the --skip-innodb-checksums parameter
when starting the MySQL server.
Benchmark Results
For each read-only or read/write test, SysBench was run with a varying number of thread
connections to determine the maximum transactions per second (tps). The tests were conducted
on both the internal storage with the battery backed write cache option (BBWC) and the Fibre
Channel attached Storage Area Network.
Benchmark Results
15
Depending on whether the application requires many read/write queries, it may help to set the
database connection pool to the number of processing cores. For read-only testing, all HP Proliant
c-Class Blade Servers in the test can still handle almost the same number of transactions even
though the number of concurrent threads is double the number of processing cores. Therefore,
more database connections than the number of processing cores for read-only applications can
be used.
NOTE: For read/write testing, the maximum performance (shown in bold in the following
result tables) was achieved when the number of concurrent threads was the same as the total
number of processing cores in the system.
Interpreting the Data
The results of the testing are presented in the following sections and show the maximum number
of tps that each of the systems can handle, depending on the number of threads. The precise
database query load and mix of queries that an application generates vary greatly between
applications. Another important consideration in the benchmark testing was how many concurrent
connections the application had with the database server. The results in the data tables show
that having more connections can negatively impact the throughput.
If an application requires 1200 read/write tps from 16 database connections, all of the HP Proliant
c-Class Blade Servers used in these tests are suitable because all of the test servers can handle at
least 1245 tps. For read-only applications that require 2000 tps using eight database connections,
both the HP ProLiant BL465c and BL685c servers, configured with 2 Dual-Core Opteron
processors, are suitable having a capacity of 2500 tps. The ProLiant BL460c server and BL480c
server, configured with 2 Quad-Core Xeon processors, can handle a maximum of 4500 read-only
tps and 3000 read/write tps. For an application that requires more than 4500 read-only or more
than 3000 read/write tps, consideration should be given to using MySQL Replication and spreading
the load across multiple ProLiant servers.
HP Proliant BL460c Server
The HP ProLiant BL460c server has features that are equal to standard 1U rack-mount servers.
The two-processor, dual-core or quad-core ProLiant BL460c combines power-efficient compute
power, and high density with expanded memory and I/O for maximum performance. The
ProLiant c7000 enclosure supports up to 16 BL460c server blades, two more servers than the IBM
BladeCenter, and each BL460c supports double the memory capacity of the HS21 server without
an expansion blade. The Proliant BL460c now comes with dual-core and quad-core Intel® Xeon®
processors, DDR2 fully buffered DIMMs, Serial Attached SCSI (SAS) or Serial ATA (SATA), hard
drives, and support of multi-function NICs and multiple I/O cards. The BL460c provides a
performance system ideal for the full range of scale-out applications. In this small form factor,
the BL460c includes more features to enable high-availability, such as hot plug hard drives,
mirrored memory, online spare memory, memory interleaving, embedded RAID capability, and
obtained using a ProLiant BL460c server configured with two Quad-Core Intel® Xeon® processors
running at 3.0GHz.
NOTE: Maximum performance appears in bold.
Table 7 SysBench Results for the HP ProLiant BL460c Server
Read/Write (tps)
Internal SAS
Read Only (tps)
Internal SAS
Read/Write (tps) Fibre
Channel SAN
Read Only (tps) Fibre
Channel SAN
Connections
1
2
624
794
610
809
1057
1454
1029
1330
16
Table 7 SysBench Results for the HP ProLiant BL460c Server (continued)
Read/Write (tps)
Internal SAS
Read Only (tps)
Internal SAS
Read/Write (tps) Fibre
Channel SAN
Read Only (tps) Fibre
Channel SAN
Connections
4
8
1893
3088
2604
2382
2220
1478
2615
4301
4374
4148
4006
3641
1910
3145
2690
2423
2271
1626
2593
4297
4353
4271
3990
3722
16
32
64
128
Figure 1 SysBench Results for the HP ProLiant BL460c Server
HP Proliant BL465c Server
The HP ProLiant BL465c server is a two-way server blade designed for maximum compute
density and power efficiencies. The small form factor accommodates two blades in each slot
allowing for 16 servers in a standard 6u enclosure. Each CPU is a 95 Watt version of the Dual-Core
AMD Opteron 2000 series processor, which gives the equivalent of four processing units per
server. Up to 32GB of PC2-5300 DIMMs running at 667MHz is supported. Internal storage consists
of two small form factor disk drives, either SAS or SATA attached to the integrated Smart Array
E200i RAID controller with 64MB cache supporting RAID 0, 1. An optional StorageWorks SB40c
storage blade provides connectivity to additional storage, supporting RAID 5, and ADG. The
Dual-Core Opteron processors running at 2.6 GHz.
Table 8 SysBench Results for the HP ProLiant BL465c Server
Read/Write (tps),
Internal SAS
Read Only (tps), Internal Read/Write (tps), Fibre Read Only (tps), Fibre
Connections
SAS
Channel SAN
Channel SAN
1
2
497
931
664
514
746
1340
2341
2455
2437
2302
973
1415
4
1665
1467
1245
1014
1692
2568
8
1523
2640
16
32
1298
2621
1048
2445
Benchmark Results
17
Table 8 SysBench Results for the HP ProLiant BL465c Server (continued)
Read/Write (tps),
Internal SAS
Read Only (tps), Internal Read/Write (tps), Fibre Read Only (tps), Fibre
Connections
SAS
Channel SAN
Channel SAN
64
885
621
2097
1962
911
630
2148
128
2049
Figure 2 SysBench Results for the HP ProLiant BL465c Server
HP Proliant BL480c Server
The HP ProLiant BL480c server is a 2-way server blade designed for maximum performance and
scalability. The ProLiant BL480c server can support two Quad-Core Inter Xeon processors, which
gives the equivalent of eight processing units per server. Up to 48GB (PC2-5300 DDR2, 667 MHz)
of memory is supported. Each full-height blade has a Smart Array P400i Controller that supports
four hot-swap SCSI disks in a RAID configuration. An optional dual-port Fiber Channel adapter
provides connectivity to HP and third-party storage area networks (SANs). The benchmark
processors running at 3.0 GHz.
Table 9 SysBench Results for the HP ProLiant BL480c Server
Read/Write (tps),
Internal SAS
Read Only (tps), Internal Read/Write (tps), Fibre Read Only (tps), Fibre
Connections
SAS
Channel SAN
Channel SAN
1
2
628
817
650
944
1060
1922
3125
2663
2411
2261
1604
1494
2939
4544
4635
4533
4260
3926
1070
1573
4
1951
2987
8
3177
4588
16
32
64
128
2655
4682
2435
4551
2251
4333
1634
3986
18
Figure 3 SysBench Results for the HP ProLiant BL480c Server
HP Proliant BL685c Server
The HP ProLiant BL685c server blade delivers no-compromise performance and expansion in
the densest four processor server blade form factor available. With up to four AMD Opteron™
8000 Series processors, 64GB of DDR2 memory, two hot-plug Serial Attached SCSI (SAS) or Serial
ATA (SATA) hard-drives, four embedded Gigabit NICs, and three I/O expansion slots, the HP
ProLiant BL685c delivers the density you want with the performance you need to handle the
most demanding enterprise class applications. Each blade server has a Smart Array E200i
Controller that supports two hot-swap SCSI disks in a RAID configuration. Optional dual-port
Fiber Channel adapter provides connectivity to HP and third-party storage area networks (SANs).
configured with two Dual-Core Opteron processors running at 2.6 GHz.
Table 10 SysBench Results for the HP ProLiant BL685c Server
Read/Write (tps),
Internal SAS
Read Only (tps), Internal Read/Write (tps), Fibre Read Only (tps), Fibre
Connections
SAS
Channel SAN
Channel SAN
1
2
470
951
670
497
664
1307
2327
2419
2400
2312
2094
1971
984
1323
4
1650
1540
1463
1385
1247
1034
1770
2426
8
1655
2427
16
32
64
128
1548
2413
1468
2347
1319
2139
1050
1975
Benchmark Results
19
Figure 4 SysBench Results for the HP ProLiant BL685c Server
Summary
The results of the SysBench testing indicated that the HP Proliant c-Class Blade Servers provide
a solid platform for the MySQL database server. Along with the integrated Smart Array controller
these servers provide the security of RAID storage to the host operating system and database
files, while also offering excellent performance for many applications.
BL465c server is a good choice for an entry-level database server with scalability to SAN, as the
size of the database grows. When higher performance levels are required from a single server,
both the HP ProLiant BL460c and HP ProLiant BL480c servers (when configured with two
Quad-Core processors) provided a good option for scalability.
Figure 5 Benchmark Test Results
The test results indicated that optimum price and performance could be achieved using a MySQL
Replication configuration with a pair of HP ProLiant BL460c or BL480c servers with 8 cores in a
high-availability cluster where HP Proliant c-Class Blade Servers acted as the MySQL master
database server. This, combined with a number of ProLiant BL465c servers acting as the MySQL
slave database servers, provided a robust, scalable database environment within a single HP
BladeSystem enclosure.
Resources
For additional information on the hardware and software used in the MySQL sizing tests, see
the following websites:
20
HP ActiveAnswers for MySQL Database Server
SysBench Benchmark Software http://sysbench.sourceforge.net/
Resources
21
|