Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Mysql optimization

Posted on 2014-10-29
5
Medium Priority
?
215 Views
Last Modified: 2015-01-05
The following is my.cnf config for MySQL 5.5.16.
I have 16 gb ram on a Linux CentOS server.
Can someone suggest tweaks to my file please?
I see I have a mix of InnoDB and MyISAM tables.  I have some pretty big tables mixed in with some smaller.  Biggest is over a million records.
I'm sure I need improvements.
Thanks!

tmpdir = /run/mysqld

key_buffer = 819M
max_allowed_packet = 16M
table_cache = 512
sort_buffer_size = 16M
read_buffer_size = 8M
read_rnd_buffer_size = 16M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
#innodb_buffer_pool_size = 384M
#innodb_flush_log_at_trx_commit = 1

thread_concurrency = 8

skip-federated

log-bin=mysql-bin

log_slow_queries       = /var/log/mysql/mysql-slow.log
long_query_time = 2
log-queries-not-using-indexes

server-id	= 1

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[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

[mysqlhotcopy]
interactive-timeout

Open in new window

0
Comment
Question by:Gabriel7
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 7

Accepted Solution

by:
Stampel earned 1500 total points
ID: 40412930
Difficult to say without knowing your application but ...
try to set innodb_buffer_pool_size=3072M if you can afford or 2048M if you cant. Also set innodb_thread_concurrency=16 (verify this with your processor cores possibility)
which is the main thing you can do.
Also key_buffer could be larger maybe try 1024M
thread_cache_size=50
query_cache_size=256M
query_cache_limit=5M

join_buffer_size=8M
tmp_table_size=64M
max_heap_table_size=64M

also check if you could need :
bulk_insert_buffer_size=???? (64M)
myisam_sort_buffer_size=???? (128M)


Try to see if you get better performances by applying things 1 by 1.
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 40413130
I guess my first question would be "why do you think you need to make changes?"  Usually there would be a symptom that would trigger a concern.  Are there web script files that are running too slowly or other indicators that might be helpful?
0
 

Author Comment

by:Gabriel7
ID: 40414107
Well, I have had too many users for one...then I've had some large queries create issues so I wanted to verify the config first.  As a first step.
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 40414289
some large queries create issues
There's an article from one of our colleagues here at E-E that may be helpful.  I think I would look at the queries as the first step, since the standard installation works pretty well for most people.
http://www.experts-exchange.com/Database/MySQL/A_1250-3-Ways-to-Speed-Up-MySQL.html
0
 

Author Closing Comment

by:Gabriel7
ID: 40531259
This helped, though it wasn't the resolution.  It did lead to the answer though.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question