I've made a few changes to my Solaris - MySQL setup, following some
instructions in the manual for tuning.
(512MB RAM - single SCSI disk - combined web/db server - about 150 db tables
all with small query returns / single updates / hardly any joins)

I have set
max-connections = 200
table-cache = 256 (lots of tables randomly accessed?)
key-buffer = 128M (not much data returned)
also I have put "ulimit -n 1024" in the startup script for MySQL (picked a
nice round figure above 4*max_connections)

However in extended-status,
Handler_read_rnd = 2411931
Handler_read_rnd_next = 263409274
Threads_created = 29530

Are these "high" figures? I don't quite understand the instructions in the
manual.


Attached is the result of show status for the server that has been running
for the last 6 hours or so;

+--------------------------+-----------+
| Variable_name            | Value     |
+--------------------------+-----------+
| Aborted_clients          | 0         |
| Aborted_connects         | 1         |
| Bytes_received           | 7196086   |
| Bytes_sent               | 199095514 |
| Com_admin_commands       | 0         |
| Com_alter_table          | 0         |
| Com_analyze              | 0         |
| Com_backup_table         | 0         |
| Com_begin                | 0         |
| Com_change_db            | 32490     |
| Com_change_master        | 0         |
| Com_check                | 0         |
| Com_commit               | 0         |
| Com_create_db            | 0         |
| Com_create_function      | 0         |
| Com_create_index         | 0         |
| Com_create_table         | 4         |
| Com_delete               | 5379      |
| Com_drop_db              | 0         |
| Com_drop_function        | 0         |
| Com_drop_index           | 0         |
| Com_drop_table           | 0         |
| Com_flush                | 0         |
| Com_grant                | 0         |
| Com_insert               | 4866      |
| Com_insert_select        | 80        |
| Com_kill                 | 0         |
| Com_load                 | 0         |
| Com_load_master_table    | 0         |
| Com_lock_tables          | 0         |
| Com_optimize             | 0         |
| Com_purge                | 0         |
| Com_rename_table         | 0         |
| Com_repair               | 0         |
| Com_replace              | 0         |
| Com_replace_select       | 0         |
| Com_reset                | 0         |
| Com_restore_table        | 0         |
| Com_revoke               | 0         |
| Com_rollback             | 0         |
| Com_select               | 66449     |
| Com_set_option           | 2         |
| Com_show_binlogs         | 0         |
| Com_show_create          | 4         |
| Com_show_databases       | 4         |
| Com_show_fields          | 727       |
| Com_show_grants          | 0         |
| Com_show_keys            | 0         |
| Com_show_logs            | 0         |
| Com_show_master_status   | 0         |
| Com_show_open_tables     | 0         |
| Com_show_processlist     | 5         |
| Com_show_slave_status    | 0         |
| Com_show_status          | 11        |
| Com_show_tables          | 4         |
| Com_show_variables       | 4         |
| Com_slave_start          | 0         |
| Com_slave_stop           | 0         |
| Com_truncate             | 0         |
| Com_unlock_tables        | 0         |
| Com_update               | 712       |
| Connections              | 29532     |
| Created_tmp_disk_tables  | 2         |
| Created_tmp_tables       | 3860      |
| Created_tmp_files        | 0         |
| Delayed_insert_threads   | 1         |
| Delayed_writes           | 3357      |
| Delayed_errors           | 0         |
| Flush_commands           | 1         |
| Handler_delete           | 47119     |
| Handler_read_first       | 3         |
| Handler_read_key         | 1143771   |
| Handler_read_next        | 1689547   |
| Handler_read_prev        | 0         |
| Handler_read_rnd         | 2454694   |
| Handler_read_rnd_next    | 271712579 |
| Handler_update           | 30674     |
| Handler_write            | 1393892   |
| Key_blocks_used          | 1831      |
| Key_read_requests        | 3445490   |
| Key_reads                | 1828      |
| Key_write_requests       | 109       |
| Key_writes               | 109       |
| Max_used_connections     | 24        |
| Not_flushed_key_blocks   | 0         |
| Not_flushed_delayed_rows | 0         |
| Open_tables              | 239       |
| Open_files               | 423       |
| Open_streams             | 0         |
| Opened_tables            | 307       |
| Questions                | 140273    |
| Select_full_join         | 3892      |
| Select_full_range_join   | 0         |
| Select_range             | 0         |
| Select_range_check       | 0         |
| Select_scan              | 57415     |
| Slave_running            | OFF       |
| Slave_open_temp_tables   | 0         |
| Slow_launch_threads      | 0         |
| Slow_queries             | 56        |
| Sort_merge_passes        | 0         |
| Sort_range               | 1710      |
| Sort_rows                | 2454694   |
| Sort_scan                | 17265     |
| Table_locks_immediate    | 80920     |
| Table_locks_waited       | 1306      |
| Threads_cached           | 0         |
| Threads_created          | 29530     |
| Threads_connected        | 5         |
| Threads_running          | 1         |
| Uptime                   | 19880     |
+--------------------------+-----------+


All seems to work OK (with mysql taking about 4%-10% CPU in TOP) but I just
want to check I haven't done anything wrong with the parameters!

Cheers,
John



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to