[cfe-dev] my gsoc proposal: llvm/clang distcc

Marshall Clow marshall at idio.com
Mon Apr 7 16:25:39 PDT 2008


At 12:53 PM -0700 4/7/08, Devang Patel wrote:
>Peter,
>
>On Apr 7, 2008, at 7:34 AM, Peter Neumark wrote:
>
>>      The development will be done incrementally, from the simplest 
>>  solution to more complex.
>>      The simplest solution is when all source parsing task is done 
>>  locally and the built AST
>>      is distributed to Node for optimization and code generation and 
>>  it sends the result back when its done.
>
>This is  indeed a good first step.
>
>However, couple of points to note while designing new distributed 
>build system from scratch.
>
>In general, preprocessing source file consumes significant portion of 
>total compile time.  If local host is tasked to preprocess all source 
>files then it becomes bottleneck.

In practice, that appears not to be the case - at least not for 
number of hosts < 10.

>GCC uses PCH mechanism to reduce compile time locally. If distributed 
>build system distributes the GCC PCHes then it is likely to flood the 
>network (because GCC PCH size is significantly larger then source 
>files) which may have an impact on scalability.
>
>The ideal solution 1) does not impose significant compilation related 
>duties on the local host, 2) does not incur huge network traffic 
>during job distribution and 3) let local host focus on efficient 
>distribution of tasks and collection of results.

Yep. I don't know of such a solution, though.

>  >     An advanced solution is when a file sharing protocol is used to 
>>  share local source files (for including)
>>      and then parsing is done in Node side and file including is done 
>>  via the file sharing protocol.
>
>IMO, such setup would work well in an environment where available of 
>Nodes is stable.
>
>One variation of this advanced solution would be to just distribute 
>build instructions (command line flags etc...), source file names and 
>project source repository revision number (e.g. svn rev. number) to 
>the Nodes and let the Nodes get project source files from the 
>repository directly. This would free local host from duty of 
>distributing files and take advantage of existing bandwidth provided
>by source code repository server.

The problem with this idea is that somehow the distributing machine 
would have to figure out exactly which files were needed to compile 
the file. Doing that would require effectively preprocessing the file 
to generate such a list. _And_ then the target machine would have to 
get all those files from the repository.

Also, this would require programmers to check source into source 
control in order to compile it.
-- 
-- Marshall

Marshall Clow     Idio Software   <mailto:marshall at idio.com>

It is by caffeine alone I set my mind in motion.
It is by the beans of Java that thoughts acquire speed,
the hands acquire shaking, the shaking becomes a warning.
It is by caffeine alone I set my mind in motion.



More information about the cfe-dev mailing list