|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello!
I have a question regarding my mysql server running on a Debian machine. Some time ago I used to use a precompiled Debian version of mysql. But then I decided to compile my own custom version and here arise my questions: In the previous version, when I typed 'ps ax', or 'top' in the command line, it printed only one mysql process. Right now it prints about 10 processes. So, the question is - what is the real difference between these configurations? And what did I do wrong, that my compiled mysql differs from the original version in that way? Any other suggestions are also welcome. Below are my compile options: export CFLAGS="-O3" export CXX=gcc export CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" ../configure --prefix=/opt/mysql --enable-assembler --with-mysqld-ldflags=-all-static --enable-thread-safe --enable -shared --enable-thread-safe-client |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
12 monkeys wrote:
Your parents must have a strange sense of humor, giving you this name. > Some time ago I used to use a precompiled Debian version of mysql. > But then I decided to compile my own custom version and here arise > my questions: > In the previous version, when I typed 'ps ax', or 'top' in the command > line, it printed only one mysql process. > Right now it prints about 10 processes. > So, the question is - what is the real difference between these > configurations? The precompiled MySQL was linked against NPTL, the self compiled against LinuxThreads (google for NPTL if you don't know what this is). There is nothing wrong with the second one, it's just that the LinuxThreads implementation does not allow to distinguish between threads and processes from user space. In any case the MySQL server runs in several threads. NPTL guys claim better performance and scalability. No idea if that is a problem of yours. > And what did I do wrong, that my compiled mysql > differs from the original version in that way? What Debian distribution is it? What do you get for shell$ getconf GNU_LIBPTHREAD_VERSION shell$ echo $LD_ASSUME_KERNEL ? XL |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Dnia Mon, 07 Jan 2008 12:20:38 +0100, Axel Schwenke napisa³(a):
> 12 monkeys wrote: > > Your parents must have a strange sense of humor, giving you this name. ;-) That's just a throwaway name. >> Some time ago I used to use a precompiled Debian version of mysql. >> But then I decided to compile my own custom version and here arise >> my questions: >> In the previous version, when I typed 'ps ax', or 'top' in the command >> line, it printed only one mysql process. >> Right now it prints about 10 processes. >> So, the question is - what is the real difference between these >> configurations? > > The precompiled MySQL was linked against NPTL, the self compiled against > LinuxThreads (google for NPTL if you don't know what this is). > > There is nothing wrong with the second one, it's just that the > LinuxThreads implementation does not allow to distinguish between > threads and processes from user space. In any case the MySQL server runs > in several threads. > > NPTL guys claim better performance and scalability. No idea if that is a > problem of yours. > >> And what did I do wrong, that my compiled mysql >> differs from the original version in that way? > > What Debian distribution is it? What do you get for > > shell$ getconf GNU_LIBPTHREAD_VERSION > shell$ echo $LD_ASSUME_KERNEL This is Debian 3.1 : shell$ getconf GNU_LIBPTHREAD_VERSION NPTL 0.60 shell$ echo $LD_ASSUME_KERNEL prints nothing Do you happen to know which compile option is responsible for NTPL usage? I'd prefer having the version which shows only one mysql process. ![]() Options which refer to threads are: --enable-thread-safe-client Compile the client with threads. --with-pthread Force use of pthread library. --with-named-thread-libs=ARG Use specified thread libraries instead of those automatically found by configure. TIA |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
12 monkeys wrote:
> Dnia Mon, 07 Jan 2008 12:20:38 +0100, Axel Schwenke napisa³(a): >> What Debian distribution is it? What do you get for >> >> shell$ getconf GNU_LIBPTHREAD_VERSION >> shell$ echo $LD_ASSUME_KERNEL > > This is Debian 3.1 : Pretty old. AFAIK the libc-dev package in 3.1 (aka Sarge) does not support NPTL. So everything you compile there will use LT by default. IMNSHO this is a good thing. NPTL 0.60 was a very early implementation, containing some glitches. So on old installations like yours it's probably better to link with LT and not NPTL. > shell$ getconf GNU_LIBPTHREAD_VERSION > NPTL 0.60 > > shell$ echo $LD_ASSUME_KERNEL > prints nothing Then your system defaults to use NPTL at runtime when a binary was linked against NPTL. You can force the dynamic linker to use LT even for NPTL binaries (by setting $LD_ASSUME_KERNEL). But this is the opposite from what you want. So sorry, no today! XL |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
Dnia Tue, 08 Jan 2008 01:22:15 +0100, Axel Schwenke napisa³(a):
> 12 monkeys wrote: >> Dnia Mon, 07 Jan 2008 12:20:38 +0100, Axel Schwenke napisa³(a): > >>> What Debian distribution is it? What do you get for >>> >>> shell$ getconf GNU_LIBPTHREAD_VERSION >>> shell$ echo $LD_ASSUME_KERNEL >> >> This is Debian 3.1 : > > Pretty old. AFAIK the libc-dev package in 3.1 (aka Sarge) does not > support NPTL. So everything you compile there will use LT by default. > > IMNSHO this is a good thing. NPTL 0.60 was a very early implementation, > containing some glitches. So on old installations like yours it's > probably better to link with LT and not NPTL. OK, then I'll stay with what I have. Thanks for your and explanations! |
|
![]() |
| Outils de la discussion | |
|
|