I don't know the MailWatch application either but I'll share my
experience with a multi-threaded application that uses MySQL.
I wrote a Java app that uses several threads to process data (we're
validating a set of data according to our business rules).
Each thread has its own connection to the database and MySQL spawns a
thread to process each connections request. If the application your
using is only connecting to the database with one connection object,
then the MySQL database will only spawn 1 process to service that
request. To take advantage of multi-threading your client (MailWatch in
this case) has to know it can use multiple connections to make it go
faster. If it is not capable of doing that then your stuck with MySQL
sitting at 98% idle most of the time.
The term used is "connection pooling". See if MailWatch has a feature
called that or maybe you can find a comparable product that does. Or,
if your really smart, if MailWatch is Open Sourced, fix it so it does
use connection pools, then send the code in for review.
Even on a single core, single CPU system, a few multiple threads will
increase performance slightly. Several more threads will start to slow
it down due to overhead.
In my Java application, each thread must instantiate its own Connection
object. If I try to use the same Connection object across threads, then
they all compete for its use and I really don't see any gain in
performance to the database.
Good luck!
--James
-----Original Message-----
From: Yoloits [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 19, 2006 1:25 PM
To: mysql@lists.mysql.com
Subject: CPUs not being utilized
I am running MailWatch with mysql 4.1.20 with Red Hat
Enterprise 4 on a dual XEON 3.2 with 4 GB mem. I have the
smp kernel loaded so both CPUs are seen. They show up as 4
CPUs. That is the only application the server runs. I moved
to this server so I could increase the query speed that was
quite slow which is slightly better but it should be faster.
It is not using all the CPUs.
When I run a query one of the 4 CPUs is pegged to zero and
the other 3 remain at 98 to 100% idle. Can mysql utilize all
the CPUs? Or is this a limitation of the application? How
can I check to see what the problem is? Have I missed a
setting in mysql?
Any help or guidance would be appreciated.
Jay Ehrhart
--
This message has been scanned for viruses
and dangerous content by the
Yolo County Office of Education MailScanner,
and is believed to be clean.