Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Apr 22, 2012 9:16 pm 
Offline

Joined: Sun Apr 22, 2012 6:51 pm
Posts: 1
Hi,

I've just installed MySQL as per Linode's Getting Started Guide and I have two questions:


1.)

In the documentation under Database > Optimizing MySQL for a Linode 512, there are recommendations which I wonder if they're obsolete, since they don't exist in the factory my.cnf file that was added when I just installed MySQL (Ver 14.14 Distrib 5.1.58, for debian-linux-gnu (i686) using readline 6.2).

Linode's Getting Started Guide's recommendations are:

Code:
key_buffer = 16K
max_allowed_packet = 1M
thread_stack = 64K
table_cache = 4
sort_buffer = 64K
net_buffer_length = 2K


The latter two (sort_buffer and net_buffer_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


Top
   
 Post subject:
PostPosted: Sun Apr 22, 2012 9:29 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Not all possible options appear in the default my.cnf -- otherwise, it'd be really long. It's OK to add stuff that doesn't exist.

Now, as to whether the tuning is necessary at all, and whether InnoDB should be disabled... those are somewhat religious topics. :-) I personally use mysqltuner.pl to suggest ways to tune MySQL, and I use InnoDB whenever possible, for performance and safety reasons. But, if you aren't using MySQL heavily, tuning to reduce memory consumption isn't a big loss.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Sun Apr 22, 2012 9:35 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Yep that's obsolete.

Ignore net_buffer_length.

Sort buffer is now sort_buffer_size http://dev.mysql.com/doc/refman/5.1/en/ ... uffer_size the defaults 2m you can adjust if you want I generally don't bother.

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
Code:
[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 innodb_file_per_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.
innodb_buffer_pool_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.

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

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
RSS

Powered by phpBB® Forum Software © phpBB Group