UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Technical Support > VPS - Virtual Private Servers

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 24-04-2008, 06:59
new member
 
Join Date: Sep 2007
Posts: 4
Default MYSQL Tune up

Hi there
can someone advice me on increasing mysql performance

i know that i need to modify the my.cnf file or something

hope to hear form you guys on some guides or examples

Reply With Quote
  #2 (permalink)  
Old 24-04-2008, 07:18
Rock's Avatar
System Administrator
 
Join Date: Dec 2006
Posts: 571
Post

Hi Matamoto,

Do you have any control panel installed on your VPS? If it's cPanel or Plesk,we can provide you with few tips on getting 100% out of MySQL..
__________________

Rock _a.k.a._ Jack L.

http://www.eUKhost.com
Windows Hosting || Windows Reseller Hosting
Reply With Quote
  #3 (permalink)  
Old 24-04-2008, 08:22
new member
 
Join Date: Sep 2007
Posts: 4
Default

yeap
we have cpanel installed with our VPS
Reply With Quote
  #4 (permalink)  
Old 24-04-2008, 11:40
Senior System Administrator
 
Join Date: Oct 2006
Posts: 145
Thumbs up Hey

Hey,

Yes, mysql provides a configuration file located in /etc/my.cnf. From here you can set all of the memory, table, and connection limits as well as a host of other options.

You can get the default buffer sizes used by the mysqld server with this command:

root@vps [~]# mysqld --help
This command produces a list of all mysqld options and configurable variables.

If there is a mysqld server currently running, you can see what values it actually is using for the variables by executing this command:

root@vps [~]# mysqladmin variables

MySQL uses algorithms that are very scalable, so you can usually run with very little memory. If you, however, give MySQL more memory, you will normally also get better performance.

When tuning a MySQL server, the two most important variables to use are key_buffer_size and table_cache.

When you have installed MySQL, the `support-files' directory will contain some different `my.cnf' example files, `my-huge.cnf', `my-large.cnf', `my-medium.cnf', and `my-small.cnf', you can use as a base to optimize your system.

Note : As you are having cPanel then these files should be located in /usr/share/mysql/ directory.

If there are very much connections, “swapping problems'' may occur unless mysqld has been configured to use very little memory for each connection. mysqld performs better if you have enough memory for all connections, of course 

You can use following my.cnf, most of our VPS customers are using same and they are very much happy with it 

Code:
[mysqld]
max_connections = 100
key_buffer = 16M
myisam_sort_buffer_size = 32M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1024
thread_cache_size = 286
interactive_timeout = 10
wait_timeout = 10
connect_timeout = 10
max_allowed_packet = 1M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 10M
query_cache_type = 1
tmp_table_size = 16M
skip-innodb

[mysqld_safe]
open_files_limit = 8192

[mysqldump]
quick
max_allowed_packet = 16M

[myisamchk]
key_buffer = 32M
sort_buffer = 32M
read_buffer = 16M
write_buffer = 16M

[mysqlhotcopy]
interactive-timeout

Actually this also depends on your VPS / server configuration. If you are having 1 GB or more RAM then you can increase these parameters.

There are few ready scripts (e.g. ELS) which can be used for mysql optimization. You just have to google :P
__________________

Best Regards,
Sebastian
Senior System Administrator
http://www.eukhost.com/
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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


All times are GMT. The time now is 22:40.

 

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

knowledgebase articles

popular blog categories