3

When building our current project the GWT compiling needs quite a large amount of the overall time (currently ~25min overall, 2/3 gwt compile). We reserched how to optimize that (e.g. here) however in the end we decided to buy a new build server. GWT compiling is a quite CPU intensive task so we did some tests to analyze the improvement per core:

  • 1 cores = 197s
  • 2 cores = 165s
  • 3 cores = 149s
  • 4 cores = 157s (can be that the last core was busy with other tasks)

Judging from those numbers its seems that adding more cores doesn't necessarily improve performance since those numbers seem to flatten.

1.) So now i would be interessted if someone of you can confirm / disprove that? So 8 or 12 cores doesn't necessarily make a difference - but the individual cpu speed (mhz) does?

2.) After seeing some benchmarks our sales tend to buy *ntel xeon - any experience with AMD? (I am more of an AMD guy however currently it seems hard to disregard the benchmarks)

3.) Any other suggestions regarding memory, IO etc are welcome

Update: When we get the new server I'll post the updated numbers...

Community
  • 1
  • 1
Lonzak
  • 9,334
  • 5
  • 57
  • 88
  • 1
    Did your tests include tweaking [gwt.compiler.localWorkers](http://mojo.codehaus.org/gwt-maven-plugin/compile-mojo.html#localWorkers)? – rzymek Nov 07 '13 at 15:33
  • Wie are using GWT 2.5 which is using all available cores by default (at least I think it does, judging by the taskmanager) The test was then done by using local workers... – Lonzak Nov 07 '13 at 19:36
  • There will be a lot of Disk-IO while compiling. You should consider buying a small Raid of two SSDs for the build-dir. – Christian Kuetbach Nov 07 '13 at 20:44
  • 1
    Additionally, the more threads that are going at a time, the more memory and IO that is going on. The slowdown after 3 cores is almost certainly due to the other workers saturating your memory/io, and having to wait while the other cores get their data first. – Colin Alworth Nov 07 '13 at 21:34
  • 3
    @Lonzak: gwt-maven-plugin uses `Runtime.getRuntime().availableProcessors()` by default for `gwt.compiler.localWorkers`, but GWT by itself defaults to `1`; so it depends how you launch the GWT compiler. – Thomas Broyer Nov 07 '13 at 21:53
  • @Thomas I am not sure i fully understand: Since we are using the gwt-maven-plugin, all cores should be used, right? – Lonzak Nov 08 '13 at 08:19
  • @Lonzak Yes, that's what I said. – Thomas Broyer Nov 08 '13 at 16:22
  • Raw cpu speed (GHz) makes a huge difference. Faster IO will make a smaller difference. – Καrτhικ Nov 18 '13 at 16:47
  • Have you tried VM arguments while GWT compilation `-Xmx612m -XX:MaxPermSize=1024m` – Braj Mar 16 '14 at 15:04
  • As you add cores, are you looking at your CPU usage? Do they all remain pegged? If your processes are waiting on I/O (which I'm sure there is a fair amount of this) a simple disk tower with striping enabled could significantly improve performance. Or maybe your system is becoming memory bound? Without knowing where your bottleneck is, it is difficult to say what the fix is. – ChileAddict - Intel Mar 28 '14 at 22:32

1 Answers1

2

We are using an AMD FX-8350 (@4.00 Ghz) with a Samsung 830 Pro SSD. and we've set localWorkers=4 as well as -Xmx2048m. Previously we used a Intel XEON E5-2609 (@2.40 Ghz). That reduced compilation time from ~440s down to ~310s.

So we also experienced that raw CPU speed matters most in case of a single compilation process (with localWorkers=4). In case of multiple compilation processes running at the same time on this machine a SSD improves the IO wait time which increases with the count of concurrent compilation processes.

Our current hardware supports up to 4 maven builds at the same time (each one with localWorkers=4) and uses then up to 20GB of RAM. With the increasing count of concurrent builds the build time increases. But it is not a linear increase, so we try to reduce the idle time in periods where not all resources are used by a single maven process (Java class compiling, tests, ...).

As we compared the hardware prices, we decided to buy a consumer PC used as a slave in our Jenkins buildfarm. The overall price is much cheaper than server hardware and can easily replaced with a new one in case of a hardware failure.

foxylion
  • 393
  • 1
  • 13