Closed
Bug 496901
Opened 16 years ago
Closed 15 years ago
Deploy ccache on all linux build machines
Categories
(Release Engineering :: General, defect, P3)
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
Updated•16 years ago
|
Assignee: nobody → lsblakk
Status: NEW → ASSIGNED
Comment 1•16 years ago
|
||
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.
Reporter | ||
Comment 2•16 years ago
|
||
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.
Reporter | ||
Comment 3•16 years ago
|
||
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.
Comment 4•16 years ago
|
||
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
Comment 5•16 years ago
|
||
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?
Comment 6•16 years ago
|
||
(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.
Comment 7•16 years ago
|
||
(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.
Comment 8•16 years ago
|
||
Source RPM for rebuilding
Comment 9•16 years ago
|
||
binary rpm build with gcc4.1.1
Comment 10•16 years ago
|
||
rpms are created. I don't know how to deploy using puppet but would be willing to learn.
Assignee: jford → nobody
Updated•16 years ago
|
Assignee: nobody → jford
Comment 11•16 years ago
|
||
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)
Comment 12•16 years ago
|
||
Updated patch, cache locations set only for linux
Attachment #382575 -
Attachment is obsolete: true
Attachment #402628 -
Flags: review?(catlee)
Reporter | ||
Comment 13•16 years ago
|
||
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-
Comment 14•16 years ago
|
||
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 15•16 years ago
|
||
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-
Comment 16•16 years ago
|
||
Changes to buildbot-configs that are needed to roll this out
Comment 17•16 years ago
|
||
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.
Comment 18•16 years ago
|
||
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)
Comment 19•16 years ago
|
||
Changed the location of the package
Attachment #402623 -
Attachment is obsolete: true
Attachment #402665 -
Flags: review?(bhearsum)
Reporter | ||
Comment 20•16 years ago
|
||
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+
Comment 21•16 years ago
|
||
Yep, that was intentional. The buildbot-configs patch does have the configuration changes needed for Linux 64
Comment 22•16 years ago
|
||
Do we need a different RPM for the 64-bit machines?
Comment 23•16 years ago
|
||
i was under the impression that the 64bit machines were running 32bit operating systems and we are cross compiling Firefox
Reporter | ||
Comment 24•16 years ago
|
||
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
Comment 25•16 years ago
|
||
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)
Comment 26•16 years ago
|
||
They're not managed with Puppet yet, no.
Comment 27•16 years ago
|
||
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-
Comment 28•16 years ago
|
||
Yes, i did mean that.
Attachment #402665 -
Attachment is obsolete: true
Attachment #402853 -
Flags: review?(bhearsum)
Updated•16 years ago
|
Attachment #402853 -
Flags: review?(bhearsum) → review+
Comment 29•16 years ago
|
||
Binary rpm created on CentOS v5.3 64-bit.
Updated•16 years ago
|
Attachment #402853 -
Flags: checked-in?
Comment 30•16 years ago
|
||
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?
Updated•16 years ago
|
Attachment #402661 -
Flags: checked-in?
Reporter | ||
Comment 31•16 years ago
|
||
Comment on attachment 402651 [details] [diff] [review]
configs-ccache
We can't use ccache for code coverage builds.
Attachment #402651 -
Flags: review?(catlee) → review-
Updated•16 years ago
|
Assignee: jford → nobody
Component: Release Engineering → Release Engineering: Future
Reporter | ||
Comment 32•16 years ago
|
||
What's left to do on this bug?
Reporter | ||
Comment 33•16 years ago
|
||
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.
Reporter | ||
Comment 34•16 years ago
|
||
Assignee: nobody → catlee
Attachment #402661 -
Attachment is obsolete: true
Attachment #425989 -
Flags: review?(nrthomas)
Attachment #425989 -
Flags: review?(bhearsum)
Attachment #402661 -
Flags: checked-in?
Reporter | ||
Comment 35•16 years ago
|
||
Attachment #382576 -
Attachment is obsolete: true
Attachment #402651 -
Attachment is obsolete: true
Attachment #425990 -
Flags: review?(bhearsum)
Attachment #402651 -
Flags: checked-in?
Reporter | ||
Updated•16 years ago
|
Attachment #425989 -
Flags: review?(nrthomas)
Reporter | ||
Comment 36•16 years ago
|
||
Attachment #402853 -
Attachment is obsolete: true
Attachment #425991 -
Flags: review?(bhearsum)
Attachment #402853 -
Flags: checked-in?
Comment 37•16 years ago
|
||
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-
Reporter | ||
Comment 38•16 years ago
|
||
Attachment #425991 -
Attachment is obsolete: true
Attachment #426006 -
Flags: review?(bhearsum)
Attachment #425991 -
Flags: review?(bhearsum)
Comment 39•16 years ago
|
||
Comment on attachment 426006 [details] [diff] [review]
puppet manifests for ccache
Looks good to me
Attachment #426006 -
Flags: review?(bhearsum) → review+
Comment 40•16 years ago
|
||
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-
Reporter | ||
Comment 41•16 years ago
|
||
added an enable_ccache parameter to MercurialBuildFactory that triggers the ccache steps.
Attachment #425989 -
Attachment is obsolete: true
Attachment #426374 -
Flags: review?(bhearsum)
Reporter | ||
Comment 42•16 years ago
|
||
turn on ccache for linux, linux-debug only.
Attachment #425990 -
Attachment is obsolete: true
Attachment #426376 -
Flags: review?(bhearsum)
Reporter | ||
Updated•16 years ago
|
Attachment #426006 -
Flags: checked-in+
Reporter | ||
Comment 43•16 years ago
|
||
Comment on attachment 426006 [details] [diff] [review]
puppet manifests for ccache
changeset: 92:b60a779ee769
Updated•16 years ago
|
Attachment #426374 -
Flags: review?(bhearsum) → review+
Updated•16 years ago
|
Attachment #426376 -
Flags: review?(bhearsum) → review+
Reporter | ||
Comment 44•15 years ago
|
||
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?
Reporter | ||
Comment 45•15 years ago
|
||
Attachment #426627 -
Flags: review?(nrthomas)
Updated•15 years ago
|
Attachment #426627 -
Flags: review?(nrthomas) → review+
Reporter | ||
Comment 46•15 years ago
|
||
Comment on attachment 426627 [details] [diff] [review]
Update ccache manifest to work on new /builds
changeset: 95:eda9f5661e31
Attachment #426627 -
Flags: checked-in+
Comment 47•15 years ago
|
||
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
Reporter | ||
Comment 48•15 years ago
|
||
Comment on attachment 426374 [details] [diff] [review]
print out ccache stats in builds, v2
changeset: 609:0b3ad6bd5a2b
Attachment #426374 -
Flags: checked-in+
Reporter | ||
Comment 49•15 years ago
|
||
Comment on attachment 426376 [details] [diff] [review]
buildbot-configs for ccache, v2
changeset: 2081:17cd4970c46c
Attachment #426376 -
Flags: checked-in+
Reporter | ||
Comment 50•15 years ago
|
||
Still todo: 64-bit linux
Will ignore try slaves for now; should be trivial once bug 520227 is done.
Comment 51•15 years ago
|
||
(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.
Reporter | ||
Comment 52•15 years ago
|
||
(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.
Reporter | ||
Updated•15 years ago
|
Assignee: catlee → nobody
Reporter | ||
Comment 53•15 years ago
|
||
Moved the 64-bit linux stuff to its own bug (551786).
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•12 years ago
|
Product: mozilla.org → Release Engineering
You need to log in
before you can comment on or make changes to this bug.
Description
•