It is a balance, I see it as a set aside, so if I set 15 G /16G I might force more use of SWAP, you can adjust swappiness, but it probably also depends on whether you have ccache on SSD and other things. So my setting is 9G / 32G RAM plus > 32 G Swap both on Solid State – I tried different numbers, then never changed it when I had no errors. It is about a fix for “Java heap space” errors, if you see them.
as to JACK_VM_ARGS: JACK got deprecated long before Android 10 - you can check if it is running in the process list during build still. It used to accelerate java compilation. Assigning half your system memory to JACK if you build an Android release that uses it (until Oreo).
as said - assign 50% to max 75% of system memory to the java build stage, rest for system filecache
Talkback is an accessibility help for blind users, VOSK is a on-device speech-to-text engine (actually works pretty well)
avoid swapping, it’s just there to keep processes from crashing and allow for low memory builds. In doubt reduce nproc / parallel cores used → builds can end up finishing earlier than using more cores that need to swap often.
@make-nz I never experimented with zRam, my small amount of experience is with a very low spec (6G then 8G RAM) laptop and then much more recently a recycled relic i7 32G powered workstation.
I had totally forgotten till mentioned by @tcecyk that my use of EOS_ANDROID_JACK_VM_ARGS had been something of an experiment.
It will be interesting to discuss! I never did get used to JACK especially when I read it was deprecated in Android 10. I had got used to:
In ~/.bashrc type
export _JAVA_OPTIONS=-Xmx5g
I see that being picked up, and if watching your monitor can see when it is needed. (My estimate 5 -7 G for starters with 16 G RAM – if you start low, you will see the error and do your own logic.)
What I do not know is how docker manages to use JACK !
Seeing other docker builders including it I had hashed out my ~/.bashrc entry.
@aibd, do i need to add vendor/e/ from steadfasterFX in the local manifest because this error ?
antec@antec-p6-2038fr:~/android/e/R$ source build/envsetup.sh > envsetup_01.txt
bash: /home/antec/android/e/R/vendor/extendrom/get_prebuilts.sh: Aucun fichier ou dossier de ce type
or simply and fastidiously create a vendor/extendrom/get_prebuilts.sh ?
envsetup_01.txt say : including device/samsung/serranoltexx/vendorsetup.sh
.
awaiting some inputs on this subject, i tried a “classic” MINIMAL_APPS build, but with the same result as for the precedent “normal” FULL_APPS build :
Out of space? Out of inodes? The tree size of /home/antec/android/e/R/out/soong/.temp/tmp9wfvCO is 1909398528 bytes (1820 MB), with reserved space of 0 bytes (0 MB).
The max image size for filesystem files is 1572864000 bytes (1500 MB), out of a total partition size of 1572864000 bytes (1500 MB).
Sorry to miss the live event ! As output size is unchanged I have to think that MINIMAL_APPS was not applied ?
Yes you do, otherwise nothing with a EOS_ can happen.
Did your /e/ build rewrite your device.xml with a roomservice.xml, if yes we can say that is a good manifest – then two more projects in your proposed build:
It was as I was learning to set up vendor_e properly that I depended on envsetup.txt and breakfast output to see that my environment was correct. My last envset.txt https://paste.tchncs.de/upload/falcon-crow-eagle
(Unexplained, but I found that you should get the environment right before you call envset.txt)
I find you have to be fussy with consistent use of “quote marks” for variables.
Interesting footnote envsetup.txt confirms the use of
Did not get the workstation with 32gb yet, so I may go with 8gb and older i7 for now too…
Found this on github, also recommendations for zram there
Workarounds for building Q on 8GB RAM environment:
At the start of the build:
[ 99% 138/139] /mnt/ssd/aosip/out/soong/.bootstrap/bin/soong_build /mnt/ssd/aosip/out/soong/build.ninja
This used to take around 30mins, after enabling zram now it takes around 30secs (thanks to @kdrag0n for the zram idea) which is on par with what happens in 16GB RAM building environments
sudo apt install zram-config for installing zram-config package
sudo nano /etc/fstab and add a # in front of the swap disk if you have one and then reboot
After booting cat /proc/swaps to check if zram is enabled or not
To avoid huge metalava compilation times, compile the api-stubs-docs and other packages manually first then continue with mka bacon etc
For example this is what I’m using now in aosip:
. build/envsetup.sh && lunch aosip_wayne-userdebug && mka api-stubs-docs && mka hiddenapi-lists-docs && mka system-api-stubs-docs && mka test-api-stubs-docs && mka kronic
Each of those api-stubs-docs, hiddenapi-lists-docs etc took around 4-7 mins
Increasing of heap from soong directory or other env exports are not required
Total combined build time in my system (Ryzen 1600 with a 8gb ddr4 stick) is around 2hrs now compared to 5hrs previously
For errors while building metalava check #metalava
Workarounds for building R on 8GB RAM environment:
At the start of the build:
[ 99% 138/139] /mnt/ssd/lineage/out/soong/.bootstrap/bin/soong_build /mnt/ssd/lineage/out/soong/build.ninja
This used to take around 30mins, after enabling zram now it takes around 30secs (thanks to @kdrag0n for the zram idea) which is on par with what happens in 16GB RAM building environments
sudo apt install zram-config for installing zram-config package
sudo nano /etc/fstab and add a # in front of the swap disk if you have one and then reboot
After booting cat /proc/swaps to check if zram is enabled or not
To avoid huge metalava compilation times, compile the api-stubs-docs and other packages manually first then continue with mka bacon etc
For example this is what I’m using now in LineageOS:
. build/envsetup.sh && lunch lineage_joyeuse-userdebug & mka api-stubs-docs & mka module-lib-api-stubs-docs & mka system-api-stubs-docs & mka test-api-stubs-docs & mka bacon
Each of those api-stubs-docs, module-lib-api-stubs-docs etc took around 4-7 mins
Increasing of heap from soong directory or other env exports are not required
sorry guys, i feel that my eyes are too tired…
interested by zRAM, lost in steadfasterFX documentation and no more understanding forein language (english nor linux)
i will stop for now with building and PC
and probably come back sunday evening
even following the forum from far on my s4mini during the childs’s week-end.
In CUSTOM_SLIM-bacon Post #1 you will see I did extra minimal apps a different way by editing /vendor/lineage/config/common.mk – If you experiment with this method you would not need to call or setup extendrom.
that’s a neat workaround, just compiling those repos first. But if it catches on you’ll juggle more and more of them. I did pickup on hardcoded metalava heap sizes before for low mem builders - and how to set your own - [UNOFFICIAL BUILD] Samsung Galaxy S6 (zerofltexx) - #59 by tcecyk
I also see secondhand 16GB DDR3 DIMM go for < 20€, making zram or soong edits moot
And as my 5 year old was looking for some stuff I saw my old PC stowed away long time ago:
Operating System: KDE neon
Processors: 4 × AMD A6-5200 APU with Radeon™ HD Graphics
Memory: 11.1 GiB of RAM
Graphics Processor: AMD KABINI
Manufacturer: Hewlett-Packard
Will go with 2 × 320Gb SSDs in a zfs - stripe, zRam, try docker and as you know I also like older Samsung’s, so maybe we get to work on those together…
Got it to 16Gb RAM and just a single 500Gb SSD; minimal Ubuntu 22.04 Server and Docker from snaps
$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e3d1ecb2cba4 registry.gitlab.e.foundation:5000/e/os/docker-lineage-cicd:community "/bin/sh -c /root/in…" 8 hours ago Up 8 hours goofy_jemison
make@hp-s1:~$ sudo docker attach e3d1ecb2cba4
... A new version of repo (2.36) is available.
... You should upgrade soon:
cp /srv/src/R/.repo/repo/repo /usr/local/bin/repo
>> [Sat Sep 16 06:41:07 UTC 2023] Starting build for jactivelte, v1.14-r branch
>> [Sat Sep 16 06:41:07 UTC 2023] ANDROID_JACK_VM_ARGS=-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx16G
>> [Sat Sep 16 06:41:07 UTC 2023] Switch to Python2
@piero Docker-Way for this device went through, I got a build (my first) So thanks to the Team who put all this together!
As my old AMD A6-5200 is a mobile quad-core SoC for low-end laptops from 2013,
I did not think it would make it — well at least I got it up to 16Gb Ram.
I could write a tiny howto, on how I put the system together — minimal Ubuntu Server 22.04 + Docker from Snaps!?
[Sat Sep 16 23:34:24 UTC 2023] Moving build artifacts for jactivelte to ‘/srv/zips/jactivelte’
[Sat Sep 16 23:34:37 UTC 2023] Finishing build for jactivelte
[Sat Sep 16 23:34:37 UTC 2023] Cleaning source dir for device jactivelte
23:34:42 ************************************************************
23:34:42 You are building on a machine with 15.1GB of RAM
23:34:42
23:34:42 The minimum required amount of free memory is around 16GB,
23:34:42 and even with that, some configurations may not work.
23:34:42
23:34:42 If you run into segfaults or other errors, try reducing your
23:34:42 -j value.
23:34:42 ************************************************************
23:35:46 Entire build directory removed.
in “nmon”, i only see activity on my main Hard Drive sdc1 (/) and sdc3 (swap). i don’t see any activity on my dedicated to /e/build Hard Drive sdb1 (where sources are stored) is it because it is mounted in “/home/antec” ( for permissions reasons) and not to directly “/” ? do ineed to mount it directly to “/” ( but with user permissions)
In general one would attempt a first build where the available components for the whole project were the same Android version. Then Android version can be set with repo init.
You did your research, so I should assume it is correct.
Here is an example where I attempted to mix revisions
in my local_manifest, i have deleted reference to the two additional devices covered by the build codename but with outdated branch (serranoltespr and serranolteusc) because repo sync stay stuck for a while at 99% related to those devices