I'm looking into moving our CI process to a Linux instance on EC2. I've set up Jenkins on an m1.small Ubuntu Linux instance. The GWT compile process (via ant) takes about 60 seconds on our laptops but takes almost ten minutes on the EC2 instance. Granted, our laptops are MacBook Pros with 16GB RAM but even on our old CI server (Windows Server with 2GB RAM and TeamCity), the same process takes less than 2 minutes. Wondering if there's something in the default Linux configuration that might be interfering. I haven't done much to it other than install Jenkins, Apache and git.
We are compiling with localWorkers = 2 and Xmx512M.
Compiling depends more on the CPU as opposed to RAM. EC2 small instance has 1 compute unit. "One EC2 Compute Unit provides the equivalent CPU capacity of a 1.0-1.2 GHz 2007 Opteron or 2007 Xeon processor."
I would not recommend you to compile on there. You can just compile locally and upload there since it is Java and JavaScript and runs everywhere.