<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: MySQL Server Memory Usage</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2006/05/17/mysql-server-memory-usage/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2006/05/17/mysql-server-memory-usage/</link>
	<description>Everything about MySQL Performance</description>
	<pubDate>Mon, 13 Oct 2008 17:20:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: MySQL 服务器内存使用 at 周俭 Blog</title>
		<link>http://www.mysqlperformanceblog.com/2006/05/17/mysql-server-memory-usage/#comment-4678</link>
		<dc:creator>MySQL 服务器内存使用 at 周俭 Blog</dc:creator>
		<pubDate>Mon, 02 Oct 2006 00:17:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/05/17/mysql-server-memory-usage/#comment-4678</guid>
		<description>[...] 原文作者： Peter Zaitsev原文来源： http://www.mysqlperformanceblog.com/2006/05/17/mysql-server-memory-usage译者：叶金荣（Email:），转载请注明译者和出处，并且不能用于商业用途，违者必究。 [...]</description>
		<content:encoded><![CDATA[<p>[...] 原文作者： Peter Zaitsev原文来源： <a href="http://www.mysqlperformanceblog.com/2006/05/17/mysql-server-memory-usage" rel="nofollow">http://www.mysqlperformanceblog.com/2006/05/17/mysql-server-memory-usage</a>译者：叶金荣（Email:），转载请注明译者和出处，并且不能用于商业用途，违者必究。 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2006/05/17/mysql-server-memory-usage/#comment-2149</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Fri, 01 Sep 2006 16:55:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/05/17/mysql-server-memory-usage/#comment-2149</guid>
		<description>Marcus, 

I will reply you, providing as much of free help as I can (I guess you know we also provide commercial consulting services) but please could you post your message to forums instead:

http://forum.mysqlperformanceblog.com/

Thank you.</description>
		<content:encoded><![CDATA[<p>Marcus, </p>
<p>I will reply you, providing as much of free help as I can (I guess you know we also provide commercial consulting services) but please could you post your message to forums instead:</p>
<p><a href="http://forum.mysqlperformanceblog.com/" rel="nofollow">http://forum.mysqlperformanceblog.com/</a></p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcus Herou</title>
		<link>http://www.mysqlperformanceblog.com/2006/05/17/mysql-server-memory-usage/#comment-2148</link>
		<dc:creator>Marcus Herou</dc:creator>
		<pubDate>Fri, 01 Sep 2006 16:46:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/05/17/mysql-server-memory-usage/#comment-2148</guid>
		<description>Hi.

We have a really fantastics dating site serving 8000 logged in users. However the service goes down too often to call it stable. We have a montoring tool that states that we often hit the "max_connections" threshold (650) connections. 
Cpu is fine (about 100% of 400% available, MPM and dual core reports 4 processors). 

We have 6Gb of physical memory available but since we run on 32 bit we cannot turn up the innodb_buffer_pool higher than 1.8G right? 2.4 kernel (cannot change to 2.6 because of internal politics). Tmp area is mounted on RAM disk.

We only have innodb in the app.

The application is designed in a way that if allowed we will have something like 1000+ db connections since every user clicks on a link, refreshes his/her browser every 10 secs or so. We cache alot but still we have db problems.

a. The thing that I really, really would like to know is howto track down where the bottleneck is... I've read Peter Z two guides but cannot really convert the gained knowledge to solve our situation.

Lesser questions but probably as well important.
b. The question really is how do you determine the memory consumption per connection in average?
This leads to  the next question
c. Can we have a limit of 600 connections when every connection consumes X mb. If the answer to 'b' is 2mb then the total amount of memory would be something like 1800 + 2*600 = 3G right? To much to handle for 32 bit?

Some stats at writing time (18:37 friday) System copes fine with these figures.
Queries/sec: 265
Traffic: 1Mb/sec
Connections:259

'Aborted_clients', '267108'
'Aborted_connects', '25997'
'Binlog_cache_disk_use', '145'
'Binlog_cache_use', '9638599'
'Bytes_received', '2671219831'
'Bytes_sent', '2416986544'
'Com_admin_commands', '76'
'Com_alter_db', '0'
'Com_alter_table', '7'
'Com_analyze', '0'
'Com_backup_table', '0'
'Com_begin', '0'
'Com_change_db', '155'
'Com_change_master', '0'
'Com_check', '0'
'Com_checksum', '0'
'Com_commit', '9558970'
'Com_create_db', '0'
'Com_create_function', '0'
'Com_create_index', '0'
'Com_create_table', '31'
'Com_dealloc_sql', '0'
'Com_delete', '348788'
'Com_delete_multi', '1'
'Com_do', '0'
'Com_drop_db', '0'
'Com_drop_function', '0'
'Com_drop_index', '0'
'Com_drop_table', '0'
'Com_drop_user', '0'
'Com_execute_sql', '0'
'Com_flush', '108'
'Com_grant', '0'
'Com_ha_close', '0'
'Com_ha_open', '0'
'Com_ha_read', '0'
'Com_help', '0'
'Com_insert', '17889656'
'Com_insert_select', '11'
'Com_kill', '47'
'Com_load', '0'
'Com_load_master_data', '0'
'Com_load_master_table', '0'
'Com_lock_tables', '102'
'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', '0'
'Com_replace', '20801587'
'Com_replace_select', '0'
'Com_reset', '0'
'Com_restore_table', '0'
'Com_revoke', '0'
'Com_revoke_all', '0'
'Com_rollback', '4666272'
'Com_savepoint', '0'
'Com_select', '378247551'
'Com_set_option', '285487367'
'Com_show_binlog_events', '0'
'Com_show_binlogs', '0'
'Com_show_charsets', '2'
'Com_show_collations', '176788'
'Com_show_column_types', '0'
'Com_show_create_db', '8'
'Com_show_create_table', '2661'
'Com_show_databases', '93'
'Com_show_errors', '0'
'Com_show_fields', '4260'
'Com_show_grants', '0'
'Com_show_innodb_status', '167091'
'Com_show_keys', '136'
'Com_show_logs', '0'
'Com_show_master_status', '105'
'Com_show_ndb_status', '0'
'Com_show_new_master', '0'
'Com_show_open_tables', '0'
'Com_show_privileges', '0'
'Com_show_processlist', '20'
'Com_show_slave_hosts', '61'
'Com_show_slave_status', '13834'
'Com_show_status', '194766'
'Com_show_storage_engines', '0'
'Com_show_tables', '2842'
'Com_show_variables', '176825'
'Com_show_warnings', '8'
'Com_slave_start', '0'
'Com_slave_stop', '0'
'Com_stmt_close', '304204263'
'Com_stmt_execute', '304205150'
'Com_stmt_prepare', '410680831'
'Com_stmt_reset', '0'
'Com_stmt_send_long_data', '0'
'Com_truncate', '0'
'Com_unlock_tables', '102'
'Com_update', '15146253'
'Com_update_multi', '0'
'Connections', '263413'
'Created_tmp_disk_tables', '0'
'Created_tmp_files', '4001'
'Created_tmp_tables', '669137'
'Delayed_errors', '0'
'Delayed_insert_threads', '0'
'Delayed_writes', '0'
'Flush_commands', '5'
'Handler_commit', '19092941'
'Handler_delete', '0'
'Handler_discover', '0'
'Handler_read_first', '1100773'
'Handler_read_key', '2491307870'
'Handler_read_next', '1266206297'
'Handler_read_prev', '0'
'Handler_read_rnd', '234159075'
'Handler_read_rnd_next', '2358572961'
'Handler_rollback', '4947643'
'Handler_update', '12524'
'Handler_write', '292923929'
'Key_blocks_not_flushed', '0'
'Key_blocks_unused', '28987'
'Key_blocks_used', '1332'
'Key_read_requests', '1552507'
'Key_reads', '1654'
'Key_write_requests', '114303'
'Key_writes', '1346'
'Max_used_connections', '651'
'Not_flushed_delayed_rows', '0'
'Open_files', '95'
'Open_streams', '0'
'Open_tables', '512'
'Opened_tables', '183240'
'Qcache_free_blocks', '136'
'Qcache_free_memory', '10272736'
'Qcache_hits', '14774371'
'Qcache_inserts', '83902401'
'Qcache_lowmem_prunes', '4314'
'Qcache_not_cached', '294363493'
'Qcache_queries_in_cache', '177'
'Qcache_total_blocks', '498'
'Questions', '1462755007'
'Rpl_status', 'NULL'
'Select_full_join', '0'
'Select_full_range_join', '0'
'Select_range', '5683551'
'Select_range_check', '0'
'Select_scan', '1104831'
'Slave_open_temp_tables', '0'
'Slave_retried_transactions', '0'
'Slave_running', 'OFF'
'Slow_launch_threads', '0'
'Slow_queries', '27405'
'Sort_merge_passes', '376'
'Sort_range', '56479689'
'Sort_rows', '1344092495'
'Sort_scan', '935242'
'Table_locks_immediate', '895966639'
'Table_locks_waited', '20096'
'Threads_cached', '0'
'Threads_connected', '260'
'Threads_created', '124272'
'Threads_running', '3'
'Uptime', '4433556'

# top
 18:38:40  up 175 days,  2:56,  1 user,  load average: 0.79, 1.00, 0.95
328 processes: 326 sleeping, 2 running, 0 zombie, 0 stopped
CPU states:  cpu    user    nice  system    irq  softirq  iowait    idle
           total   15.0%    0.0%    9.5%   0.0%     0.3%    6.5%   68.4%
           cpu00   22.1%    0.0%   11.1%   0.1%     1.1%    6.1%   59.1%
           cpu01   14.9%    0.0%    7.5%   0.0%     0.0%    5.9%   71.5%
           cpu02   10.5%    0.0%   12.5%   0.0%     0.1%    7.1%   69.5%
           cpu03   12.7%    0.0%    6.7%   0.0%     0.0%    6.7%   73.7%
Mem:  5907484k av, 5889348k used,   18136k free,       0k shrd,   34132k buff
                   4607808k actv,  882264k in_d,   96252k in_c
Swap: 4194224k av,  553604k used, 3640620k free                 3352196k cached

#iostat 5 2

avg-cpu:  %user   %nice    %sys %iowait   %idle
          20.49    0.00    6.29   20.80   52.41

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
cciss/c1d0       39.88       218.38        89.96 3304016450 1360995328
cciss/c1d0p1     39.88       218.38        89.96 3304016194 1360995328
cciss/c1d1       66.15       227.50       255.83 3441930690 3870514728
cciss/c1d1p1     66.15       227.50       255.83 3441930434 3870514728
cciss/c0d0        0.86         3.52        11.26   53198730  170422784
cciss/c0d0p1      0.27         0.48         4.77    7251314   72197656
cciss/c0d0p2      0.01         0.06         0.10     858968    1573160
cciss/c0d0p3      0.00         0.00         0.00        168          0
cciss/c0d0p5      0.12         0.11         1.14    1650506   17248664
cciss/c0d0p6      0.27         1.95         2.77   29569906   41860440
cciss/c0d0p7      0.11         0.38         2.16    5719090   32723824
cciss/c0d0p8      0.08         0.54         0.32    8148218    4819040
cciss/c0d0p9      0.00         0.00         0.00        248          0

# vmstat 5 2                                                                                                                                                           
procs                      memory      swap          io     system         cpu
 r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa
 2  2 553604  18116  37400 3349360    0    0     0     0    0     0  1  0  1  1
 0  0 553604  18548  37316 3349456    0    0  1210   143 2476  3809 19  1 70 10

mysql conf:

[mysqld]
server-id=5908
port=3309
socket=/tmp/mysql.sock
pid-file=/var/run/mysql/mysql.pid
datadir=/db/disk2/mysql/data
log-bin=/var/log/mysql/log
log-slow-queries=/var/log/mysql/slow-queries.log
max_connections=650
open_files_limit=6144
max_connect_errors=10000
interactive_timeout=3600
wait_timeout=3600
key_buffer_size=32M # Only for MyISAM which isnt used.
sort_buffer_size=2M
query_cache_size=10M # Might be increased 
thread_cache_size=40
table_cache=512 # Default 64 was used before. 
skip-locking
innodb_data_home_dir=/db/disk2/data
innodb_data_file_path=ibdata1:10240M;ibdata2:10240M;ibdata3:10240M;ibdata4:10240M;ibdata5:10M:autoextend
innodb_log_group_home_dir=/var/log/mysql
innodb_log_arch_dir=/var/log/mysql
innodb_table_locks=0
innodb_buffer_pool_size=1800M # USE ALL MEMORY AVAILABLE
#innodb_log_buffer_size=8M # Lowered from 32M according to MySQL
innodb_additional_mem_pool_size=20M
innodb_file_io_threads=4
innodb_lock_wait_timeout=15 # CHANGED from 50
innodb_log_files_in_group=3
innodb_flush_log_at_trx_commit=0
#innodb_log_file_size=400M # Approx 20% of buffer pool
innodb_thread_concurrency=64 # Default is 8 wich is a way to low.


Puhhhhh!

That was alot of text. Could someone please help us out a bit!  


Regards 


//Marcus Herou</description>
		<content:encoded><![CDATA[<p>Hi.</p>
<p>We have a really fantastics dating site serving 8000 logged in users. However the service goes down too often to call it stable. We have a montoring tool that states that we often hit the &#8220;max_connections&#8221; threshold (650) connections.<br />
Cpu is fine (about 100% of 400% available, MPM and dual core reports 4 processors). </p>
<p>We have 6Gb of physical memory available but since we run on 32 bit we cannot turn up the innodb_buffer_pool higher than 1.8G right? 2.4 kernel (cannot change to 2.6 because of internal politics). Tmp area is mounted on RAM disk.</p>
<p>We only have innodb in the app.</p>
<p>The application is designed in a way that if allowed we will have something like 1000+ db connections since every user clicks on a link, refreshes his/her browser every 10 secs or so. We cache alot but still we have db problems.</p>
<p>a. The thing that I really, really would like to know is howto track down where the bottleneck is&#8230; I&#8217;ve read Peter Z two guides but cannot really convert the gained knowledge to solve our situation.</p>
<p>Lesser questions but probably as well important.<br />
b. The question really is how do you determine the memory consumption per connection in average?<br />
This leads to  the next question<br />
c. Can we have a limit of 600 connections when every connection consumes X mb. If the answer to &#8216;b&#8217; is 2mb then the total amount of memory would be something like 1800 + 2*600 = 3G right? To much to handle for 32 bit?</p>
<p>Some stats at writing time (18:37 friday) System copes fine with these figures.<br />
Queries/sec: 265<br />
Traffic: 1Mb/sec<br />
Connections:259</p>
<p>&#8216;Aborted_clients&#8217;, &#8216;267108&#8242;<br />
&#8216;Aborted_connects&#8217;, &#8216;25997&#8242;<br />
&#8216;Binlog_cache_disk_use&#8217;, &#8216;145&#8242;<br />
&#8216;Binlog_cache_use&#8217;, &#8216;9638599&#8242;<br />
&#8216;Bytes_received&#8217;, &#8216;2671219831&#8242;<br />
&#8216;Bytes_sent&#8217;, &#8216;2416986544&#8242;<br />
&#8216;Com_admin_commands&#8217;, &#8216;76&#8242;<br />
&#8216;Com_alter_db&#8217;, &#8216;0&#8242;<br />
&#8216;Com_alter_table&#8217;, &#8216;7&#8242;<br />
&#8216;Com_analyze&#8217;, &#8216;0&#8242;<br />
&#8216;Com_backup_table&#8217;, &#8216;0&#8242;<br />
&#8216;Com_begin&#8217;, &#8216;0&#8242;<br />
&#8216;Com_change_db&#8217;, &#8216;155&#8242;<br />
&#8216;Com_change_master&#8217;, &#8216;0&#8242;<br />
&#8216;Com_check&#8217;, &#8216;0&#8242;<br />
&#8216;Com_checksum&#8217;, &#8216;0&#8242;<br />
&#8216;Com_commit&#8217;, &#8216;9558970&#8242;<br />
&#8216;Com_create_db&#8217;, &#8216;0&#8242;<br />
&#8216;Com_create_function&#8217;, &#8216;0&#8242;<br />
&#8216;Com_create_index&#8217;, &#8216;0&#8242;<br />
&#8216;Com_create_table&#8217;, &#8216;31&#8242;<br />
&#8216;Com_dealloc_sql&#8217;, &#8216;0&#8242;<br />
&#8216;Com_delete&#8217;, &#8216;348788&#8242;<br />
&#8216;Com_delete_multi&#8217;, &#8216;1&#8242;<br />
&#8216;Com_do&#8217;, &#8216;0&#8242;<br />
&#8216;Com_drop_db&#8217;, &#8216;0&#8242;<br />
&#8216;Com_drop_function&#8217;, &#8216;0&#8242;<br />
&#8216;Com_drop_index&#8217;, &#8216;0&#8242;<br />
&#8216;Com_drop_table&#8217;, &#8216;0&#8242;<br />
&#8216;Com_drop_user&#8217;, &#8216;0&#8242;<br />
&#8216;Com_execute_sql&#8217;, &#8216;0&#8242;<br />
&#8216;Com_flush&#8217;, &#8216;108&#8242;<br />
&#8216;Com_grant&#8217;, &#8216;0&#8242;<br />
&#8216;Com_ha_close&#8217;, &#8216;0&#8242;<br />
&#8216;Com_ha_open&#8217;, &#8216;0&#8242;<br />
&#8216;Com_ha_read&#8217;, &#8216;0&#8242;<br />
&#8216;Com_help&#8217;, &#8216;0&#8242;<br />
&#8216;Com_insert&#8217;, &#8216;17889656&#8242;<br />
&#8216;Com_insert_select&#8217;, &#8216;11&#8242;<br />
&#8216;Com_kill&#8217;, &#8216;47&#8242;<br />
&#8216;Com_load&#8217;, &#8216;0&#8242;<br />
&#8216;Com_load_master_data&#8217;, &#8216;0&#8242;<br />
&#8216;Com_load_master_table&#8217;, &#8216;0&#8242;<br />
&#8216;Com_lock_tables&#8217;, &#8216;102&#8242;<br />
&#8216;Com_optimize&#8217;, &#8216;0&#8242;<br />
&#8216;Com_preload_keys&#8217;, &#8216;0&#8242;<br />
&#8216;Com_prepare_sql&#8217;, &#8216;0&#8242;<br />
&#8216;Com_purge&#8217;, &#8216;0&#8242;<br />
&#8216;Com_purge_before_date&#8217;, &#8216;0&#8242;<br />
&#8216;Com_rename_table&#8217;, &#8216;0&#8242;<br />
&#8216;Com_repair&#8217;, &#8216;0&#8242;<br />
&#8216;Com_replace&#8217;, &#8216;20801587&#8242;<br />
&#8216;Com_replace_select&#8217;, &#8216;0&#8242;<br />
&#8216;Com_reset&#8217;, &#8216;0&#8242;<br />
&#8216;Com_restore_table&#8217;, &#8216;0&#8242;<br />
&#8216;Com_revoke&#8217;, &#8216;0&#8242;<br />
&#8216;Com_revoke_all&#8217;, &#8216;0&#8242;<br />
&#8216;Com_rollback&#8217;, &#8216;4666272&#8242;<br />
&#8216;Com_savepoint&#8217;, &#8216;0&#8242;<br />
&#8216;Com_select&#8217;, &#8216;378247551&#8242;<br />
&#8216;Com_set_option&#8217;, &#8216;285487367&#8242;<br />
&#8216;Com_show_binlog_events&#8217;, &#8216;0&#8242;<br />
&#8216;Com_show_binlogs&#8217;, &#8216;0&#8242;<br />
&#8216;Com_show_charsets&#8217;, &#8216;2&#8242;<br />
&#8216;Com_show_collations&#8217;, &#8216;176788&#8242;<br />
&#8216;Com_show_column_types&#8217;, &#8216;0&#8242;<br />
&#8216;Com_show_create_db&#8217;, &#8216;8&#8242;<br />
&#8216;Com_show_create_table&#8217;, &#8216;2661&#8242;<br />
&#8216;Com_show_databases&#8217;, &#8216;93&#8242;<br />
&#8216;Com_show_errors&#8217;, &#8216;0&#8242;<br />
&#8216;Com_show_fields&#8217;, &#8216;4260&#8242;<br />
&#8216;Com_show_grants&#8217;, &#8216;0&#8242;<br />
&#8216;Com_show_innodb_status&#8217;, &#8216;167091&#8242;<br />
&#8216;Com_show_keys&#8217;, &#8216;136&#8242;<br />
&#8216;Com_show_logs&#8217;, &#8216;0&#8242;<br />
&#8216;Com_show_master_status&#8217;, &#8216;105&#8242;<br />
&#8216;Com_show_ndb_status&#8217;, &#8216;0&#8242;<br />
&#8216;Com_show_new_master&#8217;, &#8216;0&#8242;<br />
&#8216;Com_show_open_tables&#8217;, &#8216;0&#8242;<br />
&#8216;Com_show_privileges&#8217;, &#8216;0&#8242;<br />
&#8216;Com_show_processlist&#8217;, &#8216;20&#8242;<br />
&#8216;Com_show_slave_hosts&#8217;, &#8216;61&#8242;<br />
&#8216;Com_show_slave_status&#8217;, &#8216;13834&#8242;<br />
&#8216;Com_show_status&#8217;, &#8216;194766&#8242;<br />
&#8216;Com_show_storage_engines&#8217;, &#8216;0&#8242;<br />
&#8216;Com_show_tables&#8217;, &#8216;2842&#8242;<br />
&#8216;Com_show_variables&#8217;, &#8216;176825&#8242;<br />
&#8216;Com_show_warnings&#8217;, &#8216;8&#8242;<br />
&#8216;Com_slave_start&#8217;, &#8216;0&#8242;<br />
&#8216;Com_slave_stop&#8217;, &#8216;0&#8242;<br />
&#8216;Com_stmt_close&#8217;, &#8216;304204263&#8242;<br />
&#8216;Com_stmt_execute&#8217;, &#8216;304205150&#8242;<br />
&#8216;Com_stmt_prepare&#8217;, &#8216;410680831&#8242;<br />
&#8216;Com_stmt_reset&#8217;, &#8216;0&#8242;<br />
&#8216;Com_stmt_send_long_data&#8217;, &#8216;0&#8242;<br />
&#8216;Com_truncate&#8217;, &#8216;0&#8242;<br />
&#8216;Com_unlock_tables&#8217;, &#8216;102&#8242;<br />
&#8216;Com_update&#8217;, &#8216;15146253&#8242;<br />
&#8216;Com_update_multi&#8217;, &#8216;0&#8242;<br />
&#8216;Connections&#8217;, &#8216;263413&#8242;<br />
&#8216;Created_tmp_disk_tables&#8217;, &#8216;0&#8242;<br />
&#8216;Created_tmp_files&#8217;, &#8216;4001&#8242;<br />
&#8216;Created_tmp_tables&#8217;, &#8216;669137&#8242;<br />
&#8216;Delayed_errors&#8217;, &#8216;0&#8242;<br />
&#8216;Delayed_insert_threads&#8217;, &#8216;0&#8242;<br />
&#8216;Delayed_writes&#8217;, &#8216;0&#8242;<br />
&#8216;Flush_commands&#8217;, &#8216;5&#8242;<br />
&#8216;Handler_commit&#8217;, &#8216;19092941&#8242;<br />
&#8216;Handler_delete&#8217;, &#8216;0&#8242;<br />
&#8216;Handler_discover&#8217;, &#8216;0&#8242;<br />
&#8216;Handler_read_first&#8217;, &#8216;1100773&#8242;<br />
&#8216;Handler_read_key&#8217;, &#8216;2491307870&#8242;<br />
&#8216;Handler_read_next&#8217;, &#8216;1266206297&#8242;<br />
&#8216;Handler_read_prev&#8217;, &#8216;0&#8242;<br />
&#8216;Handler_read_rnd&#8217;, &#8216;234159075&#8242;<br />
&#8216;Handler_read_rnd_next&#8217;, &#8216;2358572961&#8242;<br />
&#8216;Handler_rollback&#8217;, &#8216;4947643&#8242;<br />
&#8216;Handler_update&#8217;, &#8216;12524&#8242;<br />
&#8216;Handler_write&#8217;, &#8216;292923929&#8242;<br />
&#8216;Key_blocks_not_flushed&#8217;, &#8216;0&#8242;<br />
&#8216;Key_blocks_unused&#8217;, &#8216;28987&#8242;<br />
&#8216;Key_blocks_used&#8217;, &#8216;1332&#8242;<br />
&#8216;Key_read_requests&#8217;, &#8216;1552507&#8242;<br />
&#8216;Key_reads&#8217;, &#8216;1654&#8242;<br />
&#8216;Key_write_requests&#8217;, &#8216;114303&#8242;<br />
&#8216;Key_writes&#8217;, &#8216;1346&#8242;<br />
&#8216;Max_used_connections&#8217;, &#8216;651&#8242;<br />
&#8216;Not_flushed_delayed_rows&#8217;, &#8216;0&#8242;<br />
&#8216;Open_files&#8217;, &#8216;95&#8242;<br />
&#8216;Open_streams&#8217;, &#8216;0&#8242;<br />
&#8216;Open_tables&#8217;, &#8216;512&#8242;<br />
&#8216;Opened_tables&#8217;, &#8216;183240&#8242;<br />
&#8216;Qcache_free_blocks&#8217;, &#8216;136&#8242;<br />
&#8216;Qcache_free_memory&#8217;, &#8216;10272736&#8242;<br />
&#8216;Qcache_hits&#8217;, &#8216;14774371&#8242;<br />
&#8216;Qcache_inserts&#8217;, &#8216;83902401&#8242;<br />
&#8216;Qcache_lowmem_prunes&#8217;, &#8216;4314&#8242;<br />
&#8216;Qcache_not_cached&#8217;, &#8216;294363493&#8242;<br />
&#8216;Qcache_queries_in_cache&#8217;, &#8216;177&#8242;<br />
&#8216;Qcache_total_blocks&#8217;, &#8216;498&#8242;<br />
&#8216;Questions&#8217;, &#8216;1462755007&#8242;<br />
&#8216;Rpl_status&#8217;, &#8216;NULL&#8217;<br />
&#8216;Select_full_join&#8217;, &#8216;0&#8242;<br />
&#8216;Select_full_range_join&#8217;, &#8216;0&#8242;<br />
&#8216;Select_range&#8217;, &#8216;5683551&#8242;<br />
&#8216;Select_range_check&#8217;, &#8216;0&#8242;<br />
&#8216;Select_scan&#8217;, &#8216;1104831&#8242;<br />
&#8216;Slave_open_temp_tables&#8217;, &#8216;0&#8242;<br />
&#8216;Slave_retried_transactions&#8217;, &#8216;0&#8242;<br />
&#8216;Slave_running&#8217;, &#8216;OFF&#8217;<br />
&#8216;Slow_launch_threads&#8217;, &#8216;0&#8242;<br />
&#8216;Slow_queries&#8217;, &#8216;27405&#8242;<br />
&#8216;Sort_merge_passes&#8217;, &#8216;376&#8242;<br />
&#8216;Sort_range&#8217;, &#8216;56479689&#8242;<br />
&#8216;Sort_rows&#8217;, &#8216;1344092495&#8242;<br />
&#8216;Sort_scan&#8217;, &#8216;935242&#8242;<br />
&#8216;Table_locks_immediate&#8217;, &#8216;895966639&#8242;<br />
&#8216;Table_locks_waited&#8217;, &#8216;20096&#8242;<br />
&#8216;Threads_cached&#8217;, &#8216;0&#8242;<br />
&#8216;Threads_connected&#8217;, &#8216;260&#8242;<br />
&#8216;Threads_created&#8217;, &#8216;124272&#8242;<br />
&#8216;Threads_running&#8217;, &#8216;3&#8242;<br />
&#8216;Uptime&#8217;, &#8216;4433556&#8242;</p>
<p># top<br />
 18:38:40  up 175 days,  2:56,  1 user,  load average: 0.79, 1.00, 0.95<br />
328 processes: 326 sleeping, 2 running, 0 zombie, 0 stopped<br />
CPU states:  cpu    user    nice  system    irq  softirq  iowait    idle<br />
           total   15.0%    0.0%    9.5%   0.0%     0.3%    6.5%   68.4%<br />
           cpu00   22.1%    0.0%   11.1%   0.1%     1.1%    6.1%   59.1%<br />
           cpu01   14.9%    0.0%    7.5%   0.0%     0.0%    5.9%   71.5%<br />
           cpu02   10.5%    0.0%   12.5%   0.0%     0.1%    7.1%   69.5%<br />
           cpu03   12.7%    0.0%    6.7%   0.0%     0.0%    6.7%   73.7%<br />
Mem:  5907484k av, 5889348k used,   18136k free,       0k shrd,   34132k buff<br />
                   4607808k actv,  882264k in_d,   96252k in_c<br />
Swap: 4194224k av,  553604k used, 3640620k free                 3352196k cached</p>
<p>#iostat 5 2</p>
<p>avg-cpu:  %user   %nice    %sys %iowait   %idle<br />
          20.49    0.00    6.29   20.80   52.41</p>
<p>Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn<br />
cciss/c1d0       39.88       218.38        89.96 3304016450 1360995328<br />
cciss/c1d0p1     39.88       218.38        89.96 3304016194 1360995328<br />
cciss/c1d1       66.15       227.50       255.83 3441930690 3870514728<br />
cciss/c1d1p1     66.15       227.50       255.83 3441930434 3870514728<br />
cciss/c0d0        0.86         3.52        11.26   53198730  170422784<br />
cciss/c0d0p1      0.27         0.48         4.77    7251314   72197656<br />
cciss/c0d0p2      0.01         0.06         0.10     858968    1573160<br />
cciss/c0d0p3      0.00         0.00         0.00        168          0<br />
cciss/c0d0p5      0.12         0.11         1.14    1650506   17248664<br />
cciss/c0d0p6      0.27         1.95         2.77   29569906   41860440<br />
cciss/c0d0p7      0.11         0.38         2.16    5719090   32723824<br />
cciss/c0d0p8      0.08         0.54         0.32    8148218    4819040<br />
cciss/c0d0p9      0.00         0.00         0.00        248          0</p>
<p># vmstat 5 2<br />
procs                      memory      swap          io     system         cpu<br />
 r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa<br />
 2  2 553604  18116  37400 3349360    0    0     0     0    0     0  1  0  1  1<br />
 0  0 553604  18548  37316 3349456    0    0  1210   143 2476  3809 19  1 70 10</p>
<p>mysql conf:</p>
<p>[mysqld]<br />
server-id=5908<br />
port=3309<br />
socket=/tmp/mysql.sock<br />
pid-file=/var/run/mysql/mysql.pid<br />
datadir=/db/disk2/mysql/data<br />
log-bin=/var/log/mysql/log<br />
log-slow-queries=/var/log/mysql/slow-queries.log<br />
max_connections=650<br />
open_files_limit=6144<br />
max_connect_errors=10000<br />
interactive_timeout=3600<br />
wait_timeout=3600<br />
key_buffer_size=32M # Only for MyISAM which isnt used.<br />
sort_buffer_size=2M<br />
query_cache_size=10M # Might be increased<br />
thread_cache_size=40<br />
table_cache=512 # Default 64 was used before.<br />
skip-locking<br />
innodb_data_home_dir=/db/disk2/data<br />
innodb_data_file_path=ibdata1:10240M;ibdata2:10240M;ibdata3:10240M;ibdata4:10240M;ibdata5:10M:autoextend<br />
innodb_log_group_home_dir=/var/log/mysql<br />
innodb_log_arch_dir=/var/log/mysql<br />
innodb_table_locks=0<br />
innodb_buffer_pool_size=1800M # USE ALL MEMORY AVAILABLE<br />
#innodb_log_buffer_size=8M # Lowered from 32M according to MySQL<br />
innodb_additional_mem_pool_size=20M<br />
innodb_file_io_threads=4<br />
innodb_lock_wait_timeout=15 # CHANGED from 50<br />
innodb_log_files_in_group=3<br />
innodb_flush_log_at_trx_commit=0<br />
#innodb_log_file_size=400M # Approx 20% of buffer pool<br />
innodb_thread_concurrency=64 # Default is 8 wich is a way to low.</p>
<p>Puhhhhh!</p>
<p>That was alot of text. Could someone please help us out a bit!  </p>
<p>Regards </p>
<p>//Marcus Herou</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2006/05/17/mysql-server-memory-usage/#comment-1999</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Fri, 25 Aug 2006 11:51:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/05/17/mysql-server-memory-usage/#comment-1999</guid>
		<description>Yes that is correct. 

Here is example - You could have such server running with max_connections=1000 and  myisam_sort_buffer_size=256M.

If it happens so all connections will start to repair tables at the same time it will need 1000*256MB = 256GB of memory. 

In practice however you would not have more than 2-3 connections doing it at the same time so you happen to be fine.</description>
		<content:encoded><![CDATA[<p>Yes that is correct. </p>
<p>Here is example - You could have such server running with max_connections=1000 and  myisam_sort_buffer_size=256M.</p>
<p>If it happens so all connections will start to repair tables at the same time it will need 1000*256MB = 256GB of memory. </p>
<p>In practice however you would not have more than 2-3 connections doing it at the same time so you happen to be fine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yejr</title>
		<link>http://www.mysqlperformanceblog.com/2006/05/17/mysql-server-memory-usage/#comment-1998</link>
		<dc:creator>yejr</dc:creator>
		<pubDate>Fri, 25 Aug 2006 11:46:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/05/17/mysql-server-memory-usage/#comment-1998</guid>
		<description>"In fact typical server with 8GB of memory will often run with maximum theoretical memory usage of 100GB or more."

Is it correct?</description>
		<content:encoded><![CDATA[<p>&#8220;In fact typical server with 8GB of memory will often run with maximum theoretical memory usage of 100GB or more.&#8221;</p>
<p>Is it correct?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vadim</title>
		<link>http://www.mysqlperformanceblog.com/2006/05/17/mysql-server-memory-usage/#comment-35</link>
		<dc:creator>Vadim</dc:creator>
		<pubDate>Thu, 18 May 2006 09:22:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/05/17/mysql-server-memory-usage/#comment-35</guid>
		<description>I want to add about InnoDB memory. InnoDB allocates additional memory for internal needs (adaptive hash index, etc) which you should take into account. My investigations show it is about
innodb_buffer_pool_size / 20 + ~20MB</description>
		<content:encoded><![CDATA[<p>I want to add about InnoDB memory. InnoDB allocates additional memory for internal needs (adaptive hash index, etc) which you should take into account. My investigations show it is about<br />
innodb_buffer_pool_size / 20 + ~20MB</p>
]]></content:encoded>
	</item>
</channel>
</rss>
