List:Internals« Previous MessageNext Message »
From:Antony T Curtis Date:December 12 2000 10:55am
Subject:Re: SMP & MySQL under FreeBSD
View as plain text  
Michael Widenius wrote:
> Hi!
> >>>>> "Rick" == Rick Jansen <Rick@stripped> writes:
> Rick> Hi.
> Rick> My MySQLd is using just one CPU in FreeBSD. How can i fix this? Running
> Rick> multiple mysqld's isn't an option, all databases are somewhat related and
> Rick> connected to eachother.. I've tried installing LinuxThreads, which went
> Rick> well, but now mysql won't compile. Any hints and/or tips would be GREATLY
> Rick> appreciated..
> Rick> Rick Jansen
> FreeBSD doesn't support multi-CPU:s for a threaded program yet (this
> should hopefully been fixed soon).  I haven't yet heard about anyone that
> has got LinuxThreads to work good on FreeBSD so unfortunately your are
> on your own regarding this :(
> Tim suggested that you could try to run the MySQL-Linux binary on
> FreeBSD under Linux emulation, but this is only a wild guess...

This is a way but not ideal. Linux threading model is very heavyweight
so you have a performance drop from that. Linux does not scale to very
many threads due to it's threading model using process ID's.

Reading up the docs on their proposed replacement is very interesting.
It is very similar to the threading model used in AIX and OS/2 where
each thread has a "slot id" and with a per-CPU run queue, it should give
performance and scalability on a par!


Back on to topic... With locking enabled, surely it should be possible
to run 2 instances of MySQL... And use FreeBSD's NATD round-robin
processing to "load balance" the connections. Just an idea.

ANTONY T CURTIS                     Tel: +44 (1635) 36222
Abacus Polar Holdings Ltd           Fax: +44 (1635) 38670
> You have a tendency to feel you are superior to most computers.