Linux Notes
161
glibc
2.2.2 overspins, which hurts MySQL performance. The likelihood that this condition occurs
can be reduced by re-nicing the
mysqld
process to the highest priority. We have also been able
to correct the overspin behavior with a patch, available at
http://dev.mysql.com/Downloads/Linux/
linuxthreads-2.2.2.patch
. It combines the correction of overspin, maximum number of threads, and
stack spacing all in one. You need to apply it in the
linuxthreads
directory with
patch -p0 </
tmp/linuxthreads-2.2.2.patch
. We hope it is included in some form in future releases of
glibc
2.2. In any case, if you link against
glibc
2.2.2, you still need to correct
STACK_SIZE
and
PTHREAD_THREADS_MAX
. We hope that the defaults is corrected to some more acceptable values for
high-load MySQL setup in the future, so that the commands needed to produce your own build can be
reduced to
./configure; make; make install
.
If you use these patches to build a special static version of
libpthread.a
, use it only for statically
linking against MySQL. We know that these patches are safe for MySQL and significantly improve its
performance, but we cannot say anything about their effects on other applications. If you link other
applications that require LinuxThreads against the patched static version of the library, or build a
patched shared version and install it on your system, you do so at your own risk.
If you experience any strange problems during the installation of MySQL, or with some common utilities
hanging, it is very likely that they are either library or compiler related. If this is the case, using our
binary resolves them.
If you link your own MySQL client programs, you may see the following error at runtime:
ld.so.1: fatal: libmysqlclient.so.#:
open failed: No such file or directory
This problem can be avoided by one of the following methods:
• Link clients with the
-Wl,r/full/path/to/libmysqlclient.so
flag rather than with
-Lpath
).
• Copy
libmysqclient.so
to
/usr/lib
.
• Add the path name of the directory where
libmysqlclient.so
is located to the
LD_RUN_PATH
environment variable before running your client.
If you are using the Fujitsu compiler (
fcc/FCC
), you may have some problems compiling MySQL
because the Linux header files are very
gcc
oriented. The following
configure
line should work with
fcc/FCC
:
CC=fcc CFLAGS="-O -K fast -K lib -K omitfp -Kpreex -D_GNU_SOURCE \
-DCONST=const -DNO_STRTOLL_PROTO" \
CXX=FCC CXXFLAGS="-O -K fast -K lib \
-K omitfp -K preex --no_exceptions --no_rtti -D_GNU_SOURCE \
-DCONST=const -Dalloca=__builtin_alloca -DNO_STRTOLL_PROTO \
'-D_EXTERN_INLINE=static __inline'" \
./configure \
--prefix=/usr/local/mysql --enable-assembler \
--with-mysqld-ldflags=-all-static --disable-shared \
--with-low-memory
2.20.1.4. Linux Postinstallation Notes
mysql.server
can be found in the
support-files
directory under the MySQL installation directory
or in a MySQL source tree. You can install it as
/etc/init.d/mysql
for automatic MySQL startup
and shutdown. See
Section 2.18.1.2, “Starting and Stopping MySQL Automatically”
.
If MySQL cannot open enough files or connections, it may be that you have not configured Linux to
handle enough files.
In Linux 2.2 and onward, you can check the number of allocated file handles as follows:
shell>
cat /proc/sys/fs/file-max
shell>
cat /proc/sys/fs/dquot-max
shell>
cat /proc/sys/fs/super-max
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 ...