Discrepancies in Getting Started Guide vs actual code
I've just installed MySQL as per Linode's Getting Started Guide and I have two questions:
1.)
In the documentation
Linode's Getting Started Guide's recommendations are:
key_buffer = 16K
max_allowed_packet = 1M
thread_stack = 64K
table_cache = 4
sort_buffer = 64K
net_buffer_length = 2K
The latter two (sortbuffer and netbuffer_length) don't seem to appear in my.cnf …
Should I add these or leave them out? Have they been renamed and now correspond to something else that does exist in the current my.cnf?
As a newbie, I find these discrepancies a little bit confusing.
2.)
The guide also recommends that I skip_innodb, if I'm not going to use it. I guess I should know whether I'll use InnoDB or not, but right now I'm not sure.
Is it ok to leave both InnoDB and MyISAM enabled at the same time? I wonder if there's a potential/significant drawback having both enabled ("not skipped") simultaneously.
Best regards, Henrik
2 Replies
Now, as to whether the tuning is necessary at all, and whether InnoDB should be disabled… those are somewhat religious topics. mysqltuner.pl
Ignore netbufferlength.
Sort buffer is now sortbuffersize
Keep innodb enabled, personally I make it the default database engine, it's more resilient to crashes (myisam corrupts really easily in the case of server failure)
These are the settings I put for innodb
[mysqld]
default-storage-engine = InnoDB
innodb_file_per_table
innodb_buffer_pool_size=350M
innodb_additional_mem_pool_size=8M
This one is really handy innodbfileper_table what it does it creates a file for each innodb table instead of using the idbdata file which means if you drop and recreate the table you can claim some disk space back which on a Linode is invaluable.
innodbbufferpool_size this one basically is how much memory innodb will use to cache data and indexes the bigger the pool the better the performance. That's on a Linode 1024 with a heavy python application taking up quite a bit of ram.
This is a good tool for tuning mysql it can even estimate how much memory you'll use.