Skip to content Skip to main navigation Skip to footer

Linux:Mysql编译安装参数优化

关键字: mysql compile 1. -static  13%

  1. –with-client-ldflags=-all-static
  2. –with-mysqld-ldflags=-all-static

复制代码

静态链接提高13%性能 2. -pgcc  1%

  1. CFLAGS=”-O3 -mpentiumpro -mstack-align-double” CXX=gcc \     

复制代码

如果是Inter处理器,使用pgcc提高1%性能 3. Unix Socket  7.5%

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

复制代码

使用unix套接字链接提高7.5%性能,所以在windows下mysql性能肯定不如unix下面 4. –enable-assembler 允许使用汇编模式(优化性能)     下面是总体的编译文件 编译代码:

  1. CFLAGS=”-O3″ CXX=gcc CXXFLAGS=”-O3 -felide-constructors \
  2. -fno-exceptions -fno-rtti -fomit-frame-pointer -ffixed-ebp” \
  3. ./configure \
  4.    –prefix=/usr/local/mysql –enable-assembler \
  5.    –with-mysqld-ldflags=-all-static \
  6.    –with-client-ldflags=-all-static \
  7.    –with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock \
  8.    –with-charset=utf8 \
  9.    –with-collation=utf8_general_ci \
  10.    –with-extra-charsets=all

复制代码

 

本文内容由 evremonder 提供

 

 已同步至 linux的微博
0 Comments

There are no comments yet

Leave a comment

Your email address will not be published.