Closed Bug 496901 Opened 16 years ago Closed 15 years ago

Deploy ccache on all linux build machines

Categories

(Release Engineering :: General, defect, P3)

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: catlee, Unassigned)

References

Details

Attachments

(7 files, 11 obsolete files)

102.53 KB, application/octet-stream
Details
46.89 KB, application/octet-stream
Details
47.74 KB, application/octet-stream
Details
2.09 KB, patch
bhearsum
: review+
catlee
: checked-in+
Details | Diff | Splinter Review
5.94 KB, patch
bhearsum
: review+
catlee
: checked-in+
Details | Diff | Splinter Review
28.54 KB, patch
bhearsum
: review+
catlee
: checked-in+
Details | Diff | Splinter Review
761 bytes, patch
nthomas
: review+
catlee
: checked-in+
Details | Diff | Splinter Review
Investigation from bug 488412 showed that using ccache on Linux is a big win. We should deploy ccache on all our linux build machines, the try machines. The version of ccache I used for testing was Debian's ccache, version 2.4-16. The notable difference from the upstream version is support for compressed object files, which means the cache can store far more objects. After ccache is installed, the maximum cache size should be set to 2GB: CCACHE_DIR=/builds/ccache ccache -M 2G
Assignee: nobody → lsblakk
Status: NEW → ASSIGNED
Staging slaves are already using ccache - moz2-linux-slave03, 04 and 17 successfully. Chris Atlee is going to prepare the rpm for deploying to the other linux slaves and document the process.
Attached patch Changes to env required (obsolete) — Splinter Review
Here's what I was using to test on the linux slaves. Strictly only the change to the linux env is necessary at this point. It can safely be landed without impacting production slaves, since the determination of whether ccache is used or is in the mozconfig file. The additional steps in the build factory zero out the ccache stats, and print them out afterwards. Pretty handy for debugging! It might be nice to leave them in somehow, but obviously they should only be run if ccache is used for that build.
And here's what I was using for buildbot-configs changes. Again, only the linux side of things is required. In particular, ccache cannot be enabled for the code coverage build.
So John Ford is going to prepare the rpm to use on the linux slaves, and then hopefully roll this out as well.
Assignee: lsblakk → jford
Now that we have puppet going on all these build slaves, could we use puppet to deploy instead of building an rpm and manually deploying?
(In reply to comment #5) > Now that we have puppet going on all these build slaves, could we use puppet to > deploy instead of building an rpm and manually deploying? Yes, that's what we've been doing for all new packages.
(In reply to comment #6) > (In reply to comment #5) > > Now that we have puppet going on all these build slaves, could we use puppet to > > deploy instead of building an rpm and manually deploying? > > Yes, that's what we've been doing for all new packages. Cool, thanks for the confirm.
Attached file source rpm
Source RPM for rebuilding
Attached file binary rpm
binary rpm build with gcc4.1.1
rpms are created. I don't know how to deploy using puppet but would be willing to learn.
Assignee: jford → nobody
Assignee: nobody → jford
Attached patch ccache for puppet (obsolete) — Splinter Review
This is the puppet manifests change needed to install ccache. I have this in a separate class to distinguish upstream centos/red hat packages from our own custom packages.
Attachment #402623 - Flags: review?(bhearsum)
Attached patch custom-ccache (obsolete) — Splinter Review
Updated patch, cache locations set only for linux
Attachment #382575 - Attachment is obsolete: true
Attachment #402628 - Flags: review?(catlee)
Comment on attachment 402628 [details] [diff] [review] custom-ccache We don't want to run the 'ccache -z' / 'ccache -s' commands on all platforms.
Attachment #402628 - Flags: review?(catlee) → review-
that patch is just a new version of the already attached patch. Would it be ok to wrap that in if 'linux' in self.platform: run-ccache-commands
Comment on attachment 402623 [details] [diff] [review] ccache for puppet Please put moz-rpms inside of centos5/ - they are platform specific. (We should fix the other RPMs to be inside of centos5/ too, but that's another bug). Looks fine otherwise. One small request: Can you drop instructions on how to create the source and binary RPMs into this bug?
Attachment #402623 - Flags: review?(bhearsum) → review-
Attached patch configs-ccache (obsolete) — Splinter Review
Changes to buildbot-configs that are needed to roll this out
bhearsum, sure i can change that. To create the binary RPM, you need to run "rpmbuild -ba <the-src.rpm>". To create the SRPM you would run "rpmbuild -bs ccache.spec" where the spec file is a file inside the SRPM. To make this specfile, i downloaded the Fedora EPEL package (yumdownloader --source ccache), created a user RPM build tree (rpmdev-setuptree iirc), installed the SRPM (rpm -Uvh <origninal-src.rpm>), made the changes needed to the specfile then built the package (rpmbuild -ba ccache.spec). I did find that when building the RPM i had to disable a python specific rpm postprocessing script. I can't remember which one it was but it will give an error when you try to build. To disable that i added exit 0 after the #! in the script that was erroring out.
Attached patch custom-ccache-v2 (obsolete) — Splinter Review
I have wrapped the ccache command in a platform check. All linux slaves should have ccache installed once this is deployed.
Attachment #402628 - Attachment is obsolete: true
Attachment #402661 - Flags: review?(catlee)
Attached patch ccache for puppet 2 (obsolete) — Splinter Review
Changed the location of the package
Attachment #402623 - Attachment is obsolete: true
Attachment #402665 - Flags: review?(bhearsum)
Comment on attachment 402661 [details] [diff] [review] custom-ccache-v2 Looks basically good, except that this will run ccache on linux64 bit machines as well (since 'linux' in 'linux64' is True). If it's your intent to deploy ccache to the 64-bit linux machines, great. Otherwise, change this to "if self.platform == 'linux'"
Attachment #402661 - Flags: review?(catlee) → review+
Yep, that was intentional. The buildbot-configs patch does have the configuration changes needed for Linux 64
Do we need a different RPM for the 64-bit machines?
i was under the impression that the 64bit machines were running 32bit operating systems and we are cross compiling Firefox
you are mistaken! [cltbld@moz2-linux64-slave01 ~]$ uname -a Linux moz2-linux64-slave01.build.mozilla.org 2.6.18-53.1.14.el5 #1 SMP Wed Mar 5 11:37:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux [cltbld@moz2-linux64-slave01 ~]$ file /usr/bin/gcc /usr/bin/gcc: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
If that is the case, the reference platform doc is incorrectly instructing us to download the i386 cd images over at https://wiki.mozilla.org/ReferencePlatforms/Linux-CentOS-5.0_64-bit I can build a 64bit version of the RPM tomorrow. Do we manage that one vm with puppet? (I'd assume not)
They're not managed with Puppet yet, no.
Comment on attachment 402665 [details] [diff] [review] ccache for puppet 2 I think you mean /N/centos5/moz-rpms
Attachment #402665 - Flags: review?(bhearsum) → review-
Attached patch puppet for ccache 3 (obsolete) — Splinter Review
Yes, i did mean that.
Attachment #402665 - Attachment is obsolete: true
Attachment #402853 - Flags: review?(bhearsum)
Attachment #402853 - Flags: review?(bhearsum) → review+
Attached file binary rpm for 64-Bit
Binary rpm created on CentOS v5.3 64-bit.
Comment on attachment 402651 [details] [diff] [review] configs-ccache These are the buildbot configs required for ccache on linux and linux64. I have it set up to use ccache on all linux builds that aren't release builds.
Attachment #402651 - Flags: review?(catlee)
Attachment #402651 - Flags: checked-in?
Comment on attachment 402651 [details] [diff] [review] configs-ccache We can't use ccache for code coverage builds.
Attachment #402651 - Flags: review?(catlee) → review-
Assignee: jford → nobody
Component: Release Engineering → Release Engineering: Future
What's left to do on this bug?
Comment on attachment 402661 [details] [diff] [review] custom-ccache-v2 I think if we change this to test if platform == 'linux', we can ignore the linux64 stuff for now.
Attached patch print out ccache stats in builds (obsolete) — Splinter Review
Assignee: nobody → catlee
Attachment #402661 - Attachment is obsolete: true
Attachment #425989 - Flags: review?(nrthomas)
Attachment #425989 - Flags: review?(bhearsum)
Attachment #402661 - Flags: checked-in?
Attached patch buildbot-configs for ccache (obsolete) — Splinter Review
Attachment #382576 - Attachment is obsolete: true
Attachment #402651 - Attachment is obsolete: true
Attachment #425990 - Flags: review?(bhearsum)
Attachment #402651 - Flags: checked-in?
Attachment #425989 - Flags: review?(nrthomas)
Attached patch puppet manifests for ccache (obsolete) — Splinter Review
Attachment #402853 - Attachment is obsolete: true
Attachment #425991 - Flags: review?(bhearsum)
Attachment #402853 - Flags: checked-in?
Comment on attachment 425989 [details] [diff] [review] print out ccache stats in builds This'll cause burning for other consumers of this factory that don't have ccache installed. It'd be better to control this with another arg to MercurialBuildFactory IMHO.
Attachment #425989 - Flags: review?(bhearsum) → review-
Attachment #425991 - Attachment is obsolete: true
Attachment #426006 - Flags: review?(bhearsum)
Attachment #425991 - Flags: review?(bhearsum)
Comment on attachment 426006 [details] [diff] [review] puppet manifests for ccache Looks good to me
Attachment #426006 - Flags: review?(bhearsum) → review+
Comment on attachment 425990 [details] [diff] [review] buildbot-configs for ccache This part is fine, but as you mentioned on, it will need to be updated the buildbotcustom changes that are coming.
Attachment #425990 - Flags: review?(bhearsum) → review-
added an enable_ccache parameter to MercurialBuildFactory that triggers the ccache steps.
Attachment #425989 - Attachment is obsolete: true
Attachment #426374 - Flags: review?(bhearsum)
turn on ccache for linux, linux-debug only.
Attachment #425990 - Attachment is obsolete: true
Attachment #426376 - Flags: review?(bhearsum)
Attachment #426006 - Flags: checked-in+
Comment on attachment 426006 [details] [diff] [review] puppet manifests for ccache changeset: 92:b60a779ee769
Attachment #426374 - Flags: review?(bhearsum) → review+
Attachment #426376 - Flags: review?(bhearsum) → review+
Comment on attachment 426006 [details] [diff] [review] puppet manifests for ccache So the creation of /builds/ccache failed on some of the new ix slaves, because /builds isn't owned by cltbld. Should that be fixed, or should I fix the package to ensure that /builds/ccache is owned and writable by cltbld?
Attachment #426627 - Flags: review?(nrthomas)
Attachment #426627 - Flags: review?(nrthomas) → review+
Comment on attachment 426627 [details] [diff] [review] Update ccache manifest to work on new /builds changeset: 95:eda9f5661e31
Attachment #426627 - Flags: checked-in+
Mass move of bugs from Release Engineering:Future -> Release Engineering. See http://coop.deadsquid.com/2010/02/kiss-the-future-goodbye/ for more details.
Status: ASSIGNED → NEW
Component: Release Engineering: Future → Release Engineering
Priority: -- → P3
Comment on attachment 426374 [details] [diff] [review] print out ccache stats in builds, v2 changeset: 609:0b3ad6bd5a2b
Attachment #426374 - Flags: checked-in+
Comment on attachment 426376 [details] [diff] [review] buildbot-configs for ccache, v2 changeset: 2081:17cd4970c46c
Attachment #426376 - Flags: checked-in+
Still todo: 64-bit linux Will ignore try slaves for now; should be trivial once bug 520227 is done.
(In reply to comment #50) > Still todo: 64-bit linux > > Will ignore try slaves for now; should be trivial once bug 520227 is done. The try slaves sync up to puppet already so I'd be surprised if they don't have ccache yet.
(In reply to comment #51) > (In reply to comment #50) > > Still todo: 64-bit linux > > > > Will ignore try slaves for now; should be trivial once bug 520227 is done. > > The try slaves sync up to puppet already so I'd be surprised if they don't have > ccache yet. Yeah, I meant more in terms of updating the try mozconfigs, factories, etc.
Assignee: catlee → nobody
Moved the 64-bit linux stuff to its own bug (551786).
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Blocks: 572410
Product: mozilla.org → Release Engineering
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: