Repository navigation
Bug 2070106 - Use 4 threads by default when running grcov. - #3079
Open
nicolas-guichard wants to merge 1 commit into
Open
nicolas-guichard wants to merge 1 commit into
nicolas-guichard wants to merge 1 commit into
Conversation
Collaborator
|
Should we use a different kind of instance that has more memory and fewer CPUs? |
Contributor
Author
|
If I read correctly we are currently using c2-standard-8 machines, ie 8 vCPU/32 GiB RAM @ 0,417616 $US/h. |
Some Firefox code coverage artifacts are huge (up to almost 3 GiB for
some JSVM info files) and the grcov producer fully loads them in
memory to send them to the consumers.
By default grcov uses as many consumers as the machine has got threads,
that's way too many and leads to lock contention (in add_results) and
huge memory consumption.
Using the coverage artifacts from 1137460458364499c6788a3f8ac9836a086bb04b,
on my machine going down to 4 threads gets the peak RAM usage down to
25 GiB with a reasonable run time:
```
time -v grcov --threads 4 \
--ignore-parsing-error \
-t covdir \
-s firefox \
--ignore-not-existing \
ccov-artifacts/* \
> /dev/null
User time (seconds): 2357.67
System time (seconds): 288.88
Percent of CPU this job got: 337%
Elapsed (wall clock) time (h:mm:ss or m:ss): 13:03.12
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 25340076
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 4
Minor (reclaiming a frame) page faults: 122990948
Voluntary context switches: 800355
Involuntary context switches: 23554
Swaps: 0
File system inputs: 150660064
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
```
nicolas-guichard
force-pushed
the
push-lkrsuvsvoytr
branch
from
November 19, 2026 10:25
c7c96e3 to
d1ee329
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bugzilla URL: https://bugzilla.mozilla.org/show_bug.cgi?id=2070106
Some Firefox code coverage artifacts are huge (up to almost 3 GiB for some JSVM info files) and the grcov producer fully loads them in memory to send them to the consumers.
By default grcov uses as many consumers as the machine has got threads, that's way too many and leads to lock contention (in add_results) and huge memory consumption.
Using the coverage artifacts from 1137460458364499c6788a3f8ac9836a086bb04b, on my machine going down to 4 threads gets the peak RAM usage down to 25 GiB with a reasonable run time: