Mark Dadgar said the following on 03/08/07 01:56:
On Aug 2, 2007, at 8:19 AM, Vini Engel wrote:
I have been running dspam for sometime on one of my servers and started
to experience slowness on the message delivery. When I listed the
processes running on my server I saw hundreds of dspam processes. I was
also experiencing slowness to login to the server via pop3 (which uses
the same mysql server) and sometimes the password changing process was
failing. Then I figured that it was a problem with the database, indeed
the db had grown and become slower. Plus, the number of connections was
too high and was overwhelming the mysql server and anything that needed
to talk to it would be unable to since the server was busy.
Hi Mark,
databases are almost always IO-bound. If you can move the mysql files
to more spindles (a striped array is best), preferably their own
spindles so they don't compete with other IO like mail/POP serving,
you'll see a big jump in performance. For my small server, I just did
this using a Maxtor One-Touch III Turbo external drive, which is a
2-drive box using RAID0 connected via USB2. This is obviously not the
optimal connection type, but for my relatively small usage scenario it's
fine. eSATA or some kind of SCSI array would be better for a production
environment.
I totally agree with you here but the load on my db is tool small to
justify such change. I think my problem must be related to the amount of
memory that the db is allocating since it seems not to be able to read
lager amounts of data.
Also, you may want to consider changing the dspam tables from MyISAM to
InnoDB. InnoDB is more transaction-oriented and will likely be faster
in this case, due to row-level locking vs. MyISAM's table-level
locking. The locking issue is particularly important when you have a
lot of dspam processes all competing for the same tables, which it
sounds like you do.
Thanks for this tip, this sounds like something that will help me. I
will make those changes this week and will post the results here.
Thanks
Vini