Free Newsletters:
DatabaseJournal  
DBANews
Database Journal
Search Database Journal:
 
MS SQL Oracle DB2 Access MySQL PostgreSQL PHP SQL Etc SQL Scripts & Samples Links Database Forum DBA Videos
internet.com

» Database Journal Home
» Database News
» DBA Videos
» Database Articles
» Database Tutorials
MS SQL
Oracle
MS Access
MySQL
DB2
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» DBA Jobs
» Sitemap

News Via RSS Feed



follow us on Twitter

Marketplace Partners
Be a Marketplace Partner




internet.commerce
Be a Commerce Partner


















2009: The Year Microsoft 'Gets' Users?

Apple's Jobs: Condition Won't Hinder CEO Duties

LG, Netflix Plan TVs With Streaming Net Video

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Database Journal | DBA Support | SQLCourse | SQLCourse2 | Swynk







Related Articles
Optimizing MySQL: Queries and Indexes
Optimizing the mysqld variables

Senior Database Administrator (NYC)
Next Step Systems
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume

Featured Database Articles

MySQL

December 17, 2001

Optimizing MySQL: Hardware and the Mysqld Variables

By Ian Gilfillan

Part 1 - Compiling MySQL

Like a grand prix driver starting at the back of the track, if you don't do things well from the beginning, and prepare hard for the race, it doesn't matter how well you do once the race has started. You're at the back and are never going to win. So, with MySQL, it's extremely important to start off on the right foot, and that means compiling MySQL properly. The specific options you use depends on your setup of course, but here are some pointers to get you started.

  • Firstly, compile statically (--static). This requires more disk space, but runs faster (13% on Linux, according to MySQL themselves)
  • Optimize to the highest level possible (-O3 with gcc)
  • Compile without debug (--without-debug). This runs 20-35% faster.
  • Compile without frame pointers. (-fomit-frame-pointer). This is from 1-4% faster.
  • Compile with only the minimum character sets that you need (e.g. --with-extra- charsets=none)

Here's a sample configuration I've seen work well:

	CFLAGS="-mcpu=i686 -march=i686 -O3 -pipe -fomit-frame-pointer" \
./configure \
        --prefix=/usr/local/build/mysql \
        --with-mysqld-user=mysql \
        --without-debug \
        --with-client-ldflags=-all-static \
        --with-mysqld-ldflags=-all-static \
        --disable-shared \
        --localstatedir=/usr/local/build/mysql/var \
        --with-extra-charsets=none \
        --enable-assembler

Note that if you're using a Pentium processor, using pgcc seems to give better results than gcc. There have been problems with pgcc and AMD processors though. For a list of complete gcc options, run:

man gcc

Taking the time to compile as well as possible for your setup is worth it. After all, you'll probably only do this once, but it can hamstring your server for life if you get it wrong (it's not fun recompiling after your server is setup and running!)

Go to page: 1  2  3  4  Next  

Tools:
Add databasejournal.com to your favorites
Add databasejournal.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed

MySQL Archives







Latest Forum Threads
MySQL Forum
Topic By Replies Updated
Need helping in writing query sizzlingbrains 1 January 2nd, 01:22 PM
Database Query Problem?? anix 0 December 30th, 03:48 PM
Changing Date Format in mysql ashokvissu 1 December 27th, 10:19 AM
Database Overwriting Another spare 0 December 9th, 09:45 AM








internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers