MySQL slowness in SMP

2007-05-11 Thread Abdullah Ibn Hamad Al-Marri

Hello,

I have dual xeon server with 2 GB of ram.

FreeBSD 6.2-STABLE #0: Tue Apr 24 11:32:50 GMT 2007
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/NOC  i386

Which runs heavily MySQL with MyISAM, the problem I have it maxes out
one cpu, and doesn't use the other one.

Could someone tell me what shall I do to make MySQL runs faster? it
already uses libthr, cache beside MySQL optimized, I would like to use
the power of both cpus.


last pid: 79040;  load averages:  1.00,  1.01,  1.00
   up 16+16:54:20  08:04:55
39 processes:  2 running, 37 sleeping
CPU states: 26.9% user,  0.0% nice, 23.3% system,  0.0% interrupt, 49.8% idle
Mem: 556M Active, 1154M Inact, 198M Wired, 93M Cache, 112M Buf, 3072K Free
Swap: 5120M Total, 16K Used, 5120M Free

 PID USERNAMETHR PRI NICE   SIZERES STATE  C   TIME   WCPU COMMAND
90293 mysql19 1000   434M   187M ucond  1 176.6H 95.95% mysqld

Is upgrading to FreeBSD 7.0 current and using ULE would make MySQL
runs in this dual xeon box?

--
Regards,

-Abdullah Ibn Hamad Al-Marri
Arab Portal
http://www.WeArab.Net/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MySQL slowness in SMP

2007-05-11 Thread Abdullah Ibn Hamad Al-Marri

On 5/11/07, Martin Blapp [EMAIL PROTECTED] wrote:


Hi,

It depends on the threading  library you use. Can you please
show us the output of

ldd /usr/local/libexec/mysqld ?

You should use libthr instead of libpthread or libc_r in /etc/libmap.conf
for mysqld.

--
Martin

Martin Blapp, [EMAIL PROTECTED] [EMAIL PROTECTED]
--
ImproWare AG, UNIXSP  ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 61 826 93 00 Fax: +41 61 826 93 01
PGP: finger -l [EMAIL PROTECTED]
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
--


Here we go.

ldd /usr/local/libexec/mysqld
/usr/local/libexec/mysqld:
   libz.so.3 = /lib/libz.so.3 (0x28498000)
   libwrap.so.4 = /usr/lib/libwrap.so.4 (0x284a9000)
   libcrypt.so.3 = /lib/libcrypt.so.3 (0x284b)
   libstdc++.so.5 = /usr/lib/libstdc++.so.5 (0x284c9000)
   libm.so.4 = /lib/libm.so.4 (0x28598000)
   libpthread.so.2 = /usr/lib/libthr.so.2 (0x285ae000)
   libc.so.6 = /lib/libc.so.6 (0x285c1000)

and here is the libmap.conf

[/usr/local/libexec/mysqld]
libpthread.so.2 libthr.so.2
libpthread.so   libthr.so


--
Regards,

-Abdullah Ibn Hamad Al-Marri
Arab Portal
http://www.WeArab.Net/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MySQL slowness in SMP

2007-05-11 Thread Martin Blapp


Hi,


So would upgrading to FreeBSD 7.0-CURRENT would make MySQL runs faster
or it's not optimized for dual cpu yet?


Of course would upgrading to FreeBSD 7.0-CURRENT make it faster because
some bottlenecks (unix domain sockets etc, old malloc) have been removed.

--
Martin
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MySQL slowness in SMP

2007-05-11 Thread Martin Blapp


Hi,

Ohh, I overread that you already use libthr.

But ...


90293 mysql19 1000   434M   187M ucond  1 176.6H 95.95% mysqld


It looks like you did not turn on 'showing threads' in top, else you would
have seen that many mysqld's are running on cpu 0, other on cpu 1.

--
Martin


/usr/local/libexec/mysqld:
  libz.so.3 = /lib/libz.so.3 (0x28498000)
  libwrap.so.4 = /usr/lib/libwrap.so.4 (0x284a9000)
  libcrypt.so.3 = /lib/libcrypt.so.3 (0x284b)
  libstdc++.so.5 = /usr/lib/libstdc++.so.5 (0x284c9000)
  libm.so.4 = /lib/libm.so.4 (0x28598000)
  libpthread.so.2 = /usr/lib/libthr.so.2 (0x285ae000)
  libc.so.6 = /lib/libc.so.6 (0x285c1000)

and here is the libmap.conf

[/usr/local/libexec/mysqld]
libpthread.so.2 libthr.so.2
libpthread.so   libthr.so


--
Regards,

-Abdullah Ibn Hamad Al-Marri
Arab Portal
http://www.WeArab.Net/


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MySQL slowness in SMP

2007-05-11 Thread Abdullah Ibn Hamad Al-Marri

On 5/11/07, Martin Blapp [EMAIL PROTECTED] wrote:


Hi,

Ohh, I overread that you already use libthr.

But ...

 90293 mysql19 1000   434M   187M ucond  1 176.6H 95.95% mysqld

It looks like you did not turn on 'showing threads' in top, else you would
have seen that many mysqld's are running on cpu 0, other on cpu 1.

--
Martin


So would upgrading to FreeBSD 7.0-CURRENT would make MySQL runs faster
or it's not optimized for dual cpu yet?

--
Regards,

-Abdullah Ibn Hamad Al-Marri
Arab Portal
http://www.WeArab.Net/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MySQL slowness in SMP

2007-05-11 Thread Martin Blapp


Hi,

It depends on the threading  library you use. Can you please
show us the output of

ldd /usr/local/libexec/mysqld ?

You should use libthr instead of libpthread or libc_r in /etc/libmap.conf
for mysqld.

--
Martin

Martin Blapp, [EMAIL PROTECTED] [EMAIL PROTECTED]
--
ImproWare AG, UNIXSP  ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 61 826 93 00 Fax: +41 61 826 93 01
PGP: finger -l [EMAIL PROTECTED]
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
--

On Fri, 11 May 2007, Abdullah Ibn Hamad Al-Marri wrote:


Hello,

I have dual xeon server with 2 GB of ram.

FreeBSD 6.2-STABLE #0: Tue Apr 24 11:32:50 GMT 2007
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/NOC  i386

Which runs heavily MySQL with MyISAM, the problem I have it maxes out
one cpu, and doesn't use the other one.

Could someone tell me what shall I do to make MySQL runs faster? it
already uses libthr, cache beside MySQL optimized, I would like to use
the power of both cpus.


last pid: 79040;  load averages:  1.00,  1.01,  1.00
  up 16+16:54:20  08:04:55
39 processes:  2 running, 37 sleeping
CPU states: 26.9% user,  0.0% nice, 23.3% system,  0.0% interrupt, 49.8% idle
Mem: 556M Active, 1154M Inact, 198M Wired, 93M Cache, 112M Buf, 3072K Free
Swap: 5120M Total, 16K Used, 5120M Free

PID USERNAMETHR PRI NICE   SIZERES STATE  C   TIME   WCPU COMMAND
90293 mysql19 1000   434M   187M ucond  1 176.6H 95.95% mysqld

Is upgrading to FreeBSD 7.0 current and using ULE would make MySQL
runs in this dual xeon box?

--
Regards,

-Abdullah Ibn Hamad Al-Marri
Arab Portal
http://www.WeArab.Net/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MySQL slowness in SMP

2007-05-11 Thread Ivan Voras

Martin Blapp wrote:


So would upgrading to FreeBSD 7.0-CURRENT would make MySQL runs faster
or it's not optimized for dual cpu yet?


Of course would upgrading to FreeBSD 7.0-CURRENT make it faster because
some bottlenecks (unix domain sockets etc, old malloc) have been removed.


On the other hand, if it's an important database in production, you 
probably don't want to run -CURRENT on the machine.




signature.asc
Description: OpenPGP digital signature


Re: MySQL slowness in SMP

2007-05-11 Thread Gabor MICSKO
On Fri, 2007-05-11 at 11:07 +0300, Abdullah Ibn Hamad Al-Marri wrote:
 Hello,

Hi!

I had the same problem, but i found this blog entry from Jeremy Zawodny:

http://jeremy.zawodny.com/blog/archives/000173.html

After i adjusted the wait_timeout and thread_cache_size, the problem is
gone. CPU utilization dropped significantly.

HTH

 I have dual xeon server with 2 GB of ram.
 
 FreeBSD 6.2-STABLE #0: Tue Apr 24 11:32:50 GMT 2007
 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/NOC  i386
 
 Which runs heavily MySQL with MyISAM, the problem I have it maxes out
 one cpu, and doesn't use the other one.
 
 Could someone tell me what shall I do to make MySQL runs faster? it
 already uses libthr, cache beside MySQL optimized, I would like to use
 the power of both cpus.

 last pid: 79040;  load averages:  1.00,  1.01,  1.00
 up 16+16:54:20  08:04:55
 39 processes:  2 running, 37 sleeping
 CPU states: 26.9% user,  0.0% nice, 23.3% system,  0.0% interrupt,
 49.8% idle
 Mem: 556M Active, 1154M Inact, 198M Wired, 93M Cache, 112M Buf, 3072K
 Free
 Swap: 5120M Total, 16K Used, 5120M Free
 
   PID USERNAMETHR PRI NICE   SIZERES STATE  C   TIME   WCPU
 COMMAND
 90293 mysql19 1000   434M   187M ucond  1 176.6H 95.95%
 mysqld

-- 
Micskó Gábor
HP APS, AIS, ASE
Szintézis Zrt.
H-9023 Győr, Tihanyi Á. u. 2.
Tel: +36 96 502 216
Fax: +36 96 318 658
E-mail: [EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]