hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Dedicated Server : Is this a problem or is it okay? ( mysql CPU usage )
Reply

Forum Jump

Is this a problem or is it okay? ( mysql CPU usage )

Reply Post New Thread In Dedicated Server Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 10-31-2010, 08:21 PM
moheballah moheballah is offline
WHT Addict
 
Join Date: Sep 2008
Posts: 110

Is this a problem or is it okay? ( mysql CPU usage )


hello,

Dual xeon 5620
6 GB RAM

Server Load: between ( 1.14 - 3.11 ) (16 cpus)
Memory Used: between ( 12 % - 23 %)

one big site using vbulletin with 50K visitor every day

MYSQL CPU usage here
http://img168.imageshack.us/img168/8837/cpuusage.png

i haven't slow queries in mysql-slow.log else vbulletin search engine query and it's not a problem because vbulletin cache it

i optimized the database and repaired it



Sponsored Links
  #2  
Old 10-31-2010, 08:27 PM
woods01 woods01 is offline
relax, im a professional
 
Join Date: Dec 2007
Posts: 1,277
what mysql configuration are you running with?

__________________
James Paul Woods
Operations Manager
HostKitty Internet Services

  #3  
Old 10-31-2010, 08:29 PM
moheballah moheballah is offline
WHT Addict
 
Join Date: Sep 2008
Posts: 110
[mysqld]
datadir=/home/mysql
socket=/home/mysql/mysql.sock
#log-slow-queries = /home/mysql/mysql-slow.log
#long_query_time = 1
max_connections=5000
local-infile=0
safe-show-database
max_allowed_packet=100M
key_buffer = 80M
wait_timeout = 60

Sponsored Links
  #4  
Old 11-01-2010, 04:28 AM
Snoork Hosting Snoork Hosting is offline
Snoork Hosting
 
Join Date: Oct 2009
Location: United States
Posts: 2,226
Looking at your MySQL configuration, I would recommend adding extra settings and optimizing it even more. For 5,000 connections you will not have enough memory on the server.

I would recommend running MySQL Tuner or hiring a server management company to perform advanced optimization.

__________________
Snoork Hosting - Managed & Unmanaged | Web Hosting | VPS | Dedicated Servers
Fully Managed Hosting | 99.9% Network Uptime | 15 Minute Response Time | 24/7 Live Chat
Data Center: Eastern US | Email Us: Sales[at]Hosting.Snoork.com | Visit Us: www.hosting.snoork.com


  #5  
Old 11-01-2010, 04:30 AM
yourwebhostereu yourwebhostereu is offline
Web Hosting Evangelist
 
Join Date: Aug 2008
Posts: 529
Use http://mysqltuner.pl/ to optimize your my.cnf, this can reduce the load and probably the CPU usage on your server.

__________________
Regards,
Yourwebhoster.eu [NL] based hosting
Shared | Reseller | KVM VPS | Reseller VPS

  #6  
Old 11-01-2010, 05:41 AM
moheballah moheballah is offline
WHT Addict
 
Join Date: Sep 2008
Posts: 110
my new settings


=========================================
[mysqld]
datadir=/home/mysql
socket=/home/mysql/mysql.sock
log-slow-queries = /home/mysql/mysql-slow.log
long_query_time = 5
max_connections=500
local-infile=0
safe-show-database
max_allowed_packet=100M
key_buffer = 800M
wait_timeout = 100
table_cache = 9120
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
read_rnd_buffer_size=8M
myisam_sort_buffer_size=64M
thread_cache_size=8
thread_cache=256
query_cache_limit=12M

[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
=========================================

in Storage Engine Statistics i get
[!!] Total fragmented tables: 7

in Performance Metrics all is ok else
[!!] Key buffer hit rate: 86.8% (3M cached / 434K reads)

Recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate


now i get this database error every minut

Quote:
mysql_connect() [<a href='function.mysql-connect'> function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

  #7  
Old 11-01-2010, 05:43 AM
yourwebhostereu yourwebhostereu is offline
Web Hosting Evangelist
 
Join Date: Aug 2008
Posts: 529
Check if MySQL runs, start it from cli and if you get an error post it here.

__________________
Regards,
Yourwebhoster.eu [NL] based hosting
Shared | Reseller | KVM VPS | Reseller VPS

  #8  
Old 11-01-2010, 05:45 AM
moheballah moheballah is offline
WHT Addict
 
Join Date: Sep 2008
Posts: 110
my site working fine and mysql is run
but vbulletin still send this error message

i think it facing some visitors

  #9  
Old 11-01-2010, 05:46 AM
yourwebhostereu yourwebhostereu is offline
Web Hosting Evangelist
 
Join Date: Aug 2008
Posts: 529
There is something wrong with MySQL, if it does run check the MySQL error log. And rerun the mysqltuner.pl, you might get some warnings from that file if you've configured your my.cnf to high.

__________________
Regards,
Yourwebhoster.eu [NL] based hosting
Shared | Reseller | KVM VPS | Reseller VPS

  #10  
Old 11-01-2010, 05:48 AM
moheballah moheballah is offline
WHT Addict
 
Join Date: Sep 2008
Posts: 110
ok, i think this message from the time that i restarted mysql
just late from server

ok now every things is ok
but i still see this number is height

http://img168.imageshack.us/img168/8837/cpuusage.png

  #11  
Old 11-01-2010, 05:49 AM
yourwebhostereu yourwebhostereu is offline
Web Hosting Evangelist
 
Join Date: Aug 2008
Posts: 529
Check in PhpMyAdmin which processes are running and using that much from the CPU (or use mytop).

__________________
Regards,
Yourwebhoster.eu [NL] based hosting
Shared | Reseller | KVM VPS | Reseller VPS

  #12  
Old 11-01-2010, 06:57 AM
moheballah moheballah is offline
WHT Addict
 
Join Date: Sep 2008
Posts: 110
every time i clicked processes i get new id

  #13  
Old 11-01-2010, 07:00 AM
moheballah moheballah is offline
WHT Addict
 
Join Date: Sep 2008
Posts: 110
when i using top command
mysql still increase and decrease between 31 - 210 % cpu

but load still ok and not exceeded 3.5 In the worst case

  #14  
Old 11-01-2010, 07:01 AM
yourwebhostereu yourwebhostereu is offline
Web Hosting Evangelist
 
Join Date: Aug 2008
Posts: 529
Please check with mytop.

__________________
Regards,
Yourwebhoster.eu [NL] based hosting
Shared | Reseller | KVM VPS | Reseller VPS

  #15  
Old 11-01-2010, 11:06 AM
moheballah moheballah is offline
WHT Addict
 
Join Date: Sep 2008
Posts: 110
mytop to know the most database using cpu
i know it because i have one database in this server for one vbulletin script with height traffic visitors

Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU usage problem ddialer Hosting Security and Technology 1 10-03-2009 10:39 AM
CPU usage problem lio45 Web Hosting 19 01-30-2008 05:42 AM
CPU usage problem Flipe.NET Web Hosting 10 11-02-2005 11:06 PM
whm problem with CPU/Memory/MySQL Usage disgust Dedicated Server 4 10-19-2005 11:34 AM
Problem with MySQL CPU usage webhostbeginner Dedicated Server 0 08-11-2005 10:13 AM

Related posts from TheWhir.com
Title Type Date Posted
Google Releases Hosted Database Service Cloud SQL to General Availability Web Hosting News 2014-02-12 13:46:02
RightScale Launches Multi-Cloud Cost Management Solution Web Hosting News 2013-11-07 14:48:59
Google Cloud Provides Support For Native MySQL Connections Web Hosting News 2013-11-01 14:36:06
Open Data Center Alliance Adds Frameworks for Software Entitlement, Data Security Web Hosting News 2013-03-14 15:33:01
Open Data Center Alliance Publishes PaaS, SaaS Cloud Usage Models Web Hosting News 2012-08-20 16:12:05


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?