Hi community!
I'm learning mysql optimization at the moment and would like
to ask some questions:
We are having 10000 views on our server (Linux, 128MB ram)
and site is too slow.=20
Look at this status results
| Aborted_clients | 3 |
| Aborted_connects | 0 |
| Created_tmp_tables | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 2 |
| Handler_delete | 46 |
| Handler_read_first | 30 |
| Handler_read_key | 26921 |
| Handler_read_next | 17952309 |
| Handler_read_rnd | 1248821 |
| Handler_update | 14612053 |
| Handler_write | 2873 |
| Key_blocks_used | 640 |
| Key_read_requests | 44218668 |
| Key_reads | 570 |
| Key_write_requests | 29225094 |
| Key_writes | 8383 |
| Max_used_connections | 50 |
| Not_flushed_key_blocks | 1 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 63 |
| Open_files | 90 |
| Open_streams | 1 |
| Opened_tables | 344 |
| Questions | 62611 |
| Running_threads | 14 |
| Slow_queries | 271 |
| Uptime | 66210 |
There's deffinitly tooo many slow_queries. I tried to turn on slow_query =
log but could
managed to do so. ( typed : log-slow-queries in my.cnf and restarted but =
the mysql deamon didn't start)
What do you think are Key_read_requests and Key_write_requests =
too big? What can be done here.
Thanks for help.
Artur
My.cnf:
[mysqld]
port =3D 3306
socket =3D /tmp/mysql.sock
skip-locking
#set-variable =3D key_buffer=3D16M
set-variable =3D max_allowed_packet=3D1M
set-variable =3D thread_stack=3D128K
set-variable =3D max_connections=3D300
set-variable =3D wait_timeout=3D100
# Start logging
log
#log-slow-queries=3Dslow.log
#log-slow-queries
[mysqldump]
quick
set-variable =3D max_allowed_packet=3D16M
[mysql]
no-auto-rehash
[isamchk]
#set-variable =3D key_buffer=3D16M
I'm learning mysql optimization at the moment and would like
to ask some questions:
We are having 10000 views on our server (Linux, 128MB ram)
and site is too slow.=20
Look at this status results
| Aborted_clients | 3 |
| Aborted_connects | 0 |
| Created_tmp_tables | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 2 |
| Handler_delete | 46 |
| Handler_read_first | 30 |
| Handler_read_key | 26921 |
| Handler_read_next | 17952309 |
| Handler_read_rnd | 1248821 |
| Handler_update | 14612053 |
| Handler_write | 2873 |
| Key_blocks_used | 640 |
| Key_read_requests | 44218668 |
| Key_reads | 570 |
| Key_write_requests | 29225094 |
| Key_writes | 8383 |
| Max_used_connections | 50 |
| Not_flushed_key_blocks | 1 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 63 |
| Open_files | 90 |
| Open_streams | 1 |
| Opened_tables | 344 |
| Questions | 62611 |
| Running_threads | 14 |
| Slow_queries | 271 |
| Uptime | 66210 |
There's deffinitly tooo many slow_queries. I tried to turn on slow_query =
log but could
managed to do so. ( typed : log-slow-queries in my.cnf and restarted but =
the mysql deamon didn't start)
What do you think are Key_read_requests and Key_write_requests =
too big? What can be done here.
Thanks for help.
Artur
My.cnf:
[mysqld]
port =3D 3306
socket =3D /tmp/mysql.sock
skip-locking
#set-variable =3D key_buffer=3D16M
set-variable =3D max_allowed_packet=3D1M
set-variable =3D thread_stack=3D128K
set-variable =3D max_connections=3D300
set-variable =3D wait_timeout=3D100
# Start logging
log
#log-slow-queries=3Dslow.log
#log-slow-queries
[mysqldump]
quick
set-variable =3D max_allowed_packet=3D16M
[mysql]
no-auto-rehash
[isamchk]
#set-variable =3D key_buffer=3D16M