llamacc processes compete for CPU, especially while running gcc -MM
to detect dependencies. Use a semaphore on the connection to the
daemon to limit how many may execute concurrently in order to thrash
the CPU less and allow jobs to get into AWS more efficiently. We
implement this by blocking when we open a connection to the server,
and dropping/releasing the semaphore on entry/exit to
InvokeWithFiles to allow another worker to make progress.
llamacc processes compete for CPU, especially while running
gcc -MM
to detect dependencies. Use a semaphore on the connection to the daemon to limit how many may execute concurrently in order to thrash the CPU less and allow jobs to get into AWS more efficiently. We implement this by blocking when we open a connection to the server, and dropping/releasing the semaphore on entry/exit toInvokeWithFiles
to allow another worker to make progress.