PDA

View Full Version : MySQL 5.0 Upgrade


orban
Wed 23rd Aug '06, 9:50am
1. dedicated

2.
cpu speed/type single or dual cpus): dual 2.8 xeon
how much memory installed: 2048
hard drive type/configuration: 2 x 73GB SCSI
linux distributor or windows version: debian stable
apache/IIS version: lighttpd latest
PHP version: php 5.1.latest
MySQL version: mysql 5.0.latest

3. no innodb

4.
./configure \
--prefix=/usr \
--exec-prefix=/usr \
--libexecdir=/usr/sbin \
--datadir=/usr/share \
--sysconfdir=/etc/mysql \
--localstatedir=/var/lib/mysql \
--includedir=/usr/include \
--infodir=/usr/share/info \
--mandir=/usr/share/man \
--enable-shared \
--enable-static \
--enable-thread-safe-client \
--without-debug \
--with-unix-socket-path=/var/run/mysqld/mysqld.sock \
--with-mysqld-user=mysql \
--with-embedded-server \
--without-docs \
--without-bench \
--with-extra-charsets=all \
--with-vio \
--with-charset=latin1 \
--with-collation=latin1_swedish_ci \
--with-extra-charsets=all
5.
top - 07:45:11 up 9 days, 2:03, 1 user, load average: 3.27, 3.46, 3.50
Tasks: 141 total, 2 running, 139 sleeping, 0 stopped, 0 zombie
Cpu(s): 46.1% us, 12.1% sy, 0.0% ni, 37.9% id, 2.6% wa, 0.2% hi, 1.2% si
Mem: 2076308k total, 2061616k used, 14692k free, 16088k buffers
Swap: 4883752k total, 67144k used, 4816608k free, 956880k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
27126 nobody 16 0 86032 44m 74m S 14.9 2.2 19:31.29 php
7208 nobody 15 0 86144 40m 74m S 13.3 2.0 3:21.28 php
5249 nobody 17 0 86164 42m 74m S 12.6 2.1 9:57.90 php
26912 nobody 16 0 86176 43m 74m S 9.9 2.1 19:22.39 php
13672 nobody 15 0 20520 19m 1932 S 9.3 0.9 422:47.17 lighttpd
5210 nobody 15 0 86140 43m 74m S 9.0 2.2 10:46.82 php
7134 nobody 15 0 85556 37m 74m S 4.6 1.8 3:31.77 php
5208 nobody 17 0 85940 42m 74m S 4.0 2.1 10:23.33 php
27090 nobody 16 0 86208 44m 74m S 2.7 2.2 19:15.65 php
5228 nobody 17 0 86164 45m 74m S 2.7 2.2 10:23.60 php
5229 nobody 16 0 85912 41m 74m S 2.7 2.0 10:10.99 php
7171 nobody 16 0 85560 38m 74m S 2.7 1.9 3:15.73 php
7174 nobody 16 0 85020 37m 74m S 2.7 1.8 3:26.66 php
28232 nobody 16 0 85976 40m 74m S 2.3 2.0 12:58.55 php
7177 nobody 16 0 84980 36m 74m S 2.3 1.8 3:32.83 php
7191 nobody 15 0 85772 36m 74m S 2.3 1.8 3:27.17 php
26986 nobody 16 0 85900 43m 74m S 2.0 2.1 19:48.02 php
6.
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock

[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
open_files_limit = 8192

[mysqld]
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
skip-locking
skip-innodb
thread_stack = 128K
max_connections = 600
key_buffer = 16M
myisam_sort_buffer_size = 128M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1800
thread_cache_size = 384
wait_timeout = 3600
connect_timeout = 10
tmp_table_size = 256M
max_allowed_packet = 64M
max_connect_errors = 10
thread_concurrency = 2
query_cache_limit = 1M
query_cache_size = 256M
query_cache_type = 1
query_prealloc_size = 16384
query_alloc_block_size = 16384
ft_min_word_len = 4

[mysqldump]
quick
quote-names
max_allowed_packet = 16M

[mysql]

[isamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M

[mysqlhotcopy]
interactive-timeout 7.
+---------------------------------+-----------------------------+
| Variable_name | Value |
+---------------------------------+-----------------------------+
| auto_increment_increment | 1 |
| auto_increment_offset | 1 |
| automatic_sp_privileges | ON |
| back_log | 50 |
| basedir | /usr/ |
| binlog_cache_size | 32768 |
| bulk_insert_buffer_size | 8388608 |
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | latin1 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
| collation_connection | latin1_swedish_ci |
| collation_database | latin1_swedish_ci |
| collation_server | latin1_swedish_ci |
| completion_type | 0 |
| concurrent_insert | 1 |
| connect_timeout | 10 |
| datadir | /var/lib/mysql/ |
| date_format | %Y-%m-%d |
| datetime_format | %Y-%m-%d %H:%i:%s |
| default_week_format | 0 |
| delay_key_write | ON |
| delayed_insert_limit | 100 |
| delayed_insert_timeout | 300 |
| delayed_queue_size | 1000 |
| div_precision_increment | 4 |
| engine_condition_pushdown | OFF |
| expire_logs_days | 0 |
| flush | OFF |
| flush_time | 0 |
| ft_boolean_syntax | + -><()~*:""&| |
| ft_max_word_len | 84 |
| ft_min_word_len | 4 |
| ft_query_expansion_limit | 20 |
| ft_stopword_file | (built-in) |
| group_concat_max_len | 1024 |
| have_archive | NO |
| have_bdb | NO |
| have_blackhole_engine | NO |
| have_compress | YES |
| have_crypt | YES |
| have_csv | NO |
| have_dynamic_loading | YES |
| have_example_engine | NO |
| have_federated_engine | NO |
| have_geometry | YES |
| have_innodb | DISABLED |
| have_isam | NO |
| have_ndbcluster | NO |
| have_merge_engine | YES |
| have_openssl | NO |
| have_query_cache | YES |
| have_raid | NO |
| have_rtree_keys | YES |
| have_symlink | YES |
| init_connect | |
| init_file | |
| init_slave | |
| innodb_additional_mem_pool_size | 1048576 |
| innodb_autoextend_increment | 8 |
| innodb_buffer_pool_awe_mem_mb | 0 |
| innodb_buffer_pool_size | 8388608 |
| innodb_checksums | ON |
| innodb_commit_concurrency | 0 |
| innodb_concurrency_tickets | 500 |
| innodb_data_file_path | |
| innodb_data_home_dir | |
| innodb_doublewrite | ON |
| innodb_fast_shutdown | 1 |
| innodb_file_io_threads | 4 |
| innodb_file_per_table | OFF |
| innodb_flush_log_at_trx_commit | 1 |
| innodb_flush_method | |
| innodb_force_recovery | 0 |
| innodb_lock_wait_timeout | 50 |
| innodb_locks_unsafe_for_binlog | OFF |
| innodb_log_arch_dir | |
| innodb_log_archive | OFF |
| innodb_log_buffer_size | 1048576 |
| innodb_log_file_size | 5242880 |
| innodb_log_files_in_group | 2 |
| innodb_log_group_home_dir | |
| innodb_max_dirty_pages_pct | 90 |
| innodb_max_purge_lag | 0 |
| innodb_mirrored_log_groups | 1 |
| innodb_open_files | 300 |
| innodb_support_xa | ON |
| innodb_sync_spin_loops | 20 |
| innodb_table_locks | ON |
| innodb_thread_concurrency | 8 |
| innodb_thread_sleep_delay | 10000 |
| interactive_timeout | 28800 |
| join_buffer_size | 1044480 |
| key_buffer_size | 16777216 |
| key_cache_age_threshold | 300 |
| key_cache_block_size | 1024 |
| key_cache_division_limit | 100 |
| language | /usr/share/mysql/english/ |
| large_files_support | ON |
| large_page_size | 0 |
| large_pages | OFF |
| license | GPL |
| local_infile | ON |
| locked_in_memory | OFF |
| log | OFF |
| log_bin | OFF |
| log_bin_trust_function_creators | OFF |
| log_error | |
| log_queries_not_using_indexes | OFF |
| log_slave_updates | OFF |
| log_slow_queries | OFF |
| log_warnings | 1 |
| long_query_time | 10 |
| low_priority_updates | OFF |
| lower_case_file_system | OFF |
| lower_case_table_names | 0 |
| max_allowed_packet | 67107840 |
| max_binlog_cache_size | 4294967295 |
| max_binlog_size | 1073741824 |
| max_connect_errors | 10 |
| max_connections | 600 |
| max_delayed_threads | 20 |
| max_error_count | 64 |
| max_heap_table_size | 16777216 |
| max_insert_delayed_threads | 20 |
| max_join_size | 4294967295 |
| max_length_for_sort_data | 1024 |
| max_prepared_stmt_count | 16382 |
| max_relay_log_size | 0 |
| max_seeks_for_key | 4294967295 |
| max_sort_length | 1024 |
| max_sp_recursion_depth | 0 |
| max_tmp_tables | 32 |
| max_user_connections | 0 |
| max_write_lock_count | 4294967295 |
| multi_range_count | 256 |
| myisam_data_pointer_size | 6 |
| myisam_max_sort_file_size | 2147483647 |
| myisam_recover_options | OFF |
| myisam_repair_threads | 1 |
| myisam_sort_buffer_size | 134217728 |
| myisam_stats_method | nulls_unequal |
| net_buffer_length | 16384 |
| net_read_timeout | 30 |
| net_retry_count | 10 |
| net_write_timeout | 60 |
| new | OFF |
| old_passwords | OFF |
| open_files_limit | 4210 |
| optimizer_prune_level | 1 |
| optimizer_search_depth | 62 |
| pid_file | /var/run/mysqld/mysqld.pid |
| port | 3306 |
| preload_buffer_size | 32768 |
| prepared_stmt_count | 0 |
| protocol_version | 10 |
| query_alloc_block_size | 16384 |
| query_cache_limit | 1048576 |
| query_cache_min_res_unit | 4096 |
| query_cache_size | 268435456 |
| query_cache_type | ON |
| query_cache_wlock_invalidate | OFF |
| query_prealloc_size | 16384 |
| range_alloc_block_size | 2048 |
| read_buffer_size | 1044480 |
| read_only | OFF |
| read_rnd_buffer_size | 262144 |
| relay_log_purge | ON |
| relay_log_space_limit | 0 |
| rpl_recovery_rank | 0 |
| secure_auth | OFF |
| server_id | 0 |
| skip_external_locking | ON |
| skip_networking | OFF |
| skip_show_database | OFF |
| slave_compressed_protocol | OFF |
| slave_load_tmpdir | /tmp/ |
| slave_net_timeout | 3600 |
| slave_skip_errors | OFF |
| slave_transaction_retries | 10 |
| slow_launch_time | 2 |
| socket | /var/run/mysqld/mysqld.sock |
| sort_buffer_size | 2097144 |
| sql_big_selects | ON |
| sql_mode | |
| sql_notes | ON |
| sql_warnings | OFF |
| ssl_ca | |
| ssl_capath | |
| ssl_cert | |
| ssl_cipher | |
| ssl_key | |
| storage_engine | MyISAM |
| sync_binlog | 0 |
| sync_frm | ON |
| system_time_zone | CDT |
| table_cache | 1800 |
| table_lock_wait_timeout | 50 |
| table_type | MyISAM |
| thread_cache_size | 384 |
| thread_stack | 131072 |
| time_format | %H:%i:%s |
| time_zone | SYSTEM |
| timed_mutexes | OFF |
| tmp_table_size | 268435456 |
| tmpdir | /tmp |
| transaction_alloc_block_size | 8192 |
| transaction_prealloc_size | 4096 |
| tx_isolation | REPEATABLE-READ |
| updatable_views_with_limit | YES |
| version | 5.0.24 |
| version_comment | Source distribution |
| version_compile_machine | i686 |
| version_compile_os | pc-linux-gnu |
| wait_timeout | 3600 |
+---------------------------------+-----------------------------+
+-----------------------------------+------------+
| Variable_name | Value |
+-----------------------------------+------------+
| Aborted_clients | 619 |
| Aborted_connects | 0 |
| Binlog_cache_disk_use | 0 |
| Binlog_cache_use | 0 |
| Bytes_received | 1660828368 |
| Bytes_sent | 3109467072 |
| Com_admin_commands | 0 |
| Com_alter_db | 0 |
| Com_alter_table | 6 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 64891 |
| Com_change_db | 3228284 |
| Com_change_master | 0 |
| Com_check | 0 |
| Com_checksum | 0 |
| Com_commit | 64502 |
| Com_create_db | 0 |
| Com_create_function | 0 |
| Com_create_index | 1 |
| Com_create_table | 3 |
| Com_dealloc_sql | 0 |
| Com_delete | 121172 |
| Com_delete_multi | 0 |
| Com_do | 0 |
| Com_drop_db | 0 |
| Com_drop_function | 0 |
| Com_drop_index | 1 |
| Com_drop_table | 3 |
| Com_drop_user | 0 |
| Com_execute_sql | 0 |
| Com_flush | 0 |
| Com_grant | 0 |
| Com_ha_close | 0 |
| Com_ha_open | 0 |
| Com_ha_read | 0 |
| Com_help | 0 |
| Com_insert | 2249620 |
| Com_insert_select | 1 |
| Com_kill | 0 |
| Com_load | 0 |
| Com_load_master_data | 0 |
| Com_load_master_table | 0 |
| Com_lock_tables | 3 |
| Com_optimize | 0 |
| Com_preload_keys | 0 |
| Com_prepare_sql | 0 |
| Com_purge | 0 |
| Com_purge_before_date | 0 |
| Com_rename_table | 0 |
| Com_repair | 1 |
| Com_replace | 163382 |
| Com_replace_select | 0 |
| Com_reset | 0 |
| Com_restore_table | 0 |
| Com_revoke | 0 |
| Com_revoke_all | 0 |
| Com_rollback | 0 |
| Com_savepoint | 0 |
| Com_select | 13919989 |
| Com_set_option | 1773636 |
| Com_show_binlog_events | 0 |
| Com_show_binlogs | 0 |
| Com_show_charsets | 0 |
| Com_show_collations | 0 |
| Com_show_column_types | 0 |
| Com_show_create_db | 0 |
| Com_show_create_table | 1 |
| Com_show_databases | 3 |
| Com_show_errors | 0 |
| Com_show_fields | 118 |
| Com_show_grants | 0 |
| Com_show_innodb_status | 0 |
| Com_show_keys | 18180 |
| Com_show_logs | 0 |
| Com_show_master_status | 0 |
| Com_show_ndb_status | 0 |
| Com_show_new_master | 0 |
| Com_show_open_tables | 0 |
| Com_show_privileges | 0 |
| Com_show_processlist | 0 |
| Com_show_slave_hosts | 0 |
| Com_show_slave_status | 0 |
| Com_show_status | 40719 |
| Com_show_storage_engines | 0 |
| Com_show_tables | 4 |
| Com_show_triggers | 0 |
| Com_show_variables | 196 |
| Com_show_warnings | 0 |
| Com_slave_start | 0 |
| Com_slave_stop | 0 |
| Com_stmt_close | 0 |
| Com_stmt_execute | 0 |
| Com_stmt_fetch | 0 |
| Com_stmt_prepare | 0 |
| Com_stmt_reset | 0 |
| Com_stmt_send_long_data | 0 |
| Com_truncate | 852 |
| Com_unlock_tables | 3 |
| Com_update | 4115013 |
| Com_update_multi | 0 |
| Com_xa_commit | 0 |
| Com_xa_end | 0 |
| Com_xa_prepare | 0 |
| Com_xa_recover | 0 |
| Com_xa_rollback | 0 |
| Com_xa_start | 0 |
| Compression | OFF |
| Connections | 4961205 |
| Created_tmp_disk_tables | 266147 |
| Created_tmp_files | 2462 |
| Created_tmp_tables | 1792343 |
| Delayed_errors | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Flush_commands | 1 |
| Handler_commit | 0 |
| Handler_delete | 548972 |
| Handler_discover | 0 |
| Handler_prepare | 0 |
| Handler_read_first | 3200080 |
| Handler_read_key | 1016425768 |
| Handler_read_next | 936837779 |
| Handler_read_prev | 10790206 |
| Handler_read_rnd | 783968828 |
| Handler_read_rnd_next | 1600140170 |
| Handler_rollback | 0 |
| Handler_savepoint | 0 |
| Handler_savepoint_rollback | 0 |
| Handler_update | 7560907 |
| Handler_write | 802133712 |
| Innodb_buffer_pool_pages_data | 0 |
| Innodb_buffer_pool_pages_dirty | 0 |
| Innodb_buffer_pool_pages_flushed | 0 |
| Innodb_buffer_pool_pages_free | 0 |
| Innodb_buffer_pool_pages_latched | 0 |
| Innodb_buffer_pool_pages_misc | 0 |
| Innodb_buffer_pool_pages_total | 0 |
| Innodb_buffer_pool_read_ahead_rnd | 0 |
| Innodb_buffer_pool_read_ahead_seq | 0 |
| Innodb_buffer_pool_read_requests | 0 |
| Innodb_buffer_pool_reads | 0 |
| Innodb_buffer_pool_wait_free | 0 |
| Innodb_buffer_pool_write_requests | 0 |
| Innodb_data_fsyncs | 0 |
| Innodb_data_pending_fsyncs | 0 |
| Innodb_data_pending_reads | 0 |
| Innodb_data_pending_writes | 0 |
| Innodb_data_read | 0 |
| Innodb_data_reads | 0 |
| Innodb_data_writes | 0 |
| Innodb_data_written | 0 |
| Innodb_dblwr_pages_written | 0 |
| Innodb_dblwr_writes | 0 |
| Innodb_log_waits | 0 |
| Innodb_log_write_requests | 0 |
| Innodb_log_writes | 0 |
| Innodb_os_log_fsyncs | 0 |
| Innodb_os_log_pending_fsyncs | 0 |
| Innodb_os_log_pending_writes | 0 |
| Innodb_os_log_written | 0 |
| Innodb_page_size | 0 |
| Innodb_pages_created | 0 |
| Innodb_pages_read | 0 |
| Innodb_pages_written | 0 |
| Innodb_row_lock_current_waits | 0 |
| Innodb_row_lock_time | 0 |
| Innodb_row_lock_time_avg | 0 |
| Innodb_row_lock_time_max | 0 |
| Innodb_row_lock_waits | 0 |
| Innodb_rows_deleted | 0 |
| Innodb_rows_inserted | 0 |
| Innodb_rows_read | 0 |
| Innodb_rows_updated | 0 |
| Key_blocks_not_flushed | 0 |
| Key_blocks_unused | 0 |
| Key_blocks_used | 14497 |
| Key_read_requests | 3532668071 |
| Key_reads | 13424097 |
| Key_write_requests | 48983190 |
| Key_writes | 19054936 |
| Last_query_cost | 0.000000 |
| Max_used_connections | 77 |
| Not_flushed_delayed_rows | 0 |
| Open_files | 989 |
| Open_streams | 0 |
| Open_tables | 898 |
| Opened_tables | 2660 |
| Qcache_free_blocks | 15854 |
| Qcache_free_memory | 132788344 |
| Qcache_hits | 14591878 |
| Qcache_inserts | 13608160 |
| Qcache_lowmem_prunes | 1241268 |
| Qcache_not_cached | 370930 |
| Qcache_queries_in_cache | 47468 |
| Qcache_total_blocks | 111201 |
| Questions | 45313361 |
| Rpl_status | NULL |
| Select_full_join | 717 |
| Select_full_range_join | 0 |
| Select_range | 2926502 |
| Select_range_check | 0 |
| Select_scan | 2774876 |
| Slave_open_temp_tables | 0 |
| Slave_retried_transactions | 0 |
| Slave_running | OFF |
| Slow_launch_threads | 0 |
| Slow_queries | 1538 |
| Sort_merge_passes | 1236 |
| Sort_range | 2439363 |
| Sort_rows | 1031316243 |
| Sort_scan | 1658848 |
| Table_locks_immediate | 38928281 |
| Table_locks_waited | 280070 |
| Tc_log_max_pages_used | 0 |
| Tc_log_page_size | 0 |
| Tc_log_page_waits | 0 |
| Threads_cached | 72 |
| Threads_connected | 5 |
| Threads_created | 77 |
| Threads_running | 1 |
| Uptime | 766231 |
+-----------------------------------+------------+
Uptime: 766231 Threads: 5 Questions: 45313362 Slow queries: 1538 Opens: 2660 Flush tables: 1 Open tables: 898 Queries per second avg: 59.138
mysqladmin Ver 8.41 Distrib 5.0.24, for pc-linux-gnu on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version 5.0.24
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/run/mysqld/mysqld.sock
Uptime: 8 days 20 hours 50 min 31 sec
Threads: 5 Questions: 45313362 Slow queries: 1538 Opens: 2660 Flush tables: 1 Open tables: 898 Queries per second avg: 59.138
8. forum, frontpage, seach page (only a 16mb database) but tons of hits, but nothing compared to the forums anyway

9.

average maybe 800, between 500 and 1200 right now, max was 2000.
timeout is 1200, because some users were complaining about being logged off...while typing large posts.
Threads: 44,733, Posts: 1,313,021, Members: 14,385, Active Members: 5,263

10. Can make one if you need in PM...

11. Need lighttpd.conf?

12. 3.6.0 Gold

13. All log files are fine (well logging is turned off basically).

14. Post output from these 3 commands

uname -a: Linux XXXXXXXXXXX 2.6.8-2-686-smp #1 SMP Tue Aug 16 12:08:30 UTC 2005 i686 GNU/Linux

ulimit -aH:
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited

cat /proc/cpuinfo:
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Xeon(TM) CPU 2.80GHz
stepping : 9
cpu MHz : 2791.072
cache size : 512 KB
physical id : 0
siblings : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
bogomips : 5521.40

processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Xeon(TM) CPU 2.80GHz
stepping : 9
cpu MHz : 2791.072
cache size : 512 KB
physical id : 0
siblings : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
bogomips : 5570.56

processor : 2
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Xeon(TM) CPU 2.80GHz
stepping : 9
cpu MHz : 2791.072
cache size : 512 KB
physical id : 3
siblings : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
bogomips : 5570.56

processor : 3
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Xeon(TM) CPU 2.80GHz
stepping : 9
cpu MHz : 2791.072
cache size : 512 KB
physical id : 3
siblings : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
bogomips : 5570.56

orban
Mon 28th Aug '06, 2:04pm
Bump?

eva2000
Wed 30th Aug '06, 1:17am
Unfortunately i have no experience with lighttpd and whether that is the cause for your consistently high cpu loads but try the following

Edit /etc/my.cnf and place the following mysql server settings in /etc/my.cnf and restart mysql server afterwards


[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock

[mysqld]
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
back_log = 75
skip-innodb
max_connections = 500
key_buffer = 64M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1800
thread_cache_size = 384
wait_timeout = 35
connect_timeout = 10
tmp_table_size = 128M
max_heap_table_size = 64M
max_allowed_packet = 64M
max_connect_errors = 10
read_rnd_buffer_size = 524288
bulk_insert_buffer_size = 8M
query_cache_limit = 4M
query_cache_size = 96M
query_cache_type = 1
query_prealloc_size = 65536
query_alloc_block_size = 131072
default-storage-engine = MyISAM
ft_min_word_len = 4

[mysqld_safe]
nice = -5
open_files_limit = 8192

[mysqldump]
quick
max_allowed_packet = 16M

[myisamchk]
ft_min_word_len = 4
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M

orban
Wed 30th Aug '06, 8:52am
Well yeah I was mainly looking for MySQL optimizations since the load went up after upgrade to 5.0 from 4.1.

Thanks I'll give it a try.

orban
Wed 30th Aug '06, 4:55pm
Load seems to be a tad lower but still nowhere where it was with MySQl 4.1.

Also getting a handful "MySQL server has gone away" per hour now.

orban
Wed 30th Aug '06, 5:13pm
MySQL 5.0.24 uptime 0 8:17:16 Wed Aug 30 15:12:01 2006

__ Key __________________________________________________ _______________
Buffer usage 56.63M of 64.00M %Used: 88.49
Write ratio 0.35
Read ratio 0.00

__ Questions __________________________________________________ _________
Total 2.82M 94.63/s
DMS 1.20M 40.15/s %Total: 42.42
QC Hits 971.03k 32.55/s 34.39
Com_ 332.50k 11.14/s 11.78
COM_QUIT 322.10k 10.80/s 11.41
+Unknown 1 0.00/s 0.00
Slow 39 0.00/s 0.00 %DMS: 0.00
DMS 1.20M 40.15/s 42.42
SELECT 833.57k 27.94/s 29.52 69.59
UPDATE 208.36k 6.98/s 7.38 17.39
INSERT 143.94k 4.82/s 5.10 12.02
REPLACE 6.40k 0.21/s 0.23 0.53
DELETE 5.55k 0.19/s 0.20 0.46
Com_ 332.50k 11.14/s 11.78
change_db 220.24k 7.38/s 7.80
set_option 103.67k 3.47/s 3.67
begin 2.93k 0.10/s 0.10

__ SELECT and Sort __________________________________________________ ___
Scan 149.79k 5.02/s %SELECT: 17.97
Range 174.26k 5.84/s 20.91
Full join 27 0.00/s 0.00
Range check 0 0.00/s 0.00
Full rng join 0 0.00/s 0.00
Sort scan 81.76k 2.74/s
Sort range 148.61k 4.98/s
Sort mrg pass 109 0.00/s

__ Query Cache __________________________________________________ _______
Memory usage 67.36M of 96.00M %Used: 70.17
Block Fragmnt 18.08%
Hits 971.03k 32.55/s
Inserts 812.00k 27.22/s
Prunes 101.79k 3.41/s
Insrt:Prune 7.98:1 23.80/s
Hit:Insert 1.20:1

__ Table Locks __________________________________________________ _______
Waited 15.01k 0.50/s %Total: 0.65
Immediate 2.30M 77.23/s

__ Tables __________________________________________________ ____________
Open 503 of 1800 %Cache: 27.94
Opened 574 0.02/s

__ Connections __________________________________________________ _______
Max used 63 of 500 %Max: 12.60
Total 322.12k 10.80/s

__ Created Temp __________________________________________________ ______
Disk table 18.08k 0.61/s
Table 87.84k 2.94/s
File 218 0.01/s

__ Threads __________________________________________________ ___________
Running 1 of 1
Cache 62 %Hit: 99.98
Created 63 0.00/s
Slow 0 0.00/s

__ Aborted __________________________________________________ ___________
Clients 34 0.00/s
Connects 1 0.00/s

__ Bytes __________________________________________________ _____________
Sent 3.14G 105.10/s
Received 832.56M 27.90k/s
That's the mysqlreport thing of the last 8.5 hours...if helps anything...

eva2000
Thu 31st Aug '06, 10:58am
for lost connections message raise your wait_timeout value in my.cnf by increments of 30 (seconds) and save my.cnf and restart mysql and run a few days each time until you don't get those lost connection messages

orban
Thu 31st Aug '06, 11:06am
I just saw that those lost connection come from one maintenance script that takes some time to run I'll just manually fix that. The load is stil a bit highish, but I guess that's just the way it is :(