Changing the value in g_max_sockets_per_group

187 views
Skip to first unread message

D K.

unread,
Oct 22, 2012, 3:35:11 PM10/22/12
to chromi...@chromium.org
Hi all,

For my experiment, I changed the g_max_sockets_per_group[0] (6 in default) to other value like 3. 
However, Chromium still opens maximum 6 concurrent TCP connection to the server.
I want to limit the maximum number of connection to smaller number than 6. 

Is there any other part to be modified for doing this?

Thank you.

Ryan Sleevi

unread,
Oct 22, 2012, 4:02:14 PM10/22/12
to dki...@gmail.com, chromi...@chromium.org
If building Chromium using src/chrome, check
src/chrome/browser/chrome_browser_field_trials.cc, which has an
(expired) field trial to set the maximum sockets. I suspect that's
where the 6 is coming from.

D K.

unread,
Oct 22, 2012, 4:10:03 PM10/22/12
to chromi...@chromium.org, dki...@gmail.com, rsl...@chromium.org
Thanks for your reply.
I found the part you mentioned.
Is functions in chrome_browser_field_trials.cc actually called when Chrome is running?
Isn't it a kind of unittest? 

Thank you.

Steve Truong

unread,
Oct 22, 2012, 4:17:04 PM10/22/12
to dki...@gmail.com, Chromium-dev, rsl...@chromium.org
Hi D K,

Yes, the Field Trials code is definitely called on startup. I just want to warn you that there is a CL in flight (http://codereview.chromium.org/11228007/) that removes the expired connections count Field Trial.

The default is actually being set here:


Hope that helps.


--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

D K.

unread,
Oct 22, 2012, 4:24:56 PM10/22/12
to chromi...@chromium.org, dki...@gmail.com, rsl...@chromium.org
Thanks for the reply, Steve,

That point (you linked) is the exact line where I modified. However, even I set the value as small value, for example 3, the number of concurrent connection is still 6.
Is it because field trial overwrites the value?

Thank you.

Steve Truong

unread,
Oct 22, 2012, 4:28:30 PM10/22/12
to dkim.cs, Chromium-dev, rsleevi
That's right, the Field Trial currently overrides that value. Once it is removed (http://codereview.chromium.org/11228007/ will hopefully be committed today), then it'll use the code I pointed out.

In the meantime, you can modify the Field Trial code yourself to test it.

D K.

unread,
Oct 22, 2012, 4:32:16 PM10/22/12
to chromi...@chromium.org, dkim.cs, rsleevi
Thanks for your great help!
Reply all
Reply to author
Forward
0 new messages