MySQL 编译参数优化
by Elton on 六.23, 2009, under Linux
适当的调整MySQL的编译参数,可以极大的提升MySQL的性能,官方文档说可以提升10-30%的性能。
1. -static 13%
–with-client-ldflags=-all-static
–with-mysqld-ldflags=-all-static
静态链接提高13%性能
2. -pgcc 1%
CFLAGS=”-O3 -mnocona -mstack-align-double” CXX=gcc
CXXFLAGS=”-O3 -mnocona -mstack-align-double
-felide-constructors -fno-exceptions -fno-rtti”
如果是Inter处理器,使用pgcc提高1%性能, 其中-m参数指定你cpu的类型,如果你是Intel Pentium4 支持64位的CPU就试用nocona这个参数,如果你是Intel Core2则使用core2这个参数。详细的cpu支持参数列表在这里
3. Unix Socket 7.5%
–with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock
使用unix套接字链接提高7.5%性能,所以在windows下mysql性能肯定不如unix下面
4. –enable-assembler
允许使用汇编模式(优化性能)
1 2 3 4 5 6 7 8 9 10 | CFLAGS="-O3 mnocona" CXX=gcc CXXFLAGS="-O3 mnocona -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 |



十月 7th, 2009 on 22:10
To start earning money with your blog, initially use Google Adsense but gradually as your traffic increases, keep adding more and more money making programs to your site.
十一月 29th, 2009 on 05:26
Normally I don’t comment frivolously, however I wanted say “Happy Thanksgiving” to everyone!
十二月 8th, 2009 on 21:02
very informative article… I would like to use a piece of this on my blog, is that feasible?
十二月 10th, 2009 on 19:27
sure
十二月 19th, 2009 on 12:26
Super-Duper site! I am loving it!! Will come back again – taking you feeds also, Thanks.
一月 2nd, 2010 on 23:34
I don’t usually reply to posts but I will in this case. I’ve been experiencing this very same problem with a new WordPress installation of mine. I’ve spent weeks calibrating and getting it ready when all of a sudden… I cannot delete any content. It’s a workaround that, although isn’t perfect, does the trick so thanks! I really hope this problem gets solved properly asap.
rH3uYcBX
三月 12th, 2010 on 23:26
Hello Guru, what entice you to post an article. This article was extremely interesting, especially since I was searching for thoughts on this subject last Thursday.
四月 9th, 2010 on 14:22
I determined your blog on google and read a few of your other posts. You might have a wonderful Blog!!! I just additional you to my Search engines News Reader. Seem forward to reading more from you inside the future. Retain up the very good do the job.
四月 26th, 2010 on 08:51
I bookmarked this link . Thank you for good job !
四月 28th, 2010 on 06:42
Thanks.
五月 7th, 2010 on 10:51
Nice post, thanks for writing!
六月 2nd, 2010 on 18:10
fantastic post as usual!
七月 6th, 2010 on 10:31
Good share, great article, very usefull for us thanks.
七月 6th, 2010 on 22:50
Hi there may I use some of the information here in this post if I provide a link back to your site?
七月 17th, 2010 on 05:12
hi! I just wanted to say your blog is super great!
七月 25th, 2010 on 03:02
Not very often you can see cool enough theme for WP. There are very cool themes, but sometimes inconvenient in settings. I tried recent versions of Designora, My Office, Red Steel, Traction, also I have installed also ProSense – simple, but made for adsense. Infrequent I can see something normal but good in options.
七月 29th, 2010 on 23:31
I want to thank the blogger very much not only for this post but also for his all previous efforts. I found thesimpleyoga.com to be greatly interesting. I will be coming back to thesimpleyoga.com for more information.
八月 18th, 2010 on 06:17
Keep up the good work. Everyone is opened to there opinion. Excellent blog here, i am still reading :)
八月 22nd, 2010 on 20:13
Nice post! GA is also my biggest earning. However, it�s not a much.
八月 30th, 2010 on 03:47
Generally I do not make comments on blogs, but I have to mention that this post really forced me to do so. Really proficient post.
八月 30th, 2010 on 13:04
Thanks very much for this great Post. Good topic to write about on my site. I might set a bookmark to your blog.
八月 30th, 2010 on 13:11
Where can it be, i’d like you just read much more about this particular post, thanks.
八月 30th, 2010 on 14:21
Hey, I just love your posts! is it alright if I use some of the information from this blog post if I provide a link back to your site?
八月 30th, 2010 on 14:25
useless seriously, this almost doenst work ur arms. lol
八月 31st, 2010 on 19:08
well that is certainly some insane stuff
十月 14th, 2010 on 15:08
Awesome, thanks!
五月 13th, 2011 on 04:14
Thanks for this post, I am a big fan of this website would like to proceed updated.