to correct this behavior. Please note that since there are so many
With @strong{glibc-2.2.2}
versions of glibc floating around, the patch may not apply cleanly to
@strong{MySQL} version 3.23.36 will use the adaptive mutex, which is much
yours, so some manual work may be required.
better than even the patched one in @strong{glibc-2.1.3}. Be warned, however,
that under some conditions, the current mutex code in @strong{glibc-2.2.2}
overspins, which hurts @strong{MySQL} performance. The chance of this
condition can be reduced by renicing @code{mysqld} process to the highest
priority. We have also been able to correct the overspin behaviour with
a patch, available @uref{http://www.mysql.com/Downloads/Linux/linuxthreads-2.2.2.patch,here}. It combines the correction of overspin, maximum number of
threads, and stack spacing all in one. You will need to apply it in the
@code{linuxthreads} directory with
@code{patch -p0 </tmp/linuxthreads-2.2.2.patch}.
We hope it will be included in
some form in to the future releases of @code{glibc-2.2}. In any case, if
you link against @code{glibc-2.2.2} you still need to correct
@code{STACK_SIZE} and @code{PTHREAD_THREADS_MAX}. We hope that the defaults
will be corrected to some more acceptable values for high-load
@strong{MySQL} setup in the future, so that your own build can be reduced
to @code{./configure; make; make install}.
We recommend that you use the above patches to build a special static
We recommend that you use the above patches to build a special static
version of @file{libpthread.a} and use it only for statically linking
version of @code{libpthread.a} and use it only for statically linking
against @code{MySQL}. We know that the patch is safe for @code{MySQL}
against @code{MySQL}. We know that the patches are safe for @code{MySQL}
and significantly improves its performance, but we cannot say anything
and significantly improve its performance, but we cannot say anything
about other applications. If you link other applications against the
about other applications. If you link other applications against the
patched version of the library, or build a patched shared version and
patched version of the library, or build a patched shared version and
install it on your system, you are doing it at your own risk with regard
install it on your system, you are doing it at your own risk with regard
to other applications that depend on @code{LinuxThreads}.
to other applications that depend on @code{LinuxThreads}.
If you can't start @code{mysqld} or if @code{mysql_install_db} doesn't work,
If you experience any strange problems during the installation of
please continue reading! This only happens on Linux system with problems in
@strong{MySQL}, or with some common utilties hanging, it is very likely that
the LinuxThreads or @code{libc}/@code{glibc} libraries. There are a lot of
they are either library or compiler related. If this is the case, using our
simple workarounds to get @strong{MySQL} to work! The simplest is to use the
binary will resolve them.
binary version of @strong{MySQL} (not the RPM) for Linux x86. One nice
aspect of this version is that it's probably 10% faster than any version you
would compile yourself! @xref{Compile and link options}.
One known problem with the binary distribution is that with older Linux
One known problem with the binary distribution is that with older Linux
systems that use @code{libc} (like RedHat 4.x or Slackware), you will get
systems that use @code{libc} (like RedHat 4.x or Slackware), you will get
some non-fatal problems with hostname resolution.
some non-fatal problems with hostname resolution.
@xref{Binary notes-Linux}.
@xref{Binary notes-Linux}.
@code{myisamchk} hangs with @code{libc.so.5.3.12}. Upgrading to the newest
@code{libc} fixes this problem.
When using LinuxThreads you will see a minimum of three processes
When using LinuxThreads you will see a minimum of three processes
running. These are in fact threads. There will be one thread for the
running. These are in fact threads. There will be one thread for the
LinuxThreads manager, one thread to handle connections, and one thread
LinuxThreads manager, one thread to handle connections, and one thread