hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Mysql Optimization my.cnf
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

Mysql Optimization my.cnf

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 12-04-2010, 02:45 PM
dontflip dontflip is offline
Newbie
 
Join Date: Dec 2010
Posts: 9

Mysql Optimization my.cnf


Hello dear WHT members, first time poster, long time reader, anyways lets get to the specifics, i have a dedicated server running CentOS 5.5 X64 w/ apache... I'm using InnoDB tables

-Dell SC1435
-2x AMD Opteron 2218 HE Santa Rosa 2.6GHz 2 x 1MB L2 Cache Socket F 68W Dual-Core Processor
-8GB MEM
- 500GB HDD SATAII

Below is tuning-primer.sh output after 48hours, and my.cnf below as well.... Can someone please look at it and write me the best settings to use for my.cnf and if its missing any settings in my.cnf aswell .. Thanks and Much Appereciated

Here is my tuning-primer.sh output after 48 hours

-- MYSQL PERFORMANCE TUNING PRIMER --
- By: Matthew Montgomery -

MySQL Version 5.0.91-log x86_64

Uptime = 2 days 9 hrs 44 min 34 sec
Avg. qps = 2
Total Questions = 494256
Threads Connected = 1

Server has been running for over 48hrs.
It should be safe to follow these recommendations

SLOW QUERIES
The slow query log is enabled.
Current long_query_time = 1 sec.
You have 2 out of 494277 that take longer than 1 sec. to complete
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is NOT enabled.
You will not be able to do point in time recovery

WORKER THREADS
Current thread_cache_size = 8192
Current threads_cached = 6
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 1500
Current threads_connected = 1
Historic max_used_connections = 7
The number of used connections is 0% of the configured maximum.
You are using less than 10% of your configured max_connections.
Lowering max_connections could help to avoid an over-allocation of memory
See "MEMORY USAGE" section to make sure you are not over-allocating

INNODB STATUS
Current InnoDB index space = 1 M
Current InnoDB data space = 6 M
Current InnoDB buffer pool free = 0 %
Current innodb_buffer_pool_size = 8 M
Depending on how much space your innodb indexes take up it may be safe
to increase this value to up to 2 / 3 of total system memory

MEMORY USAGE
Max Memory Ever Allocated : 2.70 G
Configured Max Per-thread Buffers : 41.38 G
Configured Max Global Buffers : 2.50 G
Configured Max Memory Limit : 43.89 G
Physical Memory : 7.86 G

nMax memory limit exceeds 90% of physical memory

KEY BUFFER
Current MyISAM index space = 5 K
Current key_buffer_size = 2.00 G
Key cache miss rate is 1 : 270
Key buffer free ratio = 81 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is enabled
Current query_cache_size = 512 M
Current query_cache_used = 63 M
Current query_cache_limit = 512 M
Current Query cache Memory fill ratio = 12.48 %
Current query_cache_min_res_unit = 4 K
Your query_cache_size seems to be too high.
Perhaps you can use these resources elsewhere
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
Current sort_buffer_size = 8 M
Current read_rnd_buffer_size = 8 M
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 4.00 M
You have had 0 queries where a join could not use an index properly
Your joins seem to be using indexes properly
join_buffer_size >= 4 M
This is not advised

OPEN FILES LIMIT
Current open_files_limit = 65535 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
Your open_files_limit value seems to be fine

TABLE CACHE
Current table_cache value = 36272 tables
You have a total of 14 tables
You have 221 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 256 M
Current tmp_table_size = 512 M
Of 15315 temp tables, 32% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Perhaps you should increase your tmp_table_size and/or max_heap_table_size
to reduce the number of disk-based temporary tables
Note! BLOB and TEXT columns are not allow in memory tables.
If you are using these columns raising these values might not impact your
ratio of on disk temp tables.

TABLE SCANS
Current read_buffer_size = 8 M
Current table scan ratio = 25 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 0 : 494532
Your table locking seems to be fine




And here is my.cnf File

[mysqld]
set-variable = max_connections=250
socket = /var/lib/mysql/mysql.sock
key_buffer = 2048M
table_cache = 36272
max_user_connections = 45
open_files_limit = 108816
join_buffer_size = 3M
read_buffer_size = 8M
sort_buffer_size = 8M
tmp_table_size=512M
read_rnd_buffer_size=8M
max_heap_table_size=512M
thread_cache_size=8
thread_cache=8192
query_cache_type=1
query_cache_limit=384M
query_cache_size=256M
thread_concurrency = 8
wait_timeout = 60
connect_timeout = 60
interactive_timeout = 60
long_query_time=1
log-slow-queries = /var/log/mysqlslowqueries.log
max_allowed_packet=128M
concurrent_insert=2

Reply With Quote


Sponsored Links
  #2  
Old 12-04-2010, 03:47 PM
funkywizard funkywizard is offline
unghhh... Baaandwidth....
 
Join Date: Jan 2005
Posts: 7,811
Avg. qps = 2

you've only got 2 queries per second.

Current long_query_time = 1 sec.
You have 2 out of 494277 that take longer than 1 sec. to complete

almost none of these queries are slow queries.

I would say given the low number of queries happening, and the fact that none of them are slow queries, there's no need to optimize anything.

Are you having performance issues on your website, or just looking to wring the most performance out of your setup?

__________________
IOFLOOD.com -- We Love Servers
Are you a Minecraft host?
Ask about our new E3-1240v2 servers.
Email (sales [at] ioflood . com) or skype "funkywizard" for details.

Reply With Quote
  #3  
Old 12-04-2010, 04:00 PM
dontflip dontflip is offline
Newbie
 
Join Date: Dec 2010
Posts: 9
Thanks For reply

Hi there, and thanks for the fast reply, however i had issues were when i would get around 100 concurrent users on the site at the same time the website would become slow and sometimes unresponsive... according to my ram and cpu what should my new my.cnf file look like, i have lots of ram so atleast i would want the site to handle lots of traffic > 200 users at once lets say.

Reply With Quote
Sponsored Links
  #4  
Old 12-04-2010, 04:09 PM
bsolaris bsolaris is offline
WHT Addict
 
Join Date: Sep 2007
Location: US east coast
Posts: 140
I would recommend you run tuning-primer.sh while the server is under load. Otherwise seems to be your optimizing for an empty server, which most likely is not what you want.

Reply With Quote
  #5  
Old 12-04-2010, 04:26 PM
dontflip dontflip is offline
Newbie
 
Join Date: Dec 2010
Posts: 9
ok thank you bsolaris, i will try to see if i ever notice load to run tuning primer and i will post back here soon thank you everyone for the help and i will post back

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL optimization, my.cnf optimization, MySQL from RAM zoli Hosting Software and Control Panels 0 09-30-2010 05:18 PM
my.cnf optimization, need help whdev Hosting Security and Technology 9 10-08-2008 07:01 AM
mysql my.cnf optimization needed robol Hosting Security and Technology 6 04-13-2008 04:00 AM
MySQL / my.cnf Optimization! ceint Programming Discussion 1 10-17-2007 11:51 AM
mysql> SHOW STATUS; Optimization of my.cnf priceww Hosting Security and Technology 6 02-17-2007 07:56 PM

Related posts from TheWhir.com
Title Type Date Posted
Dimension Data Includes WAN Optimization in Public Cloud Service Web Hosting News 2013-02-12 11:30:22
Open Source Content Management System Joomla Releases Mobile-Friendly Joomla 3.0 with Bootstrap Web Hosting News 2012-09-27 15:40:27
Web Optimization Provider Yottaa Launches Version 2.0, Adds Patented QuickTune Technology Web Hosting News 2012-09-17 15:18:17
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


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?