Hello,

I need some help tuning mysql. I'm running 3.23.58-Max-log on a Red Hat
Linux Enterprise server with 1 gig of memory and 4 cpus. The database is
used by a web application which runs on a separate machine. The performance
is not so good. Can anybody tell me if my configurations are incorrect, and
what I may need to change? My /etc/my.cnf file is as follows:

user            = mysql
port            = 3306
skip-locking

set-variable    = key_buffer=384M
set-variable    = max_allowed_packet=1M
set-variable    = table_cache=512
set-variable    = sort_buffer=2M
set-variable    = record_buffer=2M
set-variable    = thread_cache=8
# Try number of CPU's*2 for thread_concurrency
set-variable    = thread_concurrency=8
set-variable    = myisam_sort_buffer_size=64M
##set-variable  = net_buffer_length=8K
set-variable = max_connections = 200
log-bin
server-id       = 1


# Uncomment the following if you are using Innobase tables
##innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
innodb_data_file_path = ibdata1:800M
innodb_data_home_dir = /var/mysql/data/
innodb_log_group_home_dir = /var/log/mysql/
innodb_log_arch_dir = /var/log/mysql/
set-variable = innodb_mirrored_log_groups=1
set-variable = innodb_log_files_in_group=3
##set-variable = innodb_log_file_size=100M
set-variable = innodb_log_file_size=5M
set-variable = innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=1
innodb_log_archive=0
set-variable = innodb_buffer_pool_size=384M
set-variable = innodb_additional_mem_pool_size=20M
set-variable = innodb_file_io_threads=8
set-variable = innodb_lock_wait_timeout=50


[mysqldump]
quick
set-variable    = max_allowed_packet=16M

[mysql]
no-auto-rehash

[isamchk]
set-variable    = key_buffer=256M
set-variable    = sort_buffer=256M
set-variable    = read_buffer=2M
set-variable    = write_buffer=2M

[myisamchk]
set-variable    = key_buffer=256M
set-variable    = sort_buffer=256M
set-variable    = read_buffer=2M
set-variable    = write_buffer=2M

[mysqlhotcopy]
interactive-timeout

Running SHOW STATUS displays the following:

| Connections              | 723666     |
| Created_tmp_disk_tables  | 6230       |
| Created_tmp_tables       | 10179      |
| Created_tmp_files        | 0          |
| Delayed_insert_threads   | 0          |
| Delayed_writes           | 0          |
| Delayed_errors           | 0          |
| Flush_commands           | 1          |
| Handler_delete           | 138        |
| Handler_read_first       | 197703     |
| Handler_read_key         | 203042308  |
| Handler_read_next        | 377071037  |
| Handler_read_prev        | 0          |
| Handler_read_rnd         | 1377204    |
| Handler_read_rnd_next    | 913180300  |
| Handler_update           | 193164     |
| Handler_write            | 14314266   |
| Key_blocks_used          | 193053     |
| Key_read_requests        | 26041126   |
| Key_reads                | 178671     |
| Key_write_requests       | 1463800    |
| Key_writes               | 1432420    |
| Max_used_connections     | 15
| Not_flushed_key_blocks   | 0          |
| Not_flushed_delayed_rows | 0          |
| Open_tables              | 174        |
| Open_files               | 255        |
| Open_streams             | 0          |
| Table_locks_immediate    | 2137916    |
| Table_locks_waited       | 437        |
| Threads_cached           | 7          |
| Threads_created          | 32         |
| Threads_connected        | 1          |
| Threads_running          | 1          |
| Uptime                   | 759513     |
+--------------------------+------------+

thanks,
Paolo


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to