Open Bug 2015450 Opened 9 months ago

TCP socket pool randomization

Categories

(Core :: Networking: HTTP, enhancement, P2)

enhancement
Points:
3

Tracking

()

People

(Reporter: valentin, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [necko-triaged][necko-priority-next])

Intent to Experiment TCP Socket Pool Limit Randomization DRAFT
Here's Chrome randomization algorithm:

This experiment takes the fixed per-profile maximum of 256 and increases it by a randomized amount ranging from 1 to a chosen upper bound (we will experiment with using 64, 128, and 256) as determined by the algorithm below:
(1) Define a function NEXT_POOL_STATE(STATE, MIN, MAX, VALUE) with the constraints MIN < MAX, VALUE in range [MIN, MAX], and STATE being either ‘capped’ or ‘uncapped’. This function returns ‘capped’ or ‘uncapped’ based on some probability distribution across [MIN, MAX] which might vary depending on STATE. If VALUE == MIN the return value will always be ‘uncapped’ and if VALUE == MAX the return value will always be ‘capped’. Although the exact distribution will be experimented on, in general we want transitions from ‘uncapped’ from ‘capped’ to be likely at the upper end of the range and transitions from ‘capped’ to ‘uncapped’ to be likely at the lower end of the range.
(2) Define LOWER_LIMIT as 256.
(3) Define UPPER_LIMIT as 320, 384, or 512 depending on the experiment arm.
(4) Consider a socket pool to have a STATE that is either ‘uncapped’ or ‘capped’, and that starts as ‘uncapped’.
(5) If a socket pool is ‘uncapped’ then it still processes socket releases as before, but for socket requests:
(5a) Define X as the number of active sockets before the allocation.
(5b) If X > LOWER_LIMIT update STATE to the result of NEXT_POOL_STATE(STATE, LOWER_LIMIT, UPPER_LIMIT, X)
(5c) If the value of STATE is ‘uncapped’ allocate the socket, otherwise queue the socket request for later processing when the STATE is ‘uncapped’.
(6) If a socket pool is ‘capped’ then it is queueing all socket requests for later processing when the STATE is ‘uncapped’, but for socket releases:
(6a) Define Y as the number of active sockets after the release occurs.
(6b) Update STATE to the result of NEXT_POOL_STATE(STATE, LOWER_LIMIT, UPPER_LIMIT, X).
(6c) Release the socket.

Mozilla Standards Positions - TCP Socket Pool Limit Randomization

You need to log in before you can comment on or make changes to this bug.