:: DEVELOPER ZONE
We start with system-level factors, because some of these decisions must be made very early to achieve large performance gains. In other cases, a quick look at this section may suffice. However, it is always nice to have a sense of how much can be gained by changing things at this level.
The default operating system to use is very important! To get the best use of multiple-CPU machines, you should use Solaris (because its threads implementation works really well) or Linux (because the 2.4 kernel has really good SMP support). Note that older Linux kernels have a 2GB filesize limit by default. If you have such a kernel and a desperate need for files larger than 2GB, you should get the Large File Support (LFS) patch for the ext2 filesystem. Other filesystems such as ReiserFS and XFS do not have this 2GB limitation.
Before using MySQL in production, we advise you to test it on your intended platform.
Other tips:
If you have enough RAM, you could remove all swap devices. Some operating systems use a swap device in some contexts even if you have free memory.
Use the --skip-external-locking MySQL option to
avoid external locking. This option is on by default as of MySQL
4.0. Before that, it is on by default when compiling with
MIT-pthreads, because flock() isn't fully
supported by MIT-pthreads on all platforms. It's also on by default
for Linux because Linux file locking is not yet safe.
Note that the --skip-external-locking option
does not affect MySQL's functionality as long as you run only one
server. Just remember to take down the server (or lock and flush
the relevant tables) before you run myisamchk.
On some systems this option is mandatory, because the external
locking does not work in any case.
The only case when you can't use
--skip-external-locking is if you run multiple
MySQL servers (not clients) on the same data,
or if you run myisamchk to check (not repair) a
table without telling the server to flush and lock the tables
first.
You can still use LOCK TABLES and
UNLOCK TABLES even if you are using
--skip-external-locking.
© 1995-2005 MySQL AB. All rights reserved.

User Comments
Warning: query failed: Unknown column 'user.firstname' in 'field list' in /data0/sites/live/web-main/lib/mysql-cxn.php on line 69
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /data0/sites/live/web-main/lib/docbook.php on line 245
Add your own comment.