hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Dedicated Server : What should I do for excessive MySQL usage?
Reply

Dedicated Server Current and past experiences with dedicated server providers, bandwidth, and server performance. Review managed and unmanaged dedicated web servers, discuss both Windows and Unix dedicated server solutions, and discuss dedicated hosting providers. If your service is unavailable, please click here.
Forum Jump

What should I do for excessive MySQL usage?

Reply Post New Thread In Dedicated Server Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 09-10-2007, 01:32 PM
gamer1888 gamer1888 is offline
Junior Guru Wannabe
 
Join Date: Mar 2003
Posts: 70

What should I do for excessive MySQL usage?


Hello,
I'm currently on a server from Softlayer for which I'm paying $450 per month. A recent change on my website from simple HTML pages to a database driven script has made the website very slow.

The server load is 0.64 but most of my load is because of SQL. Is there any upgrade or action I can take to perhaps overcome this load? I'm a newbie to dedicated servers so I have no idea what exactly to do here.

Here is a copy/paste of the server load statistic:
mysql 27.68 3.02 0.0
Top Process %CPU 28.0 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/server.aaa.com.pid --skip-external-locking
Top Process %CPU 27.9 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/server.aaa.com.pid --skip-external-locking
abc abc.net 13.52 17.51 57.9
Top Process %CPU 12.5 httpd [www.abc.net] [/abc/mod/A/tracksearchmp3.html]
Top Process %CPU 12.0 httpd [www.abc.net] [/abc/mod/S/tracksearchmp3.html]
Top Process %CPU 8.1 httpd [www.abc.net] [/abc/genre/Comedy/titlegenre.html]
nobody 0.00 0.00 0.0
Top Process %CPU 12.5 /usr/local/apache/bin/httpd -DSSL
Top Process %CPU 12.0 /usr/local/apache/bin/httpd -DSSL
Top Process %CPU 8.1 /usr/local/apache/bin/httpd -DSSL
xyz xyz.com 0.13 0.28 0.0
Top Process %CPU 1.0 httpd [www.xyz.com] [/images/top_banner.gif]
Top Process %CPU 0.9 httpd [www.xyz.com] [/mp3/m-a/]
Top Process %CPU 0.8 httpd [www.xyz.com] [/mp3/index.php]
mailnull 0.01 0.09 0.0
Top Process %CPU 0.5 /usr/sbin/exim -bd -q60m
Top Process %CPU 0.2 /usr/sbin/exim -bd -q60m
Top Process %CPU 0.1 /usr/sbin/exim -bd -q60m
root 0.01 13.57 2.0
Top Process %CPU 1.0 /bin/bash /etc/init.d/apf stop
dbus 0.00 0.00 0.0
xfs 0.00 0.00 0.0
mailman 0.00 2.60 0.0
ntp 0.00 0.20 0.0
sshd 0.00 0.00 0.0
nails 0.00 0.00 0.0
named 0.00 0.20 0.0

In this situation, should I hire someone to look at these statistics and maybe kill the processes which are producing the load or does this seem okay and I should perhaps upgrade something in the server?

Any kind of help will be appreciated. Thank you

Reply With Quote


Sponsored Links
  #2  
Old 09-10-2007, 02:07 PM
PrezKennedy PrezKennedy is offline
Junior Guru Wannabe
 
Join Date: Jun 2006
Location: USA
Posts: 58
Not knowing what specs you have for that server... I'll take a wild guess here and say you probably need to move your MySQL data to a separate disk drive if it isn't already. If it is, I would suggest upgrading it to a SCSI drive. Since it sounds like your CPU isn't doing much work at all, your hard disk is probably the thing slowing you down here.

Reply With Quote
  #3  
Old 09-10-2007, 03:53 PM
mainlink mainlink is offline
Newbie
 
Join Date: Sep 2005
Location: Frankfurt/Germany
Posts: 29
Maybe there is something wrong with your my.cnf? Can you please post it and provide further information regarding OS and httpd.conf?

__________________
Managed Rootservers running FreeBSD: Mainlink Internet

Reply With Quote
Sponsored Links
  #4  
Old 09-10-2007, 04:02 PM
MountedWeb MountedWeb is offline
WHT Addict
 
Join Date: Jul 2007
Location: London
Posts: 100
I think there is a script for mysql caching that can help you.

Reply With Quote
  #5  
Old 09-10-2007, 06:11 PM
Axel Axel is offline
Junior Guru Wannabe
 
Join Date: Jul 2000
Posts: 36
stop paying attention to the cpu load - look into io load instead.

once your mem is not enough to cache the
"hot" part of db the sever becomes slow.

i suggest to work with db specialist directly
there are many things to be checked actually.
if you a noob to this - will be the best chice.

Reply With Quote
  #6  
Old 09-10-2007, 07:48 PM
gamer1888 gamer1888 is offline
Junior Guru Wannabe
 
Join Date: Mar 2003
Posts: 70
If anyone of you know any database specialist that can look into the server and perhaps take steps to lower down the load, or suggest a fix of any kind, please tell him to get in touch with me. I need help and I've had bad experiences with hired people. Some are too arrogant and the others can't haul their asses.

If anyone of you know any good programmers or admins please do suggest them to me. Would be of great help.

Reply With Quote
  #7  
Old 09-11-2007, 02:32 AM
ServerMins ServerMins is offline
Junior Guru Wannabe
 
Join Date: Sep 2007
Posts: 40
I always advise on optimizing a server before upgrading to hardware that will add to your monthly costs.

__________________
Professional Server Management from ServerMins
Over 40 years of combined Linux experience
Call us toll free at (866) 490-0551

Reply With Quote
  #8  
Old 09-11-2007, 06:38 AM
Abu Mami Abu Mami is offline
cholesterol dependent
 
Join Date: Oct 2000
Location: Israel
Posts: 1,285
Check your db queries - you should optimize them so that they use fewer resources.

Use the limit clause to reduce memory usage
The join clause can help to reduce query overhead
check your indexes

Reply With Quote
  #9  
Old 09-11-2007, 11:27 AM
Hugin Hugin is offline
Junior Guru Wannabe
 
Join Date: Sep 2007
Posts: 33
You've not provided much info, so to directly answer the question ("What should I do for excessive MySQL usage?"), check your indexes.

Depending on your load, it would also be wise to either move MySQL to another server or at least have it run on a different disk, as others have mentioned above.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Open Data Center Alliance Adds Frameworks for Software Entitlement, Data Security Web Hosting News 2013-03-14 15:33:01
Open Data Center Alliance Releases Security-Focused Cloud Computing Usage Models Web Hosting News 2012-04-05 15:04:50
Web Host Rackspace Launches Private Beta for MySQL Cloud Database Web Hosting News 2011-12-01 21:09:51
Web Host FireHost Partners with Cloud Security Firm Gazzang for Data Encryption Web Hosting News 2011-08-16 20:33:43
SSL Certificate Authority GlobalSign Launches CloudSSL Product Web Hosting News 2011-08-12 19:33:59


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?