> I do not think they are configured the same way. For one, HC 4.3 uses > content decompression by default whereas HC 3.1 does not. That obviously > skews the results.
Maybe but doesn't look like it, I just updated the results using 4.3 and turning off everything: HttpClients.custom().setConnectionManager(this.mgr).disableAuthCaching().disableAutomaticRetries().disableConnectionState().disableContentCompression() .disableCookieManagement().disableRedirectHandling().setDefaultRequestConfig(RequestConfig.custom().setStaleConnectionCheckEnabled(false).build()).build(); 4.3 Improves a bit, but is still slower than 3.1 and 4.2, and I'm pretty sure that with this config those previous version have *more* functionality. I also compared using "new DefaultHttpClient" in 4.3. > I stopped comparing HC 4.x to 3.1 a while ago because in my tests HC 3.1 > was consistently slower. I can dig out that code and re-run the tests. Hmm, I'm not seeing that at all. >> I think it's clear to see why 4.2 scale a bit better, > > If you are reasonably sure that dynamic proxies are the culprit let's > get rid of them and re-run the tests. I'm not convinced at all no, because after sending this email I see that minimalClient scales just as well as 4.2 and minimalClient uses proxies too. Maybe use of proxy is causing some other issue, but it doesn't seems to be affecting scalability as I first assumed it was. > Of course. HC 4.3 in full configuration simply does much more: > transparent content decompression, connection state tracking, auth > caching. You need to disable those features to have a fairer > comparison. I turned all that off though, still slower. >> - I tweaked the Jetty configuration to make jetty perform slightly >> better (see below). I verified changes were faster by testing before >> and after this change. > > Can I incorporate these changes into the project? Sure, but take into account that while this connector gives better results for blocking clients I'm not sure how it affects non-blocking clients. > In my opinion any difference within 10% is simply unsubstantial and can > well be a fluke. Overall, based on these numbers I am happy with HC 4.3 > performance. I will happily make it faster, though. I agree 10% isn't that much and this testing maybe isn't 100% through, but I think it's fairly clear that unless you use minimalClient with 4.3, it doesn't matter which features you turn off (even all of them), 4.3 still doesn't perform as fast as 4.2. Also I'm surprised that 3.1 runs so fast, even if it doesn't scale quite as well as 4.x. Couple of outstanding question: 1) I assume your recommendation about leaving stale connection checking on by default unless you know what you are doing is still the same in 4.3? Maybe it's a good idea to turn if off by default for idempotent http methods and on by default for others, rather than having it on for everything? 2) I'm still unsure why 4.3 is running slower than 4.2, even with everything turned off.. For my particular use case i think I might just stick to 3.1 for now, until our next minor release anyway, because the huge performance difference I was seeing between 3.1 and 4.3 it seems was 100% down to the stale connection check! That said i like the fluent interface and flexibility of 4.3. Dan > > Oleg > >> >> thanks, >> Dan >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
