john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

Mysql reduced memory configuration

The most frequent professional opinion is to get a diagnostic using the perl script below

(after leaving the mysqld running for awhile to correctly simulate)

https://github.com/rackerhacker/MySQLTuner-perl

perl mysqltuner.pl --host 127.0.0.1 ---port 3306 --user root --pass PASSWORD

IF RUNNING LOCALLY USE: perl mysqltuner.pl --user root --pass PASSWORD

http://wiki.vpslink.com/Low_memory_MySQL_/_Apache_configurations

http://www.theodorenguyen-cao.com/2008/12/07/reduce-mysql-memory-usage/

[mysqld]
port     = 3306
socket   = /var/run/mysqld/mysqld.sock
skip-locking
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K

Decision Matrix

Is your table is going to be inserted, deleted, and updated much much more than it is going to be selected?

InnoDB

If you need full-text search MyISAM

If you prefer/require relational database design InnoDB

Is disk-space or ram an issue? MyISAM

In Doubt? MyISAM


  • « drupal 00 multisite
  • Linode basics »

Published

Dec 26, 2011

Category

sql

~117 words

Tags

  • configuration 8
  • memory 3
  • mysql 18
  • reduced 1
  • sql 18