Bug 137282

Summary: [SOUP] Consider reducing max simultaneous connections
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: PlatformAssignee: Michael Catanzaro <mcatanzaro>
Status: RESOLVED FIXED    
Severity: Enhancement CC: berto, cgarcia, commit-queue, danw, gns, mcatanzaro, mrobinson, svillar
Priority: P5    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch none

Description Michael Catanzaro 2014-09-30 18:04:52 PDT
I noticed this code in Source/WebCore/platform/network/soup/SoupNetworkSession.cpp:

    // Values taken from http://www.browserscope.org/ following
    // the rule "Do What Every Other Modern Browser Is Doing". They seem
    // to significantly improve page loading time compared to soup's
    // default values.
    static const int maxConnections = 35;
    static const int maxConnectionsPerHost = 6;

I checked Browserscope [1], and Firefox, Internet Explorer, and Safari all allow 17 connections nowadays. Chrome only allows 10. I have no clue if reducing max connections will improve performance, but I like the sound of "Do What Every Other Modern Browser Is Doing"....

[1] http://www.browserscope.org/?category=network&v=top
Comment 1 Sergio Villar Senin 2014-10-01 00:15:44 PDT
(In reply to comment #0)
> I noticed this code in Source/WebCore/platform/network/soup/SoupNetworkSession.cpp:
> 
>     // Values taken from http://www.browserscope.org/ following
>     // the rule "Do What Every Other Modern Browser Is Doing". They seem
>     // to significantly improve page loading time compared to soup's
>     // default values.
>     static const int maxConnections = 35;
>     static const int maxConnectionsPerHost = 6;
> 
> I checked Browserscope [1], and Firefox, Internet Explorer, and Safari all allow 17 connections nowadays. Chrome only allows 10. I have no clue if reducing max connections will improve performance, but I like the sound of "Do What Every Other Modern Browser Is Doing"....
> 
> [1] http://www.browserscope.org/?category=network&v=top

In general a higher amount of max_connections allows more parallelism, and thus faster downloads. Said that, the only reason to limit that number (apart from not overflowing your router's NAT) is to be "nice" with the servers and the other clients.

There should be a reason why they lowered that number, perhaps server admins are actually reducing that number.

In any case I'm pretty sure that if FF, IE and Safari have a lower number right now it's because they have deeply studied all the consequences and concluded that having half the connections is better.
Comment 2 Michael Catanzaro 2015-05-23 11:41:20 PDT
(In reply to comment #1) 
> In general a higher amount of max_connections allows more parallelism, and
> thus faster downloads. Said that, the only reason to limit that number
> (apart from not overflowing your router's NAT) is to be "nice" with the
> servers and the other clients.

I presume that major browsers use a lower number because having more connections open could slow them down, and they prefer to fully load a few resources and then fully load a few more rather than have many loading at the same time. It probably makes the browser feel "faster."
Comment 3 Michael Catanzaro 2016-01-06 10:26:49 PST
Created attachment 268374 [details]
Patch
Comment 4 WebKit Commit Bot 2016-01-07 07:00:36 PST
Comment on attachment 268374 [details]
Patch

Clearing flags on attachment: 268374

Committed r194697: <http://trac.webkit.org/changeset/194697>
Comment 5 WebKit Commit Bot 2016-01-07 07:00:40 PST
All reviewed patches have been landed.  Closing bug.