Compiling And Linking An Optimized Mysqld Server - Oracle 5.0 Reference Manual

Table of Contents

Advertisement

libmysql.c:1329: warning: passing arg 5 of `gethostbyname_r' from
incompatible pointer type
libmysql.c:1329: too few arguments to function `gethostbyname_r'
libmysql.c:1329: warning: assignment makes pointer from integer
without a cast
make[2]: *** [libmysql.lo] Error 1
By default, the
(the GNU C++ compiler). This test yields incorrect results if
g++
ways to work around this problem:
• Make sure that the GNU C++
is called gpp; on others, it is named gcc-c++.
• Use
gcc
export CXX="gcc"
You must run
For information about acquiring or updating tools, see the system requirements in
"Installing MySQL from
2.17.5. Compiling and Linking an Optimized
Most of the following tests were performed on Linux with the MySQL benchmarks, but they should give
some indication for other operating systems and workloads.
You obtain the fastest executables when you link with -static.
By using better compiler and compilation options, you can obtain a 10% to 30% speed increase in
applications. This is particularly important if you compile the MySQL server yourself.
When we tested both the Cygnus CodeFusion and Fujitsu compilers, neither was sufficiently bug-free
to enable MySQL to be compiled with optimizations enabled.
The standard MySQL binary distributions are compiled with support for all character sets. When you
compile MySQL yourself, you should include support only for the character sets that you are going to
use. This is controlled by the
Here is a list of some measurements that we have made:
• If you link dynamically (without -static), the result is 13% slower on Linux. Note that you still can
use a dynamically linked MySQL library for your client applications. It is the server that is most critical
for performance.
• For a connection from a client to a server running on the same host, if you connect using TCP/IP
rather than a Unix socket file, performance is 7.5% slower. (On Unix, if you connect to the host name
localhost, MySQL uses a socket file by default.)
• For TCP/IP connections from a client to a server, connecting to a remote server on another host is
8% to 11% slower than connecting to a server on the same host, even for connections faster than
100Mb/s Ethernet.
• When running our benchmark tests using secure connections (all data encrypted with internal SSL
support) performance was 55% slower than with unencrypted connections.
• If you compile with
take substantially longer; for example, the MySQL benchmarks run 35% slower. If you use
[122]
debug
been compiled with
starting it with the
to that obtained when configuring with
Compiling and Linking an Optimized
script attempts to determine the correct number of arguments by using
configure
g++
as your C++ compiler by setting the
again after making either of those changes.
configure
Source".
--with-charset
--with-debug=full
(without =full), the speed decrease is only 15%. For a version of
--with-debug=full
--skip-safemalloc
mysqld
is installed. On some Linux distributions, the required package
environment variable to gcc:
CXX
mysqld
[122]
option to configure.
[122], most queries are 20% slower. Some queries may
[122], you can disable memory checking at runtime by
[421]
option. The execution speed should then be close
[122].
--with-debug
126
Server
is not installed. There are two
g++
Section 2.17,
Server
mysqld
--with-
that has

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 5.0 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Mysql 5.0

Table of Contents