An update.
This only works upto AOSP 10.

Does not work with AOSP 11. I am trying out this article

https://ilyas-hamadouche.medium.com/trying-out-android-automotive-3db89808636e

And nothing works.

I tried setting some Vm args with some info from this article.
http://ronubo.blogspot.com/2020/03/building-aosp-for-weak-machines-post.html
droiddoc.go:            Flag("-J-Xmx6144m").
droiddoc.go:            Flag("-J-Xmx6144m").
droiddoc.go:            cmd.Flag("-J-Xmx6144m").

I also used -j1. But nothing helped !

I hope AOSP will provide a way to disable the documentation build part of
it. Can someone from Google help me out here..?

Kind Regards
Ravishankar

On Thu, Jun 10, 2021 at 7:29 AM Igor Kukushkin <[email protected]> wrote:

> Hi,
> what was the overall compilation time though, Mr. Ravishankar? (Also, what
> branch/tag, board and make target were used?)
>
> For those who is limited with resources, It can be stripped even more,
> (one can save ~16gb by removing .repo dir, some memory can be recovered by
> using zram/compressed swap, and couple more gbs can be saved by using btrfs
> with compression set to zstd=3,
>    mount ... -o compress=zstd:3
>    btrfs property set /build/aosp/out compression ""
> To get some extra boost to compilation speed (in this configuration it'll
> be more about preventing CPU choking), pass "mitigations=off selinux=0
> audit=0" as kernel options and reboot; to run builds, try to stay lean
> (make snod, m - ok, make all - not ok since it'll build some tests).
>
> And since this is not super obvious for some people, -Xmx4g is required in
> this case because Java won't allocate enough heap without it, if there's
> not enough physical memory. To investigate what takes time, one can open
> build trace:
> > Just open $OUT_DIR/build.trace.gz in Chrome’s chrome://tracing,
>
> Enjoy,
>
> On Wed, Jun 9, 2021 at 4:25 AM Ravishankar S <[email protected]>
> wrote:
>
>> I have completed by AOSP build on a 4 core 8GB machine with the following
>> specs:
>>
>> Ryzen 3 3300u, 1TB HDD, 8GB Dual channel RAM.
>> Usable is 5.81G when fully booted into Kubuntu 20.04 (no apps running)
>>
>> 1) FIrst enable the zram on you system and reboot: sudo apt install
>> zram-config.
>>
>> 2) Default swapfile size is 2G. Its barely sufficient for the initial
>> soong_ui phase.  Just scraped through. It should be increased to least 4GB.
>> If you have the swapfile on SSD or  can move it to an SSD then its even
>> better.
>>
>> (For sure this phase takes a lot of RAM (~12G) and lots of disk IO. It
>> will take more time than normal as there is lots of swapping)
>>
>> 3)  Still in case the soong_ui phase does not get through then you can
>> try to reduce  reduce the number of jobs say m -j3 or m -j2.
>>
>> 4) The next phase is just compilation and other stuff that is not RAM
>> intensive but mainly CPU and some Disk I/O. You can speed up this phase
>> slightly by using tmfs for the /tmp folder.
>>
>> 5) The last phase is the documentation where Java is used and for this no
>> amount of swap space will help and the system will crash for sure. We have
>> the use the solution provided here and restart the make with just 1 job (m
>> -j1)
>>
>>
>> https://stackoverflow.com/questions/60468693/java-outofmemoryerror-when-building-aosp-10/60474592#60474592
>>
>> export _JAVA_OPTIONS="-Xmx4g"
>>
>> You can try to use m-j2 but it seemed fast enough with m -j1 and less
>> pressure on RAM.
>>
>> Other resources are: 110GB disk space after checkout and 170GB after
>> build.
>>
>>
>>
>>
>> --
>> --
>> You received this message because you are subscribed to the "Android
>> Building" mailing list.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/android-building?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Android Building" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/android-building/bc27d026-a038-46c1-9143-c745e40a3b65n%40googlegroups.com
>> <https://groups.google.com/d/msgid/android-building/bc27d026-a038-46c1-9143-c745e40a3b65n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Android Building" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-building/5G2l5JR3jWE/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/CAK-rsLK%3Dg73oJBNvT_8XYq3Zwpm2oY-0%2BZK6rY9y4wGWFpJOvg%40mail.gmail.com
> <https://groups.google.com/d/msgid/android-building/CAK-rsLK%3Dg73oJBNvT_8XYq3Zwpm2oY-0%2BZK6rY9y4wGWFpJOvg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAAR8BJXsekfPGMz2dgxmY%3Dzf%3D7EZ%2B1_qzP6aV13Migf_sT6mpQ%40mail.gmail.com.

Reply via email to