HOBALL 筆記簿

October 24, 2009

MySQL Memory Usage

Filed under: SQL — Tags: , , , — hoball @ 10:25 am

For tuning MySQL variables,

max_memory_needed = core_mysql + global_values + (thread_buffers * max_connections)

max_memory_needed = core_mysql
+ key_buffer_size
+ innodb_buffer_pool_size
+ innnodb_additional_memory_pool_size
+ innodb_log_buffer_size
+ max_tmp_tables * min(tmp_table_size,max_heap_table_size)
+ query_cache_size
+ 3 * myisam_sort_buffer_size
+ max_connections * ( read_buffer_size + join_buffer_size + read_rnd_buffer_size + thread_stack + (2 * max_packet_size) ))

Source:
http://www.pythian.com/news/1455/mysql-memory-consumption
http://www.mysqlperformanceblog.com/2006/05/17/mysql-server-memory-usage/

About these ads

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Shocking Blue Green Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: