[前][次][番号順一覧][スレッド一覧]

mysql:5187

From: "j-ken/office" <"j-ken/office" <office@xxxxxxxxxx>>
Date: Fri, 22 Feb 2002 01:18:16 +0900
Subject: [mysql 05187] サーバーパラメーターのチューニングの目安?

たけ@J研です。

マニュアル等にも目をとうしたのですが、
いまいちよい結果がです。困っています。

サーバーは
CPU	Pentium III 1GHz
メモリー	512M
OSはVine Linux 2.1です。

mysql	3.23.39
php	4.05
の環境で携帯用のWEBサイトを作っています。


現在mysqladmin status で確認すると以下のような状態にあります。
Uptime: 7133  Threads: 3  Questions: 143491  Slow queries: 255
Opens: 947  Flush tables: 1  Open tables: 400 Queries per second avg: 20.117

問い合わせ平均応答秒数が20秒もかかり、オープンしているテーブルもMAXの400
になっています。このよな結果になるのでもっと最適化したいのですが、みなさ
んはなにを目安に(もちろんデータベースの設計の問題もあるとは思うのですが)
パラメータを決めているのでしょうか?

ご教授頂ければ幸いです。

ちなみに
mysqladmin extended-status 
+--------------------------+------------+
| Variable_name            | Value      |
+--------------------------+------------+
| Aborted_clients          | 7          |
| Aborted_connects         | 296        |
| Bytes_received           | 12429589   |
| Bytes_sent               | 1024713470 |
| Connections              | 27707      |
| Created_tmp_disk_tables  | 591        |
| Created_tmp_tables       | 668        |
| Created_tmp_files        | 8          |
| Delayed_insert_threads   | 0          |
| Delayed_writes           | 0          |
| Delayed_errors           | 0          |
| Flush_commands           | 1          |
| Handler_delete           | 0          |
| Handler_read_first       | 15412      |
| Handler_read_key         | 7810759    |
| Handler_read_next        | 16681767   |
| Handler_read_prev        | 9          |
| Handler_read_rnd         | 2539361    |
| Handler_read_rnd_next    | 77564412   |
| Handler_update           | 2470496    |
| Handler_write            | 1502355    |
| Key_blocks_used          | 26688      |
| Key_read_requests        | 18389584   |
| Key_reads                | 9693       |
| Key_write_requests       | 1463345    |
| Key_writes               | 4848       |
| Max_used_connections     | 100        |
| Not_flushed_key_blocks   | 0          |
| Not_flushed_delayed_rows | 0          |
| Open_tables              | 400        |
| Open_files               | 469        |
| Open_streams             | 0          |
| Opened_tables            | 947        |
| Questions                | 146741     |
| Select_full_join         | 4          |
| Select_full_range_join   | 0          |
| Select_range             | 15701      |
| Select_range_check       | 0          |
| Select_scan              | 14022      |
| Slave_running            | OFF        |
| Slave_open_temp_tables   | 0          |
| Slow_launch_threads      | 26         |
| Slow_queries             | 255        |
| Sort_merge_passes        | 4          |
| Sort_range               | 3683       |
| Sort_rows                | 3176350    |
| Sort_scan                | 3910       |
| Table_locks_immediate    | 164559     |
| Table_locks_waited       | 2130       |
| Threads_cached           | 0          |
| Threads_created          | 27706      |
| Threads_connected        | 3          |
| Threads_running          | 1          |
| Uptime                   | 7302       |
+--------------------------+------------+

mysql>show variables 
----------------------------------------------------------------------------+
| Variable_name                   | Value                                   |
+---------------------------------+-----------------------------------------+
| ansi_mode                       | OFF                                     |
| back_log                        | 50                                      |
| basedir                         | /usr/local/                             |
| binlog_cache_size               | 32768                                   |
| character_set                   | sjis                                    |
| concurrent_insert               | ON                                      |
| connect_timeout                 | 5                                       |
| datadir                         | /usr/local/var/                         |
| delay_key_write                 | ON                                      |
| delayed_insert_limit            | 100                                     |
| delayed_insert_timeout          | 300                                     |
| delayed_queue_size              | 1000                                    |
| flush                           | OFF                                     |
| flush_time                      | 0                                       |
| have_bdb                        | NO                                      |
| have_gemini                     | NO                                      |
| have_innodb                     | NO                                      |
| have_isam                       | YES                                     |
| have_raid                       | NO                                      |
| have_ssl                        | NO                                      |
| init_file                       |                                         |
| interactive_timeout             | 28800                                   |
| join_buffer_size                | 131072                                  |
| key_buffer_size                 | 73396224                                |
| language                        | /usr/local/share/mysql/english/         |
| large_files_support             | ON                                      |
| locked_in_memory                | OFF                                     |
| log                             | OFF                                     |
| log_update                      | OFF                                     |
| log_bin                         | ON                                      |
| log_slave_updates               | OFF                                     |
| long_query_time                 | 10                                      |
| low_priority_updates            | OFF                                     |
| lower_case_table_names          | 0                                       |
| max_allowed_packet              | 2096128                                 |
| max_binlog_cache_size           | 4294967295                              |
| max_binlog_size                 | 1073741824                              |
| max_connections                 | 100                                     |
| max_connect_errors              | 10                                      |
| max_delayed_threads             | 20                                      |
| max_heap_table_size             | 16777216                                |
| max_join_size                   | 4294967295                              |
| max_sort_length                 | 1024                                    |
| max_user_connections            | 0                                       |
| max_tmp_tables                  | 32                                      |
| max_write_lock_count            | 4294967295                              |
| myisam_recover_options          | OFF                                     |
| myisam_max_extra_sort_file_size | 256                                     |
| myisam_max_sort_file_size       | 2047                                    |
| myisam_sort_buffer_size         | 8388608                                 |
| net_buffer_length               | 80896                                   |
| net_read_timeout                | 30                                      |
| net_retry_count                 | 10                                      |
| net_write_timeout               | 60                                      |
| open_files_limit                | 0                                       |
| port                            | 3306                                    |
| protocol_version                | 10                                      |
| record_buffer                   | 2093056                                 |
| query_buffer_size               | 0                                       |
| safe_show_database              | OFF                                     |
| server_id                       | 1                                       |
| skip_locking                    | ON                                      |
| skip_networking                 | OFF                                     |
| skip_show_database              | OFF                                     |
| slow_launch_time                | 2                                       |
| socket                          | /tmp/mysql.sock                         |
| sort_buffer                     | 9437176                                 |
| table_cache                     | 400                                     |
| table_type                      | MYISAM                                  |
| thread_cache_size               | 0                                       |
| thread_stack                    | 65536                                   |
| transaction_isolation           | READ-COMMITTED                          |
| timezone                        | JST                                     |
| tmp_table_size                  | 12582912                                |
| tmpdir                          | /tmp/                                   |
| version                         | 3.23.39-log                             |
| wait_timeout                    | 28800                                   |
+---------------------------------+------------------------------------------

こんな感じです。

***********************************
J-SKY研究所	http://j-ken.com
		mailto:take@xxxxxxxxxx
***********************************

[前][次][番号順一覧][スレッド一覧]

->    5187 2002-02-22 01:18 ["j-ken/office" <offi] サーバーパラメーターのチューニングの目安?
      5189 2002-02-22 23:09 ┗["TAKAHASHI, Tomohiro]                                       
      5190 2002-02-23 00:44  ┗["j-ken/office" <offi]                                     
      5191 2002-02-24 02:16   ┗[Tomoyuki Ishino <ish]