Jump to content

Mysql Tune


jaymc

Recommended Posts

Hate to be a pain here as I know there is a lot on the web about this of which I do read, but having a few problems

 

My dedicated server runs apache and mysql. I have recently converted all tables from MYISAM to innodb, since then I have notice a huge increase in linux SWAP usage, in the past it was always around 20MB, now its between 1gig and 2 gig. Here is the relivent entries in my.cnf

 

OS: Centos 4.4

Mysql: 5.0.54

Php: 5

RAM: 3GB

CPU: 2 X opteron 142

 

I started off with innodb_buffer_pool_size = 2500M, in stages I have decreased that by 500M each time to try and resolve the swap issue but it hasnt made an ounce of difference

 

Hope you can help

 

[mysqld]
default-storage_engine = innodb
safe-show-database
query_cache_limit=1M
query_cache_min_res_unit=1024
query_cache_size=96M ## 32MB for every 1GB of RAM
query_prealloc_size=65536
query_cache_type=1
thread_cache_size=64
key_buffer=296M ## 128MB for every 1GB of RAM
join_buffer=6M
max_connect_errors=20
max_allowed_packet=16M
table_cache=1800
record_buffer=16M
tmp_table_size=64M
sort_buffer_size=3M ## 1MB for every 1GB of RAM
read_buffer_size=3M ## 1MB for every 1GB of RAM
read_rnd_buffer_size=3M  ## 1MB for every 1GB of RAM
bulk_insert_buffer_size = 8M
thread_concurrency=4 ## Number of CPUs x 2
myisam_sort_buffer_size=16M



[b]innodb_data_file_path = ibdata1:500M:autoextend
innodb_buffer_pool_size = 750M
innodb_additional_mem_pool_size = 2M
innodb_flush_method = O_DIRECT[/b]




[mysql]
no-auto-rehash
#safe-updates

[isamchk]
key_buffer=256M
sort_buffer=256M
read_buffer=256M
write_buffer=256M

[myisamchk]
key_buffer=256M
sort_buffer=256M
read_buffer=256M
write_buffer=256M

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.