Skip to contentSkip to conversation

Building Ceph using CMake

DISCUSSION Ali Maredia 3 participants 5 messages Nov 26, 2013 – Dec 20, 2013 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hi all,

I'm a student working on a project to make ceph build faster and to help with efforts to port ceph to other platforms using cmake.

Using the cmake build, I have been able to build core ceph components in a little under 20 minutes. For in depth information on the work done so far there is a README.cmake file in the top-level ceph directory. Please try it out and I would love to get feedback on future editions and problems.

You can find a branch cmake in the below repo.

https://github.com/linuxbox2/linuxbox-ceph.git

Best,

Ali

#2 lore raw
Quoted 3 lines · Ali Maredia

Hi all,

I'm a student working on a project to make ceph build faster and to help with efforts to port ceph to other platforms using cmake.

CMake is awesome. Also, you might be interested in checking out the portability work going on at github.com/ceph/ceph wip-port.

-Noah

#3 lore raw

We are finding the cmake build system to be a big help, the compile-link-run cylces seem much shorter.

Matt

Quoted 17 lines · ----- "Noah Watkins
Quoted 3 lines · Ali Maredia

Hi all,

I'm a student working on a project to make ceph build faster and to

help with efforts to port ceph to other platforms using cmake.

CMake is awesome. Also, you might be interested in checking out the portability work going on at github.com/ceph/ceph wip-port.

-Noah

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 10 lines
Matt Benjamin
The Linux Box
206 South Fifth Ave. Suite 150
Ann Arbor, MI  48104

http://linuxbox.com

tel.  734-761-4689 
fax.  734-769-8938 
cel.  734-216-5309 
#4 lore raw

All,

To illustrate the benefit of using CMake to build ceph I timed builds of the ceph base (a list of targets is below) on my local machine with an Intel Core 2 Duo processor that have two 2.2 GHz cores.

Here are the results I got. The following are the real times building the same exact targets.

Build/Command | Make base | Make base -j2 |
=======================================================
Autotools trial run 1| 58mins 31secs | 39mins 31secs |
=======================================================
Autotools trial run 2| 58mins 28secs | - |
=======================================================
CMake trial run 1 | 18mins 55secs | 10mins 31secs |
=======================================================
CMake trial run 2 | 18mins 35secs | 11mins 43secs |
=======================================================

Most of the speedup can be attributed to the fact that libtool is compiling both PIC and non-PIC versions of every source file. CMake just builds everything with -fPIC. We don't have an opinion on the matter, but you may want to consider doing the same with the autotools build.

Many source files are compiled into several targets causing them to be built multiple time. With the CMake build I was able to pull them into static libraries and link them into the targets that needed them.

In conclusion I don't have a precise apples-to-apples comparison of cmake vs. automake, but I hope my switch over to CMake has highlighted some ways to improve upon the build system and increase developer productivity and would love to hear thoughts and comments on the matter.

-Ali

----- Original Message -----
From: "Matt W. Benjamin" <[email protected]>
To: "Noah Watkins" <[email protected]>
Cc: "Ceph Devel" <[email protected]>, "Ali Maredia" <[email protected]>
Sent: Tuesday, November 26, 2013 7:43:00 PM
Subject: Re: Building Ceph using CMake

We are finding the cmake build system to be a big help, the compile-link-run cylces seem much shorter.

Matt

Quoted 17 lines · ----- "Noah Watkins
Quoted 3 lines · Ali Maredia

Hi all,

I'm a student working on a project to make ceph build faster and to

help with efforts to port ceph to other platforms using cmake.

CMake is awesome. Also, you might be interested in checking out the portability work going on at github.com/ceph/ceph wip-port.

-Noah

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 10 lines
Matt Benjamin
The Linux Box
206 South Fifth Ave. Suite 150
Ann Arbor, MI  48104

http://linuxbox.com

tel.  734-761-4689 
fax.  734-769-8938 
cel.  734-216-5309 
#5 lore raw
Quoted 4 lines · Ali Maredia

Most of the speedup can be attributed to the fact that libtool is compiling both PIC and non-PIC versions of every source file. CMake just builds everything with -fPIC. We don't have an opinion on the matter, but you may want to consider doing the same with the autotools build.

Many source files are compiled into several targets causing them to be built multiple time. With the CMake build I was able to pull them into static libraries and link them into the targets that needed them.

In the latest round of automake clean-ups I know some of the compilation redundancy was removed, but I dont' recall if it was all taken care of. If you happen to know have a list of the redundant stuff you found that would be helpful for improving automake.