Very bad performance for large artifacts
Since using Nexus I noticed mvn install is very slow compared to direct connections, Even if I have to define several repositories it's still faster than using the repository group from nexus. wouldn't be a problem if it was just a few %, but think about this:
5MB Artifact download through http://nexusserver:8081/nexus/content.... : ~22sec
5MB Artifact download through file:///\\nexusserver\contents_share\... : ~1sec
5MB Artifact download through http://nexusserver:8081/nexus/content.... : ~22sec
5MB Artifact download through file:///\\nexusserver\contents_share\... : ~1sec
1
person has this problem
I have this problem, too!
Tell me when someone solves it.
The more people who report this problem, the more it gets noticed.
The more people who report this problem, the more it gets noticed.
-
Inappropriate?When you compare it through Nexus, is the file already located in the cache? If not, then nexus has to go find it. What happens if you request that file again once the cache's are all primed?
I’m unsure
-
Inappropriate?Thanks for the quick answer!
I Just did this a second time:
- checked if it is in the nexus cache
- mvn clean my project
- moved my local repository to ~/.m2/repository_old
- mvn install
--> it took 22 seconds again for the large artifact!
I’m still disappointed
-
Inappropriate?Just compared download performance with a Browser:
- through the nexus url: ~260KB/s and falling to 130KB/s
- through the file url: ~4.7MB/s
both are on the same server!
Any idea? -
Inappropriate?There are a lot of variables between the two methods. The first is the protocol, filesystem vs http and another is the maven wagon being used. A better comparison would be to compare using apache httpd against nexus.
Even in that test, i would expect Nexus to be slightly slower since it has to check other things like security and hunt around the repos in the group (although memory caches make this very fast for the second lookup). The benefit to Nexus comes when multiple users are trying to get the same artifacts and from active management of the repositories.
For example, if that 5mb file comes from central, it might take 2mins to get into nexus the first time. Compared to that, 22seconds is pretty fast.
Once we find the file we want in a local hosted repo or the proxy cache, we hand it over to commons httpclient to stream out, i don't know how easy it would be to crank that up, but again i'd like to see how fast you see it with apache httpd to rule out protocol and wagon.
I’m unsure
-
Inappropriate?Thanks for your answer.
Didn't try apache, but I have also an MS IIS instance running. That one provides pretty much the same bandwith over http like file:/// does.
Anyway, I think Nexus is quite fast in looking up the artifact, but has problems streaming it over the network. Hard to believe that 260KB/s is the maximum commons http manages to stream over a 100Mbps network. btw.: CPU usage on the server is at 1% while streaming.
Would you expect Apache httpd less performant than IIS? -
Inappropriate?Alright, installed XAMPP now and configured it to use the nexus working directory. After that I navigated to the large artifact, and guess what, I didn't even see it downloading because it was so fast.
To be sure, I deleted the Browser cache and tried again -> less than 1 second!
Any ideas?
Thanks -
Inappropriate?Hrm. I guess we need to look closer at some of those http client settings. Maybe there's a buffer size that needs to be increased.
Good news is there is some upside it seems to making it faster on the Nexus side. Bad news is we need to make it faster on the Nexus side.
;-)
I’m confident
-
Inappropriate?Hi,
i could not reproduce the problem! I placed a 125MB file into my local storage, and downloaded it using curl. To have some "reference", i did the same with placing the same file into webapp folder, to completely "avoid" Nexus from the game and measure Jetty speed only. Here are my results:
Getting the big-file from Nexus repository
cstamas@Marvin tmp]$ curl -O http://localhost:8081/nexus/content/r...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 120M 100 120M 0 0 38.5M 0 0:00:03 0:00:03 --:--:-- 38.6M
[cstamas@Marvin tmp]$
Getting the big-file from Jetty directly
cstamas@Marvin tmp]$ curl -O http://localhost:8081/nexus/clip-2008...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 120M 100 120M 0 0 35.2M 0 0:00:03 0:00:03 --:--:-- 35.3M
[cstamas@Marvin tmp]$
The machine specs:
MacBook Pro / Mac OSX
Java 1.5
I’m still unsure
-
When using localhost I don't see the problem either, only from a different machine (see below or issue 812) -
Inappropriate?My results are actually about the same, and this was across a wireless network with a 21mb file:
brianf@penryn ~
$ curl -O http://192.168.101.21:8081/nexus/cont...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 21.4M 100 21.4M 0 0 2748k 0 0:00:07 0:00:07 --:--:-- 2762k
brianf@penryn ~
$ curl -O http://192.168.101.21:8081/nexus/test...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 21.4M 100 21.4M 0 0 2863k 0 0:00:07 0:00:07 --:--:-- 2860k
rschlege, what jdk are you using? It's possible that the performance difference is with the jdk vs native access.
I’m confused
-
Is 192.168.101.21 your own machine? If yes, could you please try from a different machine?
When I login on the machine where nexus is running and use the own IP it's very fast as well, only from a different machine it's really slow! -
Inappropriate?
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
Just checked Task manager: doesn't show any change while downloading other than 1% CPU usage for java.exe for just the blink of an eye.
Machine:
Windows Server 2003 Standard Edition
Intel Core 2 Duo 2.4GHz
2GB RAM
Change in wrapper.conf:
# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=256
-
Inappropriate?Tried now also with
java version "1.5.0_12"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
Java HotSpot(TM) Client VM (build 1.5.0_12-b04, mixed mode, sharing)
Exactly the same bad performance!
Could it be somehow because of M$?
Note: I realize the performance is bad in general, not only for large artifacts. When downloading one with 300KB it takes long enough for the browser to display the bandwith with 230KB/s. -
Inappropriate?Did now the same Tamas did -> placed the artifact into the webapp folder and downloaded it from there http://nexusserver:8081/nexus/large-a...
Speed: 5.3MB/s -
Inappropriate?.21 is an ubuntu jeos VM running nexus with just 128mb for the whole VM. The vm host is another machine and I ran the test from my laptop over wireless. If the problem doesn't exist when you access locally the something outside of nexus is your problem because you can see the app is capable of streaming much faster than you see. Perhaps a firewall, proxy or virus scanner is at play. I could see where those could behave differently for http than file... Particularly virus scan.
I’m happy
-
Inappropriate?That was my thought initially as well, but then I tried over http from the webapp folder and that's very fast, no problem. And additionally, there is no CPU usage which might indicate virus scanner or anything! Tried also from my local machine to my neighbours to avoid any firewall and that's very slow as well! It really must be something about Windows I believe, especially because it's fine if I run nexus on Solaris and stream over the same network.
Did you try with windows? -
Inappropriate?Tried now on my Win XP box at home and on that one it runs just fine! I'll try to find out which tool interferes with Nexus and post it here if I have the solution.
I’m happy that it's not a problem from Nexus
1 person says
this solves the problem
-
Inappropriate?Ok good to know it's not Nexus. If you do figure it out, i'd be curious to know what it was.
I’m happy
The company says
this solves the problem
-
Inappropriate?Not sure if this could have something to do with it: http://jira.codehaus.org/browse/JETTY...
(nexus is using jetty 6.1.11)
One more interesting point: when using my private Notebook as a client connecting to the nexus webapp, the speed is fine! Thus seems only to be a problem if windows is on both sides, and only in special cases. Very strange...
I’m confused
-
Inappropriate?Tried now nexus with jetty 6.1.12.rc2 which fixes JETTY-681
Result: better performance (around factor 2), but still quite slow compared to solaris installation. -
Inappropriate?Added a respective sub-task: http://issues.sonatype.org/browse/NEX...
Loading Profile...



EMPLOYEE
EMPLOYEE