2 Replies Latest reply: Aug 22, 2013 3:12 PM by user4485593 RSS

    Question about SunStudio v12.3 and compiling on multicore multithreaded T5240

    user4485593

      Hi,

       

      I purchased the first multicore/multithreaded server for our company to replace SunFire V240 and v445.  The server I got is T5240 with 2x4 core 1.2GHz CPUS.

       

      I am running Sparc Solaris 10u11 on this server

       

      I installed SunStudio v12.3 and compiled mysql v5.5.19, which took an hour.  When I compiled on a SunFire v240 with 2 1.5G CPUs, the the compile took 1/2hour.  Now I know the single CPU on the 5240 is smaller than the v240 but I thought it would be faster on the 5240. I used the same compile script (see below).

       

      Is compiling a program just use a single CPU no matter what the capabilities?  Is there an option I can pass to have it use all the server resources so it can compile faster?   This is a web server and I want to make sure all the programs I compile can utilize all the capabilities of the cores and threads.

       

      If this is not the forum for this, any suggestions on where I can get help with this would be appreciated.

       

      Thank you.

       

      -----------------------------------  mysql compile script -------------------------------

      #!/bin/sh

       

      PATH=/opt/SUNWspro/bin:/usr/ccs/bin:/usr/sfw/bin:/usr/local/bin:.:/usr/bin:/usr/sbin:/usr/ucb:/etc:/usr/local/cmake/bin; export PATH

       

      CC=cc; export CC

      CXX=CC; export CXX

       

      /usr/local/cmake/bin/cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/home1/mysql_data -DSYSCONFDIR=/etc -DWITH_INNOBASE_STORAGE_ENGINE=1

      -----------------------------------

        • 1. Re: Question about SunStudio v12.3 and compiling on multicore multithreaded T5240
          Steve.Clamage-Oracle

          Each compilation is single-threaded. When you run a serial make, you get one compilation at a time.

           

          The way to improve throughput is to use a parallel make that can run more than one task simultaneously. I am not familiar with cmake. I took a quick look at the documentation at cmake.org, but could not tell whether cmake offers a parallel make option. Both GNU gmake and the dmake that comes with Studio do. (Studio dmake is the same as Solaris make, with extensions for parallel and distributed job management.) Assuming  there is enough memory, I use a rule of thumb of setting the max parallel jobs at 1 per core. You can find out the number of cores on Solaris this way:

               /usr/sbin/psrinfo | grep -c on-line

           

          Setting up the makefile for parallel make requires some attention to be sure you don't try to build parts out of sequence. Either all dependencies must be made explicit, or you need a way to say "wait for A to be done before starting B". (Both gmake and dmake have this feature.)  I don't know whether mysql makefiles are ready for parallel make, but you can probably find out at mysql.org, along with whether it works with dmake or gmake. (Each make variation has some usually minor incompatibilities with the others.)

           

          Message was edited by: Steve_Clamage

          • 2. Re: Question about SunStudio v12.3 and compiling on multicore multithreaded T5240
            user4485593

            Thank you very much.   Very helpful answer.

             

            I wish there were tutorials on this type of thing before I start spending money on a consultant to teach me.

             

            Thanks