yashsingh1/xdaforums huggingface dataset:
[Android] basketthis:
full-eng

aosp jellybean

fx-8120, 8gb ram, 8gb swap

make -j16

real: 34m2.641s

EDIT: about to test some tweaks! will update.
[Android] KBizzle:
Machine: Dell Inspiron 1565

Processor: Intel Core 2 Duo 2.0GHz

Hard Drive: 320GB HDD

RAM: 4GB

OS: Ubuntu 11.04

Current Build Time: 2 1/2 +

Build: CM10 PA Source

Just added ccache. We will see on the next build if I shave some time.
[Android] GopalKaul:
Can someone estimate my build time?

Latest Debian testing,

4 GB RAM 1333MHz, have another , yet to put it in my laptop.

256 GB SSD

2 to 4 GB swap(I don't remember)

Intel i5 2450m

I wanna build LineageOS 15.1

Any ideas if I can? Will adding more 4 GB RAM help? Like with 8 GB RAM and the above specs?
[Android] sgspluss:
Have also i5 2450m with 12gb ram and 200gb hdd, and it takes around 5 hours, building alone takes about 6gb ram so yes would say minimum is 8gb of ram.
[Android] kjjjnob:
Hello! I have some problems. I bought a new MSI laptop, with i5 7300hq, 8gb RAM and 1tb hdd (Lubuntu partition). The build starts at 1PM, here 11PM.. 10 hours and waiting. Im el everythig with ccache and prebuilt -25G, also export 8gb to jack server. Maybe i forgot something? You can tell your commands? Also use 6 jobs on make. Thank you!
[Android] DiamondJohn:
I cut my build time in half (admittedly from <2h down to <1h), by moving different parts of the build onto different spindles (ie HDD) including even using USB removable hard drives. eg: my CCACHE is on my C: dive, a SSD, the out goes to G: drive, my ROM source sits on F: (a removable USB HDD drive). I did this all in the FStab file, as seen below NB: I am running on a windows PC using VBox

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=14d17294-8135-4f0d-b235-e35668cb66b5 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=35e3e562-fb20-44a8-aeff-6e5abc989333 none swap sw 0 0

/dev/sdb /home/diamondjohndroid/android/.ccache ext4 errors=remount-ro 0 1
/dev/sdc /home/diamondjohndroid/android/RR ext4 errors=remount-ro 0 1
/dev/sde /home/diamondjohndroid/android/lineage ext4 errors=remount-ro 0 1
/dev/sdf /home/diamondjohndroid/android/crDroid ext4 errors=remount-ro 0 1
/dev/sdg /home/diamondjohndroid/android/du ext4 errors=remount-ro 0 1

/dev/sdd /home/diamondjohndroid/android/RR/out ext4 errors=remount-ro 0 1
/dev/sdd /home/diamondjohndroid/android/lineage/out ext4 errors=remount-ro 0 1
/dev/sdd /home/diamondjohndroid/android/crDroid/out ext4 errors=remount-ro 0 1
/dev/sdd /home/diamondjohndroid/android/du/out ext4 errors=remount-ro 0 1

As you can also see above, I compile multiple ROMs, and they all share the same OUT device (/dev/sdd) as well. Note also that sdc, sde, sdf, sdg are all on one of three USB removable HDD's, as I am only building one ROM at a time. ie minimising disk thrashing

=================edit=================

a VERY quick rule of thumb, is that if your CPU is not running close to 100%, then either its waiting on your hard drives, or memory or network etc etc. Usually its a HDD in my past experience. ie try and work out WHAT it is that is slowing down the process. If your CPU is running at close to 100% during the whole/most of the build (ignoring single threaded phases for simplicity), then that is probably your bottleneck
[Android] kjjjnob:
Its a good way to speed up building time, but i cant buy a nothing more. I spend a lot of money on this laptop. How many ram you have? I found the problem with the ram, 8GB feel poor for Oreo. Maybe need more than 8. I dont know, but with 5.1-6.0 i dont have any problem :S
[Android] DiamondJohn:
I build on a VirtualBox running on 64bit Windows 7. My PC has 24GB, but I assign 12228MB (ie 12GB) to the Virtual PC, with 95% CPU, Quad core Hypertheaded, all CPU's assigned. Build time around 50min for Oreo.

Look at your disk utilisation/wait times (NB: low memory would result in higher disk IO). Is your CPU running close to 100% for a major part of the build?
[Android] kjjjnob:
Hmm no, the problem is the ram. I assign 4gb for swap and when start building eats all swap and RAM. Cpu stay good. If i do this on a vm on windows 10, sure get poor results.

Also i read bad reviews about hdd performance of my msi model, maybe need wait and add a m2 nvme ssd and 8gb more for RAM (can upgrade to 32)
[Android] sgspluss:
Buildtime on new bought homeserver...

Ubuntu 18.04

2x Intel(R) Xeon(R) CPU E5420 @ 2.50GHz

4x 147GB and 2x 73GB RAID 0 15.000RPM HDDs

8GB DDR3-1600 ECC (PC3-12800)

LineageOS 14.1

#### build completed successfully (01:19:35 (hh:mm:ss)) ####

LineageOS 15.1

#### build completed successfully (02:32:18 (hh:mm:ss)) ####
[Android] DodoGTA:
How much RAM do you have installed?
[Android] sgspluss:
Ouh looks like i forgot it, edited in post and also written here...

Just 8gb at the moment but already ordered 16gb which should arrive in 2-3 days :)
[Android] CosmicDan:
If anybody is using VirtualBox or VMWare but has Windows 10 Pro, I highly recommend switching to Hyper-V. Main advantages are dynamic memory (can shrink and grow) and a more refined CPU scheduler that allows for more CPU utilisation on the guest *and* maintains performance on the host. In VMWare and VirtualBox I always had to cap the CPU allowance as it made the host very slow.

I can do Oreo builds in about an hour now while playing a game in the host at the same time :D

- Core i5 8400, VM is allowed all 6 threads with 100% execution cap (note that I only build with -j8, any more and CPU contention occurs on the host and I can't play any games very well lol)

- 32GB RAM, Max 12GB given to VM

- Ramdisk of 2GB on /tmp

- VHD's are on an Intel 480 SSD, formatted with Btrfs and LZO compression

- CCACHE of 50GB and compression enabled

Also note that you need the latest Windows 10 Pro builds if you want to use Enhanced Linux VM additions (faster UI, copy/paste with guest, stuff like that) and that requires some setup. I use Ubuntu MATE 18.04 personally. I usually just keep the VM minimised, and SSH in with KiTTY to build stuff and do my development and file stuff over a Samba share of my Home folder (using Internal network interface as it's 10gbps vs 1gbps of the external interface used to give it internet connectivity).

I might write a blog article about it.
[Android] schwabe93:
First a Huge Thanks to [MENTION=1844875]CosmicDan[/MENTION] for his great pointer to use Hyper-V for building

I also now started building on my Windows 10 Pro 1903 , Specs:

Amd Ryzen 7 1800x 4Ghz Vm is allowed to use 11 Threads

32 GB RAM VM is allowed to use 16 GB

Im building on a Samsung 860 Evo formatted with Btrfs

And 50 GB Ccache

So now Pie builds are done in 37 Minutes, while i can playing my Games :)
[Android] Divyeshj66:
Hi. If anyone is still active here, I have these specs. Is it possible to build any version of android on Ubuntu 18?

Specs:

-i5 M520 @2Ghz dual core

-4gb ddr3 ram 1333 MHz

-250gb ssd Samsung evo 890
[Android] DiamondJohn:
I do my builds on 18.4 VBox running on Win7 Prof.

Although the SSD will help, it is not going to be fast. as for the 4GB, I have read it is the minimum, but you will probably have to help it along; I don't know personally, as i have plenty of memory.

Also, 250GB sounds big, but its the space remaining that will count. If you run low, you can mount multiple portable USB drives (eg one for source another for out etc etc etc) I actually do that not for space, but to enable parallel reads and writes to speed up the build.
[Android] Princ87:
Hey guys sup i hope you all are doing great.

I am planing to take a laptop.

Specs

Ryzen 5 4600H 6cores/12 threads

Nvidia gtx GeForce 1650 4gb

8gb ram

Can you guys please tell me how much time will it take to build a custom rom locally.
[Android] Wattsensi:
Probably not that much, but you will still have to be patient.

i3 5005U, 8 GB RAM, 500GB 5400 RPM HDD

Last time I tried building ARMv7 LineageOS 15.1 on Arch Linux it took like 2 or 3 hours per build and 200 GB of disk space, I had to disable Jack and allocate 6 GB of swap memory. I also allocated 50GB for ccache which made subsequent builds from scratch take like 2 hour. I had 4 GB of RAM back then.

I am going to build ARM64 LineageOS 18.0 once some needed patches for my device are ready, and I expect it to take around the same time or a bit longer. This time I have 8 GB of RAM and another 8 GB of Swap. You can expect around 3 hours, maybe if you use all your threads. I only have two cores and four threads so that is the bottleneck. I will also install a spare 4 GB module to have 12 GB of RAM, that way I have 20 GB of combined memory to spend.
[Android] ydobhal:
can u kindly help me!

how did u disabled the jack ??i am new to android building also facing outofmemory issue on

ryzen 7 4800h (16cores)

ram 8gb (zram enabled 30gb)

hdd 5400 rpm
[Android] Wattsensi:
edit the build manifest, there is an option to enable jack. you set it to false
[Android] ydobhal:
ohk!!!!! thanks for replying !! I'll do this
[Android] ydobhal:
sorry i'm bothering u again...

I was able to locate manifest folder but not able to find the file i need to edit as u said build manifest

if u dont mind can u pls walk me trough the steps!

A big thanks!
[Android] ObsidianMaximus:
deleted
[Android] DiamondJohn:
Why do you say "VM will be useless"?

Also, people would probably want to know if you are running an SDD. Drive speed has a HUGE effect on build times.
[Android] DiamondJohn:
Last time I built was after I upgraded to 24GB ram. I *THNK* initially that I had actually built when I only had 8GB RAM. It sounds wrong now, but i feel pretty confident that I was first building before I upgraded RAM; but I could be wrong as it was a few years ago now. The more I think of it, I think you need 8GB as a min, so it sounds obviously wrong.:cautious: Maybe try pushing the envelope with 12GB assigned to VM ;)

I have WIn7 64Bit

When I use to build, my system drive, although an SSD, was totally fully. It was only 125GB! The way I got around that limitation was that I had multiple USB drives set up as drives in Virtual Box. One of the advantages I saw was that I could spread the read/writes across multiple spinning mechanical drives, so it could read from one (source) while it was writing to another (output), and hence no disk thrashing as typically expected on mechanical drives.

With Virtual box, creating devices on different USB drives and mounting in Linux, solved the space issue for me. Doing the same in pure linux is also a possible resolution.
[Android] DonalаLeonard:
It is funny in 2024 having ample RAM and a powerful processor greatly improved performance. Looking forward to seeing more results!
[Android] basketthis:
What android os are you building? ICS, gingerbread, aosp, etc? Thanks!

Super Galaxy'd by way of SPH - D710 using xda app.
[Android] basketthis:
Getting a little better results now with some tweaks.

Same specs. Tried to enable ccache (not sure if it's actually working or not). My first try after "enabling" ccache was down to 31min from 34min.

I've now got it to 26min with some tweaking in the bios. I'll try to verify whether my ccache is working or not and repost on the issue.

EDIT: 24min with DOCP, CPU Ratio 18.0.
[Android] KBizzle:
Now with ccache and using -j16

real	75m21.105s

user	84m1.100s

sys	8m30.730s

Big improvement.
[Android] basketthis:
HUGE improvement! :good:

EDIT: Thanks for stopping in and posting your results!
[Android] trevd:
:good: That's fantastic. Is there any more O.C Tips for the FX8120 you can share?.... I'll freely admit to not having a clue on over clocking etc... In my 20 years of playing with tech, This is the first time I've ever had a processor capable and of doing it.

I suppose we're all still noobs at something :eek:

[EDIT]

I Went DOCP with CPU Ratio 18.0. It just Sh*t itself and shutdown half way through a make -j16 ....... Apparently 82°C is not a safe operating temperature. :rolleyes: I'll scale it back a bit and see what I can get away with. Really need some better cooling. I don't think blowing on it is going to help :laugh:
[Android] scootertrashtx:
Compile Computer Specs

AMD Athlon Dual core 4600+,

GeForce 210 PCIe

2GB of DDR2 PC2-6400. Nothing fancy nor overclocked.

I have Linux Mint 13 "Maya" - Cinnamon (64-bit) installed

JB Compile for Skyrocket with -j5 flag

About 5 1/2 hours
[Android] basketthis:
Forgot to mention I have a Corsair H60 (liquid cooler of sorts) on it. I'm running it now at 20.5 DOCP with runs it up to 4100mhz.

Another tip for the FX: when you select DOCP, be sure to select the speed that your ram is rated at. SPECIAL NOTE: the FX deals best at 1600mhz MAX for DDR3 ram. If you go higher, you are out of my league, and frankly asking for trouble! Hope this helps!

EDIT: I'm also using 'make -j32' and it seems to run better/cooler. Gonna run some more test runs and report back.

EDIT 2: Make sure to turn off Turbo Core in the bios.

Also, go to the fan speed settings. You have to change the maximum cpu temp to 60 degrees. So, turn the fan speed to manual and then select 60 for the max. It will speed the fan up sooner allowing you to run cooler. If that doesn't seem to work, try reseating the cpu cooler on the cpu with some new thermal paste. Put a pea size amount in the center of the clean cpu and press the cooler down straight on top. This will allow no air bubbles to be introduced. IIRC, I was able to build with -j16 with no problems (other than my bad ram which was another issue)... So, you should be able to as well.
[Android] scootertrashtx:
UPDATE

Same setup, but switched to "Mint 9 xfce 64bit" (Based on Ubuntu 10.04 LTE)

Changed to -j7, works better on dual core, HyperTransport (1 processor, 2 cores, 2 threads per core)

WAY smoother, runs faster, runs COOLER.

VERY basic GUI, nothing fancy, I disabled background image, no visual effects... Opening with the standard xfce as default, not the Mint xfce.

No need for any of that because most of the work is done in terminal. Occasionally, I log on line to compare notes in the forum and Firefox handles that nicely (even when compiling)

This is the 5th OS I've tested for building and (in MY opinion) the best one for the task. All of the newer builds were quirky with the process. The fancier the GUI, the more trouble there seemed to be with building... I tested both 32 & 64 bit, Ubuntu, Xbuntu, & Mint with both Gnome & xfce...

SO, LESS IS BETTER.

It's a thin install (fits on a CD) and some of the updates had to be added manually, BUT it will prompt you terminal while compiling if a package is missing... It even tells you how to retrieve the package. How cool is THAT!

Done rambling...

Just a FYI thing here. I'm an old, retired guy with a broken leg, got time to experiment with silly things like this. I always like to find the easiest, most efficient way to do things.

Hope this is helpful to SOMEONE. LOL
[Android] basketthis:
Not really much of an update, but just posting some more results.

Running stock speeds for processor, ram, etc. No overclock.

OS is on an ssd hdd. Still 8gb of ram. Other directories are on SATA 1TB.

Building with ccache, from make clean, full-eng, AOSP, using make -j16: 25min

Building with ccache, from make clean, full-grouper, CM10, using make -j16: <20min

I suspect more ram at this point will speed it up a little. But, running stable, stock, I am not complaining!

Pro tip, the ccache directory for JB is in: prebuilts/misc/linux-x86/ccache/ccache

Take a look at your ccache directory with this command (from the build directory, i.e. AOSP/CM10/etc): watch -n1 -d prebuilts/misc/linux-x86/ccache/ccache -s

-n1 sets the time it will refresh in sec.; in this case, 1 sec refresh. Use 2 for 2 sec and so on...

-d will display differences (as the directory is working it will update the hits, misses and other info in a very user-friendly, readable way. Just use it. :))
[Android] Spierbal:
Hey, we both have fairly similiar specs, any particular reason you opted for the -j16 flag instead of -j4 flag? This flag is the fastest and the smoothest for my laptop.

The way I understand is if your CPU supports intel hyperthreading you should multiply by 2, so dual core 2 duo would be j4, i5 would be j8, etc.. Please correct me if am wrong.

Anyway, my specs:

Laptop: Acer Aspire 5920g,

CPU: Intel Core 2 Duo T7300 2.0GHz,

Hard drive: Hitachi HDD - 500 GB - 7200 rpm

Ram: 4GB

OS: Linux Mint 13 "Maya" Cinnamon 64 bit

Also used ccache to speed things up.

Compiled Jelly Bean Evervolv for Bravo, and used this command below.

time make -j4 otapackage

Build times:

real	53m10.963s

user	65m18.389s

sys	4m52.746s

I am fairly happy considering the hardware, and to be honest before I did anything expected much worse...But yeah similar to Kbizzle had huge "gains" with ccache down average of an hour :D
[Android] trevd:
Man, This thread has been a lesson and an inspiration :)

full_wingray-userdebug

AOSP JellyBean ( JRO03L )

AMD FX8120, 16GB Ram.

O.C Settings: D.O.C.P 16.0 Ratio

make -j16

real 28m6.281s

user 165m34.165s

sys 11m16.030s

that's the first time I've been under 30 mins. :)

I decided to give the machine some much needed TLC. I was full of dust and I had a fan that was doing nothing but blowing hot air on to hard drives.

I moved that fan and re-purposed a couple of fans from some old heatsinks I had knocking around to get the air moving a little more. That Improved things slightly but was still getting shutdowns. Turns out my issue was with the Graphics Card, a Radeon HD5870 that I bought second hand off a friend.

The card was running hot and the fan was catching on something, I stripped that down cleaned it and reapplied some thermal paste to where-ever it was needed, which is a lot of places when you open those bad boys up :) . After that the card is running a full 20F cooler ( according the gkrellm ) and the system is pretty stable and running pratically silent.

There's a lesson in here somewhere for the kids :laugh:

A Question about ccache. I'm not sure whether it's working properly. I but I cleaned the cache with -c zero'd my stats before the build. Here's my stats after the build

cache directory /media/android/ccache
cache hit 0
cache miss 11632
called for link 572
not a C/C++ file 355
unsupported compiler option 79
files in cache 2816
cache size 837.4 Mbytes
max cache size 976.6 Mbytes

Obviously the cache hit being at zero stands out as the most obvious thing or am I missing the point completely? Maybe I should just read the Docs

I have to set the following in my .bashrc so I presume it's being used.

export USE_CCACHE=1
export CCACHE_DIR=/media/android/ccache

Thanks Again
[Android] leonlati1:
macbook mid 2010

2.4ghz dual core

8gb ram

using virtual machine which takes up 2gb ram and 1 proccesor.

how long to compile jellybean?
[Android] mg2195:
Well, ram doesn't effect build times much...its mostly CPU power

I have an old custom built pc that is 2.4ghz dual core

4gb ram

I am dual booting (so no virtual box...)

It takes me about 3 hours to build (I don't time it, I usually go.do something and come back 3-4 hours later and hope there was no error :P)
[Android] thewadegeek:
Long time, I'd suggest a dual boot.
[Android] basketthis:
Looks like your ccache is working. On first build, it will fill the ccache directory. On the following builds, you will see ccache being used. That's where you get your "hits".
[Android] KBizzle:
real	14m38.645s

user	50m16.317s

sys	1m49.633s

Brunch -j16

Ccache used
[Android] :
32 Core Intel Xeon Processor (3.2GHz)

48GB RAM

Galaxy Nexus (GSM)(AOSP) : make -j4 otapackage : 8minutes 2 Seconds - full_maguro_userdebug

Galaxy Tab (AOSP) : Forgot command : (9minutes 47 Seconds)

LG Optimus Black : p970_userdebug

: make -j6 otapackage : 4Minutes 4 Seconds
[Android] slick_rick:
i7 2630QM Processor

8GB RAM

500GB HDD

Linux Mint 13

Epic 4G Touch (AOKP) . build/envsetup.sh && brunch d710 (~hour from make clobber && make installclean) (~15 minutes just rebuilding)
[Android] justlovejoy:
I so thought you were burying in builds with your thoughts like a Jedi Android or something. Fifteen minutes is a quick test. So when you say rebuild you mean just install gets cleaned? I've always wondered.
[Android] basketthis:
Now that I think about it, I believe the buildbox is faster...
[Android] captfrank66:
Compile on Dell never Completes, very slow

Machine Specs:

Cell Latitude E6510

Dual boot (win&, Ubuntu 10.04) Using Ubuntu for builds

Intel I7 Core processor 1.73Ghz

8G Memory

100G for Ubuntu

Building Jelly Bean 4.1.2_r1

Build time: unknown just keeps running over a weekend tweaked and still 24hrs and still did not complete. Was able to build one time the emulator one time and it completed I think like 4+ hrs later. Used

$ lunch full_userdebug

Used these directions: I'm a noob can't post link right: source.android.com/ source/ initializing.html

Now I wanted to build for a Nexus S so downloaded the binaries and all and issued the following:

$ make clobber

$. build/envsetup.sh

$ lunch full_toro-userdebug

$ tried both make -j4 and make -j16

The compile is painfully slow. Running system monitor the system in every aspect is hardly being stressed. The make process is in a pipe_wait state.

I have set

export USE_CCACHE=1

export CCACHE_DIR= This is a NFS system. Created it as 100G size.

Any thoughts?

Update: Found problem. The NFS file system was slow/blocking for some reason. Pointed Cache to locale of only 5G and got these results:

real	91m50.065s

user	597m31.300s

sys	35m1.250s
[Android] lithid-cm:
Just a heads up, anything over the amount of your cores is a waste.

make -j$(grep -c ^processor /proc/cpuinfo)

Will do the trick.

Mine:

[lithid@ArchLinux ~]$ grep -c ^processor /proc/cpuinfo
8
[Android] dragondgold:
Jelly Bean on:

HP Pavilion G44-1387la

2.5 GHz 2nd generation Intel Core i5-2450M Processorwith Turbo Boost up to 3.1 GHz (In Ubuntu my maximum frequency was 2.5GHz cannot get 3.1GHz)

4 Gb RAM DDR3 (don't know the speed) and 10Gb swap

5400RPM normal HDD

Ubuntu 12.04 LTS

Compiling Jelly bean (jb-dev) for PandaBoard it is my first build :D

Compiling with make -j4

About 2 hours, 30 minutes :)
[Android] basketthis:
AMD FX-8120

24GB RAM

SSD w/ OS

out/target to hdd

ccache enabled

Android AOSP 4.2.1 full_eng

from repo sync, make clean, using -j32:

14 min

attempting with different -j values. will report results.

-j17 produces build time within margin of error: 14min39secs
[Android] eddydc1:
impressive
[Android] giveen:
AMD Phenom II X3 720 , unlocked to X4 20, clocked at 3.1ghz

8GB RAM

SATA II hard drive

Running -j6

Compile times

Android 4.1.2 = 75 minutes

Android 4.0.4 = 65 minutes

Have nearly enough saved up for a AMD Phenom II X6 1045T
[Android] iHateWebOS:
Amd 64 2.0ghz dual core

2gb ram

6gb swap file

Linux mint 13

4g connection via WiFi tether app

Used -j4

Compile time for pacman jellybean ROM: 246 minutes
[Android] giveen:
Got ccache figure out compile time down to 24 minutes
[Android] Duarte777:
My specs:

- intel core i3 2.20 ghz.

- 4 GB Ram.

- Ubuntu 12-04 LTS, dual-boot with w8.

It takes more or less than 2 hours, building Paranoid and cm10
[Android] giveen:
So its been stated that setting -jX to more cores than what you have is a waste, and I would agree except the stats don't show that way for me.

Using -j4 and CCACHE

Build time for Android 4.1.2 = 27 minutes

Using -j6 and CCACHE = 24 minutes
[Android] basketthis:
Remember when using ccache, it's especially important to issue 'make clobber' and 'make clean' after you make changes and before you build your next time...
[Android] giveen:
Yup
[Android] h2on0:
AOKP Jelly Bean MR Build 1 for toro.

Linux Mint 14 (brand new install)

No ccache, make clean && make clobber.

time make otapackage -j9

real	26m46.272s

user	174m16.654s

sys	7m27.340s

i7 3770k @ 4.4ghz

16gb memory @ 2200mhz

120gb samsung 840 ssd.

I don't know if it is just me but 4.2 builds take a couple minutes longer than 4.1 builds did.