News:

Wondering if this will always be free?  See why free is better.

Main Menu

key_buffer_size

Started by Owdy, December 05, 2009, 03:50:03 PM

Previous topic - Next topic

Owdy

Quote from: Mark Rose on October 16, 2009, 12:11:46 AM
You haven't tuned MySQL.

Set key_buffer_size = 64M in /etc/my.cnf and restart MySQL.
Hmm, i dont have /etc/my.cnf. I Have /etc/mysql/my.cnf. Same thing?
Other thing, i dont have key_buffer_size, only key_buffer, and weird thing is its 2 times in there.  :D

Whole file
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0

[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 64M
max_allowed_packet = 16M
thread_stack = 128K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit       = 1M
query_cache_size        = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
#log = /var/log/mysql/mysql.log
#
# Error logging goes to syslog. This is a Debian improvement :)
#
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size         = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
#
# * BerkeleyDB
#
# Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
skip-bdb
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
#skip-innodb
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
quote-names
max_allowed_packet = 16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
key_buffer = 16M

#
# * NDB Cluster
#
# See /usr/share/doc/mysql-server-*/README.Debian for more information.
#
# The following configuration is read by the NDB Data Nodes (ndbd processes)
# not from the NDB Management Nodes (ndb_mgmd processes).
#
# [MYSQL_CLUSTER]
# ndb-connectstring=127.0.0.1


#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/



Im in VPS with Debian Lenny.
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Something like that

Quote from: Owdy on December 05, 2009, 03:50:03 PM
Quote from: Mark Rose on October 16, 2009, 12:11:46 AM
You haven't tuned MySQL.

Set key_buffer_size = 64M in /etc/my.cnf and restart MySQL.
Hmm, i dont have /etc/my.cnf. I Have /etc/mysql/my.cnf. Same thing?

Yes. Debian has a more organized /etc directory. :)

Quote
Other thing, i dont have key_buffer_size, only key_buffer, and weird thing is its 2 times in there.  :D

Whole file
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0

[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 64M
max_allowed_packet = 16M
thread_stack = 128K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit       = 1M
query_cache_size        = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
#log = /var/log/mysql/mysql.log
#
# Error logging goes to syslog. This is a Debian improvement :)
#
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size         = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
#
# * BerkeleyDB
#
# Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
skip-bdb
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
#skip-innodb
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
quote-names
max_allowed_packet = 16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
key_buffer = 16M

#
# * NDB Cluster
#
# See /usr/share/doc/mysql-server-*/README.Debian for more information.
#
# The following configuration is read by the NDB Data Nodes (ndbd processes)
# not from the NDB Management Nodes (ndb_mgmd processes).
#
# [MYSQL_CLUSTER]
# ndb-connectstring=127.0.0.1


#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/



Im in VPS with Debian Lenny.

Those settings are fine for a MyISAM only setup.

The first one is for the main MySQL daemon ([mysqld] section). The second one is for when checking tables ([isamchk]).

key_buffer_size is the same thing as key_buffer. I prefer using key_buffer_size as it's a little clearer what the setting is, but either will work.

Owdy

Thanks Mark. Why that key_buffer is twice there?

QuoteThose settings are fine for a MyISAM only setup.
How to tweak that file if i turn to innodb?
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Something like that

Quote from: Owdy on December 05, 2009, 05:43:38 PM
Thanks Mark. Why that key_buffer is twice there?

Because the one in the [mysqld] section applies when mysql is running, and the one in the [isamchk] section applies when you are checking tables (it's a command line tool).

Quote
QuoteThose settings are fine for a MyISAM only setup.
How to tweak that file if i turn to innodb?

I'd worry about it only if you need to run InnoDB for some reason.

Owdy

Quote from: Mark Rose on December 05, 2009, 05:52:12 PM
Because the one in the [mysqld] section applies when mysql is running, and the one in the [isamchk] section applies when you are checking tables (it's a command line tool).
Do i need to change both values?

Quote
I'd worry about it only if you need to run InnoDB for some reason.
I tought it is faster:)
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Ensiferous

It's actually slower if you don't need the benefits it provides. MySQL does something called locking when a change is made, every time you update or insert a row MySQL needs to lock the data while it updates/inserts. The reason InnoDB is better at times is because it can lock individual rows so that MySQL can read from all the other rows not being updated. MyISAM locks at a table-level meaning that while *any* row is being updated *all* rows will be locked, so no reading can be done.

This is only an issue if you have a lot of concurrent queries running, but if you do it will be a big improvement, and if you don't then it will be give a decrease in performance as the row-level-locking comes at the cost of reading speed.
My Latest Blog Post: Debugging Nginx Errors

Owdy

#6
Okay, i have 64M key_buffer, still status.php says its too small. What is optimal setting?
http://pclinuxos-fi.org/keskustelu/status2.php

Other site my host has set it to  268435456, is that 260M? Should i use that?
http://****.net/status2.php?mysql_info=1
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Ben_S

It depends on how big your indexes are. Run this script http://www.day32.com/MySQL/
Liverpool FC Forum with 14 million+ posts.

Owdy

Using login values from ~/.my.cnf
- INITIAL LOGIN ATTEMPT FAILED -
Testing for stored webmin passwords:
Could not auto detect login info!   
Found Sockets: /var/run/mysqld/mysqld.sock
Using: /var/run/mysqld/mysqld.sock       
Would you like to provide a different socket?: [y/N] n
Do you have your login handy ? [y/N] : y             
User: root                                           
Password: *******                   
                                                     
Would you like me to create a ~/.my.cnf file for you? [y/N] : n


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

MySQL Version 5.0.51a-24+lenny2 x86_64

Uptime = 0 days 21 hrs 32 min 29 sec
Avg. qps = 2                       
Total Questions = 162473           
Threads Connected = 17             

Warning: Server has not been running for at least 48hrs.
It may not be safe to use these recommendations         
                                                                                                                                                                         
To find out more information on how each of these                                                                                                                         
runtime variables effects performance visit:                                                                                                                             
http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html                                                                                                       
Visit http://www.mysql.com/products/enterprise/advisors.html                                                                                                             
for info about MySQL's Enterprise Monitoring and Advisory Service                                                                                                         
                                                                                                                                                                         
SLOW QUERIES                                                                                                                                                             
The slow query log is NOT enabled.                                                                                                                                       
Current long_query_time = 10 sec.                                                                                                                                         
You have 0 out of 162498 that take longer than 10 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                                                                                                                         
See http://dev.mysql.com/doc/refman/5.0/en/point-in-time-recovery.html                                                                                                   
                                                                                                                                                                         
WORKER THREADS                                                                                                                                                           
Current thread_cache_size = 8                                                                                                                                             
Current threads_cached = 0                                                                                                                                               
Current threads_per_sec = 0                                                                                                                                               
Historic threads_per_sec = 0                                                                                                                                             
Your thread_cache_size is fine                                                                                                                                           

MAX CONNECTIONS
Current max_connections = 100                                                                                                                                             
Current threads_connected = 17                                                                                                                                           
Historic max_used_connections = 19                                                                                                                                       
The number of used connections is 19% of the configured maximum.                                                                                                         
Your max_connections variable seems to be fine.                                                                                                                           

INNODB STATUS
Current InnoDB index space = 0 bytes                                                                                                                                     
Current InnoDB data space = 0 bytes                                                                                                                                       
Current InnoDB buffer pool free = 96 %                                                                                                                                   
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 : 142 M                                                                                                                                         
Configured Max Per-thread Buffers : 262 M                                                                                                                                 
Configured Max Global Buffers : 90 M                                                                                                                                     
Configured Max Memory Limit : 352 M                                                                                                                                       
Physical Memory : 1.92 G                                                                                                                                                 
Max memory limit seem to be within acceptable norms                                                                                                                       

KEY BUFFER
Current MyISAM index space = 173 M                                                                                                                                       
Current key_buffer_size = 64 M                                                                                                                                           
Key cache miss rate is 1 : 11                                                                                                                                             
Key buffer free ratio = 74 %                                                                                                                                             
Your key_buffer_size seems to be fine                                                                                                                                     

QUERY CACHE
Query cache is enabled                                                                                                                                                   
Current query_cache_size = 16 M                                                                                                                                           
Current query_cache_used = 498 K                                                                                                                                         
Current query_cache_limit = 1 M                                                                                                                                           
Current Query cache Memory fill ratio = 3.03 %                                                                                                                           
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 = 2 M
Current read_rnd_buffer_size = 256 K
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 132.00 K
You have had 402 queries where a join could not use an index properly
You should enable "log-queries-not-using-indexes"
Then look for non indexed joins in the slow query log.
If you are unable to optimize your queries you may want to increase your
join_buffer_size to accommodate larger joins in one pass.

Note! This script will still suggest raising the join_buffer_size when
ANY joins not using indexes are found.

OPEN FILES LIMIT
Current open_files_limit = 1024 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 = 64 tables
You have a total of 191 tables
You have 64 open tables.
Current table_cache hit rate is 1%
, while 100% of your table cache is in use
You should probably increase your table_cache

TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 32 M
Of 2837 temp tables, 9% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Created disk tmp tables ratio seems fine

TABLE SCANS
Current read_buffer_size = 128 K
Current table scan ratio = 7650 : 1
You have a high ratio of sequential access requests to SELECTs
You may benefit from raising read_buffer_size and/or improving your use of indexes.

TABLE LOCKING
Current Lock Wait ratio = 1 : 158955
Your table locking seems to be fine
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Owdy

That script says its fine , this says its too small http://pclinuxos-fi.org/keskustelu/status2.php . Grrrr....
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Something like that

Quote from: Owdy on December 28, 2009, 09:54:55 AM
That script says its fine , this says its too small http://pclinuxos-fi.org/keskustelu/status2.php . Grrrr....

It's too small. I would increase it to 256M.

Owdy

Okay, thanks Mark, i try that.  :)
Btw, last time you said 64M is fine :D
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Owdy

Im going to move larger board to that server later, are those same settings good for larger forum? 
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Something like that

Some additional tuning might be needed, but it won't kill the server :)

And yes, I suggested 64, but that other script Ben pointed out gave me further insight.

Owdy

#14
Quote from: «Mark» on December 28, 2009, 01:59:04 PM
Some additional tuning might be needed, but it won't kill the server :)
Okay, any recommendations? :D
http://pclinuxos-fi.org/keskustelu/status2.php


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

MySQL Version 5.0.51a-24+lenny2 x86_64

Uptime = 16 days 17 hrs 11 min 4 sec
Avg. qps = 0                       
Total Questions = 875603           
Threads Connected = 4               

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

To find out more information on how each of these
runtime variables effects performance visit:                                                                                                                             
http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html                                                                                                       
Visit http://www.mysql.com/products/enterprise/advisors.html                                                                                                             
for info about MySQL's Enterprise Monitoring and Advisory Service                                                                                                         
                                                                                                                                                                         
SLOW QUERIES                                                                                                                                                             
The slow query log is NOT enabled.                                                                                                                                       
Current long_query_time = 10 sec.                                                                                                                                         
You have 18 out of 875624 that take longer than 10 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                                                                                                                         
See http://dev.mysql.com/doc/refman/5.0/en/point-in-time-recovery.html                                                                                                   
                                                                                                                                                                         
WORKER THREADS                                                                                                                                                           
Current thread_cache_size = 8                                                                                                                                             
Current threads_cached = 5                                                                                                                                               
Current threads_per_sec = 0                                                                                                                                               
Historic threads_per_sec = 0                                                                                                                                             
Your thread_cache_size is fine                                                                                                                                           

MAX CONNECTIONS
Current max_connections = 100                                                                                                                                             
Current threads_connected = 4                                                                                                                                             
Historic max_used_connections = 40                                                                                                                                       
The number of used connections is 40% of the configured maximum.                                                                                                         
Your max_connections variable seems to be fine.                                                                                                                           

INNODB STATUS
Current InnoDB index space = 0 bytes                                                                                                                                     
Current InnoDB data space = 0 bytes                                                                                                                                       
Current InnoDB buffer pool free = 96 %                                                                                                                                   
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 : 434 M                                                                                                                                         
Configured Max Per-thread Buffers : 262 M                                                                                                                                 
Configured Max Global Buffers : 330 M                                                                                                                                     
Configured Max Memory Limit : 592 M                                                                                                                                       
Physical Memory : 1.92 G                                                                                                                                                 
Max memory limit seem to be within acceptable norms                                                                                                                       

KEY BUFFER
Current MyISAM index space = 224 M                                                                                                                                       
Current key_buffer_size = 256 M                                                                                                                                           
Key cache miss rate is 1 : 66                                                                                                                                             
Key buffer free ratio = 81 %                                                                                                                                             
Your key_buffer_size seems to be fine                                                                                                                                     

QUERY CACHE
Query cache is enabled                                                                                                                                                   
Current query_cache_size = 64 M                                                                                                                                           
Current query_cache_used = 48 M                                                                                                                                           
Current query_cache_limit = 8 M                                                                                                                                           
Current Query cache Memory fill ratio = 76.47 %                                                                                                                           
Current query_cache_min_res_unit = 4 K                                                                                                                                   
MySQL won't cache query results that are larger than query_cache_limit in size                                                                                           
                                                                                                                                                                         
SORT OPERATIONS                                                                                                                                                           
Current sort_buffer_size = 2 M                                                                                                                                           
Current read_rnd_buffer_size = 256 K                                                                                                                                     
Sort buffer seems to be fine                                                                                                                                             

JOINS
Current join_buffer_size = 132.00 K
You have had 823 queries where a join could not use an index properly
You should enable "log-queries-not-using-indexes"
Then look for non indexed joins in the slow query log.
If you are unable to optimize your queries you may want to increase your
join_buffer_size to accommodate larger joins in one pass.

Note! This script will still suggest raising the join_buffer_size when
ANY joins not using indexes are found.

OPEN FILES LIMIT
Current open_files_limit = 1024 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 = 96 tables
You have a total of 217 tables
You have 96 open tables.
Current table_cache hit rate is 0%
, while 100% of your table cache is in use
You should probably increase your table_cache

TEMP TABLES
Current max_heap_table_size = 32 M
Current tmp_table_size = 32 M
Of 17811 temp tables, 31% were created on disk
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 = 128 K
Current table scan ratio = 60 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 4904
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'
If you have a high concurrency of inserts on Dynamic row-length tables
consider setting 'concurrent_insert=2'.


Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Something like that

I would recommend increasing your table_cache_size to 256 and see how it goes.

Owdy

Quote from: «Mark» on January 14, 2010, 12:00:46 PM
I would recommend increasing your table_cache_size to 256 and see how it goes.
Thanks, i try that. table_cache size is now 256
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Something like that

Quote from: Fossil on January 14, 2010, 12:56:52 PM
Quote from: «Mark» on January 14, 2010, 12:00:46 PM
I would recommend increasing your table_cache_size to 256 and see how it goes.
Thanks, i try that. table_cache size is now 256

Well, you could make it bigger again :)

Owdy

I tryed and it seemed to slow board. is that possible?
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Owdy

#19
I set table_cache and key_buffer_size both to 512M. Lets see how that goes.
http://hoitajat.net/status2.php
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Something like that

Quote from: Fossil on January 17, 2010, 01:40:58 PM
I tryed and it seemed to slow board. is that possible?

Yep. There are no such things as perfect settings.

Owdy

Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

b3dm4n

Quote from: Øwdy on March 23, 2010, 04:11:34 PM
Now it looks good, perfect green line :D
http://smf-friends.org/status.php

nice status.php result
why my status.php output is different than yours? I mean, in mysql statistics there is no suggestion what to adjust like yours

can u share or pm me what's on you my.cnf and httpd.conf?
coz I'm having trouble setting mine
please ...

Owdy

Quote from: b3dm4n on March 24, 2010, 11:59:49 PM
nice status.php result
why my status.php output is different than yours? I mean, in mysql statistics there is no suggestion what to adjust like yours

can u share or pm me what's on you my.cnf and httpd.conf?

Here, but every server need own kind settings.


#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port      = 3306
socket      = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket      = /var/run/mysqld/mysqld.sock
nice      = 0

[mysqld]
#
# * Basic Settings
#
user      = mysql
pid-file   = /var/run/mysqld/mysqld.pid
socket      = /var/run/mysqld/mysqld.sock
port      = 3306
basedir      = /usr
datadir      = /var/lib/mysql
tmpdir      = /tmp
language   = /usr/share/mysql/english
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address      = 127.0.0.1

#
# * Fine Tuning
#
key_buffer      = 512M
max_allowed_packet   = 16M
max_heap_table_size = 335M
thread_stack      = 128K
thread_cache_size   = 8

# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover      = BACKUP
#max_connections        = 100
table_cache            = 512
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit       = 1M
query_cache_size        = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
#log      = /var/log/mysql/mysql.log
#
# Error logging goes to syslog. This is a Debian improvement :)
#
# Here you can see queries with especially long duration
#log_slow_queries   = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id      = 1
#log_bin         = /var/log/mysql/mysql-bin.log
expire_logs_days   = 10
max_binlog_size         = 100M
#binlog_do_db      = include_database_name
#binlog_ignore_db   = include_database_name
#
# * BerkeleyDB
#
# Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
skip-bdb
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
#skip-innodb
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
quote-names
max_allowed_packet   = 16M

[mysql]
#no-auto-rehash   # faster start of mysql but no tab completition

[isamchk]
key_buffer      = 16M

#
# * NDB Cluster
#
# See /usr/share/doc/mysql-server-*/README.Debian for more information.
#
# The following configuration is read by the NDB Data Nodes (ndbd processes)
# not from the NDB Management Nodes (ndb_mgmd processes).
#
# [MYSQL_CLUSTER]
# ndb-connectstring=127.0.0.1


#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/


Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

b3dm4n

thx, I've tried so many configuration and yet my mysql still stuck everytime I run smf, I'll try your conf maybe I get lucky

Advertisement: