LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 12-31-2006, 12:41 PM   #1
DukeLeto
Member
 
Registered: Jan 2003
Location: Antarctica
Distribution: *watches the penguins pass by*
Posts: 56

Rep: Reputation: 15
Very Strange MySQL Problem...works fine on small box, terrible on big box


I have a mysql 4.1 server running on a quad opteron machine running redhat E/S 4u4.

This mysql runs at about 30-40% cpu usage. It has tables that are no larger than 2 gb. They are all MyISAM tables.

The cpus in this box are 2.2ghz opterons, and there are 20gb of RAM.

This box also serves as a web server, so we wanted my migrate the mysql off of the box, onto a 16core opteron 32gb RAM box, (running gentoo, with a vanilla 2.6.19, and it runs very well) with fiber channel attached raid array. Alreay on this machine we have a MySQL 4.1 with several databases, and a MySQL 5.0.26 with tables upwards of 6gb (a vbulletin site). (those databases have NO problem at ALL)

With both of these running (and that vbulletin sees a LOT of traffic), the load avg is 1-2, and the cpu usage is no more than 10%. (It is 16 cores after all).

I created a new mysql instance/config file/init script, and moved our binary data files over (created using mysqlhotcopy).

I started the server (used even the same config file, mysql variable-wise), and the cpu usage slams the server, upwards of 1100%. The load avg gets as high as 90.

I have tried:
clearing the linux disk cache, and cat'ing the myi/myd files to /dev/null, just to get them back in the cache.
MySQL 5
switching the tables to innodb
fine-tuning the mysql variables
several other things


Now, quite obviously, the 16 core machine is a much beefier server, and the nic wasn't being overutilized, yet the mysql process was taking at the very least 400-500% cpu, with actual numbers around 900%. It was causing the load average to spike, making the other mysql instances....slow.

I moved the EXACT SAME data files back (so, that rules out something strictly relating to them) to the other quad opteron box, and it runs perfectly.

I don't even know where to BEGIN to try to figure out why it would perform so differently. Anyone have any ideas?

Thanks,
Michael
 
Old 01-01-2007, 02:26 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,469

Rep: Reputation: 87
I'd guess it has to be the kernel, not MySQL.

What exact kernel version on the machine that gives the trouble?

Do you have any pre-emption set on that kernel?

I've experienced various issues related to turning pre-emption on and off under 2.6.18.1 on my uni-processor machine. Maybe these same issues (long latencies under certain conditions) may manifest much more severely in a multi-processor system like yours?

I assume you've already tried recompiling the kernel on that machine and seeing what happens if you tweak some ioscheduler settings:

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_DEFAULT_AS is not set
# CONFIG_DEFAULT_DEADLINE is not set
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"

?
 
Old 01-01-2007, 08:14 AM   #3
DukeLeto
Member
 
Registered: Jan 2003
Location: Antarctica
Distribution: *watches the penguins pass by*
Posts: 56

Original Poster
Rep: Reputation: 15
I'm using a vanilla 2.6.19. I'm also using a pre-emptible kernel, and I'm using cfq as my i/o scheduler. The thing is, I already have multiple mysql instances running on this machine (that get many more hits than this other database I was attempting to migrate), and they run absolutely perfect. I've checked everything, nothing I can think of is causing this.

Thanks,
Michael

Quote:
Originally Posted by rylan76
I'd guess it has to be the kernel, not MySQL.

What exact kernel version on the machine that gives the trouble?

Do you have any pre-emption set on that kernel?

I've experienced various issues related to turning pre-emption on and off under 2.6.18.1 on my uni-processor machine. Maybe these same issues (long latencies under certain conditions) may manifest much more severely in a multi-processor system like yours?

I assume you've already tried recompiling the kernel on that machine and seeing what happens if you tweak some ioscheduler settings:

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_DEFAULT_AS is not set
# CONFIG_DEFAULT_DEADLINE is not set
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"

?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
linux from a floppy on a VERY small box sycamorex Linux - General 5 04-04-2007 03:06 PM
quota works fine with a strange message... jeanpba Linux - Distributions 1 05-02-2006 03:14 PM
Small linux box Fredde87 Linux - Hardware 1 08-21-2005 04:14 AM
Big white box over some Flash videos drigz Linux - Software 6 06-20-2004 09:30 AM
Using Samba - conflicts with W2k and XP. Can't see the linux box - strange problem. fireman949 Linux - Networking 1 01-31-2004 07:43 PM


All times are GMT -5. The time now is 05:59 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration