I've been running a mysql server for a web back end for a while now. It's been running fine for years actually, but I figured I should stop being lazy and actually try to optimize it somewhat. This is a small user count development platform - the software is for modeling industrial data - nothing really to do with programming, other than we are using php/mysql/javascript as a tool to compliment a lot of other tools.
This is an older machine, running older hardware and software - some of it could just be that. Core i7 920, 6GB RAM, SQL tables on an older SSD, RAID10 for /home accounts. I think it's on Fedora 10 (pretty dated, but it's difficult to migrate at the moment)
Querys often take minutes to perform. Some of the tables are long, but not terribly wide - the largest are several GB where we store historical data. If more than one person is using the web page, the database just slows to a crawl and you may as well get lunch while you wait on results. Tables are a mix of InnoDB and MyISAM - both run slow, I can't tell if one is appreciably better than the other from a performance standpoint.
Here are some top outputs when a query is running. I can't quite figure out what my bottleneck is. mysqld shows a high CPU%, but at the same time CPU shows high idle percentage (if I'm understanding that correctly). When mysqld goes idle, the load average drops to 0.25 or less. There isn't much free memory, but swap isn't really getting touched, so I'm assuming most of that memory load is caching, and wait average is very low.
Apart from this development stuff, the server also runs a very small amount of email.
Is this just table/query optimization issue? Indexing issue? Is it a mysqld parameter optimzation issue? User error? Old hardware? Insufficient hardware?
I know just enough about databases to make them work for me, but not nearly enough to make them work well.
This is an older machine, running older hardware and software - some of it could just be that. Core i7 920, 6GB RAM, SQL tables on an older SSD, RAID10 for /home accounts. I think it's on Fedora 10 (pretty dated, but it's difficult to migrate at the moment)
Querys often take minutes to perform. Some of the tables are long, but not terribly wide - the largest are several GB where we store historical data. If more than one person is using the web page, the database just slows to a crawl and you may as well get lunch while you wait on results. Tables are a mix of InnoDB and MyISAM - both run slow, I can't tell if one is appreciably better than the other from a performance standpoint.
Here are some top outputs when a query is running. I can't quite figure out what my bottleneck is. mysqld shows a high CPU%, but at the same time CPU shows high idle percentage (if I'm understanding that correctly). When mysqld goes idle, the load average drops to 0.25 or less. There isn't much free memory, but swap isn't really getting touched, so I'm assuming most of that memory load is caching, and wait average is very low.
Apart from this development stuff, the server also runs a very small amount of email.
Is this just table/query optimization issue? Indexing issue? Is it a mysqld parameter optimzation issue? User error? Old hardware? Insufficient hardware?
I know just enough about databases to make them work for me, but not nearly enough to make them work well.

Code:
top - 12:24:46 up 26 days, 2:02, 6 users, load average: 1.52, 1.53, 1.23
Tasks: 237 total, 1 running, 236 sleeping, 0 stopped, 0 zombie
Cpu(s): 15.2%us, 0.4%sy, 0.0%ni, 84.4%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 6121748k total, 6077116k used, 44632k free, 19664k buffers
Swap: 23993068k total, 124k used, 23992944k free, 4834632k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10053 mysql 20 0 587m 227m 5608 S 127.5 3.8 14012:06 mysqld
28685 brian 20 0 15012 1312 872 S 0.7 0.0 97:39.39 top