首页 > configure, databases, mysql > Mysql编译安装参数优化

Mysql编译安装参数优化

2010年6月18日 发表评论 阅读评论

关键字: mysql compile
1. -static 13%
–with-client-ldflags=-all-static
–with-mysqld-ldflags=-all-static
静态链接提高13%性能
2. -pgcc 1%
CFLAGS=”-O3 -mpentiumpro -mstack-align-double” CXX=gcc \
CXXFLAGS=”-O3 -mpentiumpro -mstack-align-double \
-felide-constructors -fno-exceptions -fno-rtti”
如果是Inter处理器,使用pgcc提高1%性能
3. Unix Socket 7.5%
–with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock
使用unix套接字链接提高7.5%性能,所以在windows下mysql性能肯定不如unix下面
4. –enable-assembler
允许使用汇编模式(优化性能)

下面是总体的编译文件
编译代码

CFLAGS=”-O3″ CXX=gcc CXXFLAGS=”-O3 -felide-constructors \

-fno-exceptions -fno-rtti -fomit-frame-pointer -ffixed-ebp”

./configure \

–prefix=/usr/local/mysql –enable-assembler \

–with-mysqld-ldflags=-all-static

–with-client-ldflags=-all-static

–with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock

–with-charset=utf8

–with-collation=utf8_general_ci

–with-extra-charsets=all

分类: configure, databases, mysql 标签:
  1. 2010年12月8日22:10 | #1

    Please provide detail of funding by program.

  1. 本文目前尚无任何 trackbacks 和 pingbacks.