Microbenchmarking Google's Mirror of Maven Central
Here's a breakdown of benchmarking Maven Central vs Google Cloud storage.
Join the DZone community and get the full member experience.Join For Free
Last week, Takari announced that Google is Maven Central's New Best Friend. While writing a news article about this for InfoQ, I decided to run a small test to see the speed of the default Maven Central versus the new Google Cloud Storage instance. This micro benchmark didn't seem worthy of including in the article, but I think it's interesting to see the speed improvements I found.
rm -rf ~/.m2/repository, then
mvn install with the default repository configured. I ran the commands again with Google Cloud Storage. I found that the downloading of dependencies, compilation and running unit tests on AppFuse's web projects averaged 4 minutes, 30 seconds. With Google Cloud Storage, the same process averaged 3 minutes and 37 seconds. By my calculations, this means you speed up artifact resolution for your Maven projects by 25% by switching to Google. To do that, create a
~/.m2/settings.xml file with the following contents.
<settings> <mirrors> <mirror> <id>google-maven-central</id> <name>Google Maven Central</name> <url>https://maven-central.storage.googleapis.com</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> </settings>
My tests were run on a Mac Pro (late 2013) with a 3.5 GHz 6-Core Intel Xeon E5 processor and 32 GB of RAM. Bandwidth speeds during this test averaged 57 Mbps down, 6 Mbps up. Below are the timing numbers (in minutes) from my test:
Default: 4:33, 4:36, 4:32, 4:24, 4:09 Google: 5:13, 3:35, 2:15, 3:38, 3:39
Google had some wide variances in its results, with five minutes and two minutes. Because of this, I dropped the low and high numbers for each service before calculating the average. My math with raw numbers is below.
Default: 273, 276, 272, 264, 213 = 260, 4:20 276, 272, 264 = 270, 4:30 Google: 313, 215, 135, 218, 219 = 220, 3.66 = 3:40 215, 218, 219 = 3:37
Chen Eric commented on the InfoQ article to note that Chinese programmers are blocked from using Google.
Published at DZone with permission of Matt Raible, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.