PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.databases.mysql > compiled mysql
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
compiled mysql

Réponse
 
LinkBack Outils de la discussion
Vieux 07/01/2008, 08h35   #1
12 monkeys
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut compiled mysql

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
  Réponse avec citation
Vieux 07/01/2008, 11h20   #2
Axel Schwenke
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: compiled mysql

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
  Réponse avec citation
Vieux 07/01/2008, 15h14   #3
12 monkeys
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: compiled mysql

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
  Réponse avec citation
Vieux 08/01/2008, 00h22   #4
Axel Schwenke
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: compiled mysql

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
  Réponse avec citation
Vieux 08/01/2008, 16h28   #5
12 monkeys
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: compiled mysql

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!
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 19h18.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,15236 seconds with 13 queries