build times increase 1.5x from cmake 2.8.12 to 3

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

build times increase 1.5x from cmake 2.8.12 to 3

Miller Henry
I have a fairly large project that I’m trying to update from building with cmake 2.8.12 to 3.10.2. When I make the change my build times go up by half on our Jenkins ci build system.  The build machines are 32 core and my build time goes from 59m 38s to 1h 28m 33s. When I try this locally the time goes from 80 minutes to 84 minutes (a 6 core machine, but I’m running Debug while the ci system is running RelWithDebInfo so the times cannot be compared).  My current effort is targeting 3.10.2, but I’ve had similar results with 3.2 and 3.9.
 
I compared command line of just one file and it looks like the only significant difference is 2.8.12 was passing -MMD to gcc, while 3.10.2 is using -MD. I’m suspecting that this is the significant difference. Is there a way to get cmake to use -MMD? Or better yet, since our CI machines never do an incremental build is there a way to turn off dependency generation that might speed my build up more?  We are using the ninja Generator.
 
Of course I just sampled one of our 17000 build steps to decide the above was the problem. It is entirely possible that I’m off base and something else is the issue. If you have an idea of where I should look instead I’m open to that.
 
 
 

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: build times increase 1.5x from cmake 2.8.12 to 3

Robert Maynard
My initial thought is that the differences between -mmd and -md would
be pretty minimal. The original discussion on this change (
https://cmake.org/Bug/view.php?id=14914 ) has people agreeing with
that as this information is generated when the compiler builds each
file.

Have you used something like ninja browse / ninja graph (
https://ninja-build.org/manual.html ) to verify the build graph from
2.8.12 to 3.X are the same?

On Fri, Mar 23, 2018 at 3:41 PM, Miller Henry <[hidden email]> wrote:

> I have a fairly large project that I’m trying to update from building with
> cmake 2.8.12 to 3.10.2. When I make the change my build times go up by half
> on our Jenkins ci build system.  The build machines are 32 core and my build
> time goes from 59m 38s to 1h 28m 33s. When I try this locally the time goes
> from 80 minutes to 84 minutes (a 6 core machine, but I’m running Debug while
> the ci system is running RelWithDebInfo so the times cannot be compared).
> My current effort is targeting 3.10.2, but I’ve had similar results with 3.2
> and 3.9.
>
> I compared command line of just one file and it looks like the only
> significant difference is 2.8.12 was passing -MMD to gcc, while 3.10.2 is
> using -MD. I’m suspecting that this is the significant difference. Is there
> a way to get cmake to use -MMD? Or better yet, since our CI machines never
> do an incremental build is there a way to turn off dependency generation
> that might speed my build up more?  We are using the ninja Generator.
>
> Of course I just sampled one of our 17000 build steps to decide the above
> was the problem. It is entirely possible that I’m off base and something
> else is the issue. If you have an idea of where I should look instead I’m
> open to that.
>
>
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake
>
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake