Linux Notes
163
We have tested MySQL on the 2.4 kernel on a two-CPU machine and found MySQL scales much
better. There was virtually no slowdown on query throughput all the way up to 1,000 clients, and the
MySQL scaling factor (computed as the ratio of maximum throughput to the throughput for one client)
was 180%. We have observed similar results on a four-CPU system: Virtually no slowdown as the
number of clients was increased up to 1,000, and a 300% scaling factor. Based on these results, for a
high-load SMP server using a 2.2 kernel, it is definitely recommended to upgrade to the 2.4 kernel at
this point.
We have discovered that it is essential to run the
mysqld
process with the highest possible priority
on the 2.4 kernel to achieve maximum performance. This can be done by adding a
renice -20 $$
command to
mysqld_safe
. In our testing on a four-CPU machine, increasing the priority resulted in a
60% throughput increase with 400 clients.
If you see a dead
mysqld
server process with
ps
, this usually means that you have found a bug in
MySQL or you have a corrupted table. See
Section C.5.4.2, “What to Do If MySQL Keeps Crashing”
.
To get a core dump on Linux if
mysqld
dies with a
SIGSEGV
signal, you can start
mysqld
with
the
--core-file
[404]
option. Note that you also probably need to raise the core file size by
adding
ulimit -c 1000000
to
mysqld_safe
or starting
mysqld_safe
with
--core-file-
size=1000000
[247]
. See
Section 4.3.2, “
mysqld_safe
— MySQL Server Startup Script”
.
2.20.1.5. Linux x86 Notes
MySQL requires
libc
5.4.12 or newer. It is known to work with
libc
5.4.46.
glibc
2.0.6 and later
should also work. There have been some problems with the
glibc
RPMs from Red Hat, so if you have
problems, check whether there are any updates. The
glibc
2.0.7-19 and 2.0.7-29 RPMs are known to
work.
If you are using Red Hat 8.0 or a new
glibc
2.2.x library, you may see
mysqld
die in
gethostbyaddr()
. This happens because the new
glibc
library requires a stack size greater than
128KB for this call. To fix the problem, start
mysqld
with the
--thread-stack=192K
[500]
option.
This stack size is the default on MySQL 4.0.10 and above, so you should not see the problem.
If you are using
gcc
3.0 and above to compile MySQL, you must install the
+v3
library before compiling MySQL; if you do not do this, you get an error about a missing
__cxa_pure_virtual
symbol during linking.
On some older Linux distributions,
configure
may produce an error like this:
Syntax error in sched.h. Change _P to __P in the
/usr/include/sched.h file.
See the Installation chapter in the Reference Manual.
Just do what the error message says. Add an extra underscore to the
_P
macro name that has only
one underscore, and then try again.
You may get some warnings when compiling. Those shown here can be ignored:
mysqld.cc -o objs-thread/mysqld.o
mysqld.cc: In function `void init_signals()':
mysqld.cc:315: warning: assignment of negative value `-1' to
`long unsigned int'
mysqld.cc: In function `void * signal_hand(void *)':
mysqld.cc:346: warning: assignment of negative value `-1' to
`long unsigned int'
If
mysqld
always dumps core when it starts, the problem may be that you have an old
/lib/libc.a
.
Try renaming it, and then remove
sql/mysqld
and do a new
make install
and try again. This
problem has been reported on some Slackware installations.
If you get the following error when linking
mysqld
, it means that your
libg++.a
is not installed
correctly:
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...