![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
| Basic inserts and updates are very fast, but selects and any other queries involving a join or read operation are very slow. Queries on our slaves are fast. Have you lost indices somehow? |
#3
| |||
| |||
|
|
Have you lost indices somehow? Other possible is that disk caching or RAM is limited somewhere. |
#4
| |||
| |||
|
|
We started seeing performance issues in our master database after its host server was accidentally rebooted. Although the OS was rebooted gracefully, we have a concern that mysql was not able to stop in time and was killed by the OS. The machine came back and we started mysql. Performance began to suffer after some time. One table was marked as crashed, but it stores temporary data so we dropped it and re-created. There are otherwise no errors in any logs to indicate a problem. A yum update on the machine broke SSHD. We have been meaning to upgrade to MySQL 5, but this forced us to do it immediately. The database was migrated to a new machine (source of the data was one of the slaves) and the problem persists. We have used profiling and innotop to attempt to determine the problem. When the database is restarted, performance is excellent for about 30 minutes until the issues reappear. Basic inserts and updates are very fast, but selects and any other queries involving a join or read operation are very slow. Queries on our slaves are fast. The master has twin quad core processors, 32 GB RAM. The MySQL partition is on a four-disk RAID 5 array. The old server had a four-disk RAID 10 array. Controller is set to use write-back with no readahead. Can anyone offer some suggestions? These performance issues are choking our operations. |
#5
| |||
| |||
|
|
On Fri, 24 Sep 2010 16:03:38 +0100, The Natural Philosopher wrote: Have you lost indices somehow? Other possible is that disk caching or RAM is limited somewhere. No, we have not lost indices. Can you be more specific about disk caching? According to the OS, RAM is completely utilized with about 4 GB going to caching. |
#6
| |||
| |||
|
|
On Fri, 24 Sep 2010 16:03:38 +0100, The Natural Philosopher wrote: Have you lost indices somehow? Other possible is that disk caching or RAM is limited somewhere. No, we have not lost indices. Can you be more specific about disk caching? According to the OS, RAM is completely utilized with about 4 GB going to caching. |
#7
| |||
| |||
|
|
ampersand wrote: On Fri, 24 Sep 2010 16:03:38 +0100, The Natural Philosopher wrote: Have you lost indices somehow? Other possible is that disk caching or RAM is limited somewhere. No, we have not lost indices. Can you be more specific about disk caching? According to the OS, RAM is completely utilized with about 4 GB going to caching. Well its normally automatic, so unless something has changed markedly, or its a question of refilling an SQL query cache or something, I would be surprised if in the absence of howling errors, it was a problem. I would start by running various queries using the command line tool and timing them. |
#8
| |||
| |||
|
|
On Sep 24, 3:51 pm, The Natural Philosopher <t... (AT) invalid (DOT) invalid wrote: ampersand wrote: On Fri, 24 Sep 2010 16:03:38 +0100, The Natural Philosopher wrote: Have you lost indices somehow? Other possible is that disk caching or RAM is limited somewhere. No, we have not lost indices. Can you be more specific about disk caching? According to the OS, RAM is completely utilized with about 4 GB going to caching. Well its normally automatic, so unless something has changed markedly, or its a question of refilling an SQL query cache or something, I would be surprised if in the absence of howling errors, it was a problem. I would start by running various queries using the command line tool and timing them. I work with ampersand and very simple queries takes 25-30 to return data. For example table x has 700 rows in it ( a very small table with 5 columns in it), select * from x takes 25 seconds to return data. The same query on one of the slaves take less than 1 second to return data. One thing I noticed is that if I use a limit I can get the results back faster when the limit is smaller. select * from x limit 1 - .3 sec select * from x limit 5 - 1 sec select * from x limit 20 - 5 sec select * from x limit 200 - 10 sec |
#9
| |||
| |||
|
|
On Sep 24, 3:51 pm, The Natural Philosopher<t... (AT) invalid (DOT) invalid wrote: ampersand wrote: On Fri, 24 Sep 2010 16:03:38 +0100, The Natural Philosopher wrote: Have you lost indices somehow? Other possible is that disk caching or RAM is limited somewhere. No, we have not lost indices. Can you be more specific about disk caching? According to the OS, RAM is completely utilized with about 4 GB going to caching. Well its normally automatic, so unless something has changed markedly, or its a question of refilling an SQL query cache or something, I would be surprised if in the absence of howling errors, it was a problem. I would start by running various queries using the command line tool and timing them. I work with ampersand and very simple queries takes 25-30 to return data. For example table x has 700 rows in it ( a very small table with 5 columns in it), select * from x takes 25 seconds to return data. The same query on one of the slaves take less than 1 second to return data. One thing I noticed is that if I use a limit I can get the results back faster when the limit is smaller. select * from x limit 1 - .3 sec select * from x limit 5 - 1 sec select * from x limit 20 - 5 sec select * from x limit 200 - 10 sec |
#10
| |||
| |||
|
|
We started seeing performance issues in our master database after its host server was accidentally rebooted. Although the OS was rebooted gracefully, we have a concern that mysql was not able to stop in time and was killed by the OS. |
![]() |
| Thread Tools | |
| Display Modes | |
| |