Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Database memory usage is a complex topic. The <a href="http://www.mysqlperformanceblog.com/2006/05/17/mysql-server-memory-usage/" rel="noreferrer">MySQL Performance Blog</a> does a good job of covering your question, and lists many reasons why it's hugely impractical to "reserve" memory.</p> <p>If you really want to impose a hard limit, you could do so, but you'd have to do it at the OS level as there is no built-in setting. In linux, you could utilize <a href="http://www.linuxhowtos.org/Tips%20and%20Tricks/ulimit.htm" rel="noreferrer">ulimit</a>, but you'd likely have to modify the way MySQL starts in order to impose this.</p> <hr> <p>The best solution is to tune your server down, so that a combination of the usual MySQL memory settings will result in generally lower memory usage by your MySQL installation. This will of course have a negative impact on the performance of your database, but some of the settings you can tweak in <code>my.ini</code> are:</p> <pre><code>key_buffer_size query_cache_size query_cache_limit table_cache max_connections tmp_table_size innodb_buffer_pool_size </code></pre> <p>I'd start there and see if you can get the results you want. There are <a href="http://dev.mysql.com/doc/refman/5.0/en/server-parameters.html" rel="noreferrer">many</a> <a href="http://www.ibm.com/developerworks/library/l-tune-lamp-3.html" rel="noreferrer">articles</a> out there about adjusting MySQL memory settings.</p> <hr> <p>Edit:</p> <p>Note that some variable names <a href="http://dev.mysql.com/doc/mysqld-version-reference/en/mysqld-version-reference-optvar-changes-5-1.html" rel="noreferrer">have changed in the newer 5.1.x releases of MySQL</a>.</p> <p>For example:</p> <pre><code>table_cache </code></pre> <p>Is now:</p> <pre><code>table_open_cache </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload