We recently integrated MySQL 5.0.45 version with Open Solaris. MySQL
5.0.45 is available in SXDE 01/08. Sun Studio was used to compile MySQL
on both Solaris SPARC and Solaris AMD64 platform.
This blog entry describes the changes that were made to improve
MySQL performance using Sun Studio:
- Enable function inlining when Sun Studio is used.
- The header file univ.i has the following code:
- #if !defined(GNUC) && !defined(WIN)
- #undef UNIV_MUST_NOT_INLINE /* Remove compiler warning */
- #define UNIV_MUST_NOT_INLINE
- #endif
- Modifying it to add Sun Studio compiler as under:
- #if !defined(GNUC) &&
!defined(WIN) && !defined(__SUNPRO_C)
- #undef UNIV_MUST_NOT_INLINE /* Remove compiler warning */
- #define UNIV_MUST_NOT_INLINE
- #endif
-
The following compiler options boost performance on both SPARC and
AMD64:
- -xbuiltin=%all' and ' -xprefetch=auto -xprefetch_level=3
-
On SPARC setting the optimization level to 4 helps performance.
(-x04).
- On AMD64 platform, the compilation of NDB fails with Sun
Studio due to the following snippet in configure.in:
case
$SYSTEM_TYPE-$MACHINE_TYPE-$ac_cv_prog_gcc-$have_ndbcluster in
*solaris*-i?86-no-yes)
# ndb fail for whatever strange reason to link Sun Forte/x86
# unless using incremental linker
CXXFLAGS="$CXXFLAGS -xildon"
;;
The -xildon option is added for Solaris AMD64 platform ...which is no longer available.In previous releases, this option forced the compiler to use the incremental linker (ild) by default instead of the linker (ld) for link-only invocations of the compiler. That is, with -g, the compiler's default behavior was to automatically invoke ild in place of ld whenever you used the compiler to link object files, unless you specified -G or source files on the command line. This is no longer the case. The incremental linker is no longer available. Refer to the following for more details : http://docs.sun.com/source/819-3690/Comp_Options_App.html
After removing this option, the compilation of ndb
works fine.
- On 32bit built , the release binary is using the following
option:
-features=no%except
It is recommended not to use this option. Removing this option results
in following error:
- Undefined
first referenced
symbol in file
__1cG__CrunMex_rethrow_q6F_v_ ../libmysql/.libs/libmysqlclient.a(ssl.o)
Nice to see this post, Ritu.
Are you able to say anything about performance improvement from this effort?
Vijay
Posted by Vijay Tatkar on February 11, 2008 at 04:51 PM PST #
Yes, I do have the performance numbers , shall be posting them shortly....
Posted by Ritu Kamboj on February 12, 2008 at 01:13 PM PST #
How can I be a good developer of java
Posted by Assaduzzaman on April 15, 2008 at 12:20 AM PDT #
I love MYSQL, It one great database i would love to be with anyday anytime. but I need more in sight where i can diversfy the knowledge where people can really appreciate it`s power. At the moment all i do is use it with PHP on browsers for user to appreciate it.
Posted by Adenuga Agbolade on April 19, 2008 at 07:17 AM PDT #