# Building AOSP with Cluster / Multiple Servers



## TuxDroid (Apr 19, 2012)

Does anyone have any suggestions about how to setup a distributed build environment for AOSP? I would like to spread the load of building around on several different servers... not sure if a cluster or something along the lines of distcc could be used.


----------



## JBirdVegas (Jun 11, 2011)

I don't know about distributing the cpu load but you can separate the read and write operations to two different SSDs or an array would work just as well I suppose. This is done by
export $OUT=~/SSD_NO_2/android/output/

but not sure about the cpu load sharing


----------



## TuxDroid (Apr 19, 2012)

Thanks! Anyone else have any ideas?

Sent from my Galaxy Nexus using Tapatalk 2


----------



## sixstringsg (Jul 29, 2011)

Distcc would not work due to the amount of Java that is built. Are you wanting to do one build across multiple servers, or do multiple builds faster?


----------



## yarly (Jun 22, 2011)

If you were thinking of getting a bunch of old boxes and networking them to do this, I don't think it would be very effective, even if it were somehow possible for Android. It would take an entire room of pentium 3 and 4s to out perform a newer Xenon or i7 CPU with significant ram + ramdisk. Even on my dedicated build box (a core2 q6600 with 8gb ram) jellybean still compiles rather fast after the initial slower build the first time to get things stored into ccache.

As already mentioned, Android is like a mishmash of various code types which complicates things.


----------



## TuxDroid (Apr 19, 2012)

I want to do one build across multiple servers. None of them are weak, I just wanted to know how to do it.

Sent from my Sony Tablet S using Tapatalk 2


----------

