Flush socket pools on low memory notification |
||
Issue descriptionFrom email thread: “There's a method HttpNetworkSession::CloseAllConnections, which flushes the socket pools. It doesn't close connections actively in use, so shouldn't break anything. The only gotcha is it will close those active connections when they're no longer in use, so could cause some performance degradation if you're in the middle of a pageload, for instance, we'd have to re-establish all connections, once the current set of requests complete.” We could also try to call HttpNetworkSession::CloseIdleConnections() on memory pressure for a less aggressive approach. Either one we'd want to add instrumentation to be able to see the results.
,
Jun 22 2016
,
Jul 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0adf859e4a1312c56d324503a59959fd85dc8c44 commit 0adf859e4a1312c56d324503a59959fd85dc8c44 Author: maksim.sisov <maksim.sisov@intel.com> Date: Fri Jul 15 06:25:56 2016 [HttpNetworkSession] Flush socket pools on low memory notification. This cl aims to reduce the number of times chrome is killed when there is not enough memory left (it mostly concerns Android). When there is a low memory notification sent by the memory pressure monitor (either MEMORY_PRESSURE_LEVEL_MODERATE or MEMORY_PRESSURE_LEVEL_CRITICAL), OnMemoryPressure callback is called and idle sockets are flushed. At first I thought to close idle sockets on moderate notifications and use CloseAllConnections() on critical notifications, but after some tests decided to flush idle sockets only, because CloseAllConnections() terminates a transaction and causes failure. + added unit tests. BUG= 617719 Review-Url: https://codereview.chromium.org/2132313002 Cr-Commit-Position: refs/heads/master@{#405708} [modify] https://crrev.com/0adf859e4a1312c56d324503a59959fd85dc8c44/net/http/http_network_session.cc [modify] https://crrev.com/0adf859e4a1312c56d324503a59959fd85dc8c44/net/http/http_network_session.h [modify] https://crrev.com/0adf859e4a1312c56d324503a59959fd85dc8c44/net/http/http_network_transaction_unittest.cc
,
Jul 15 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by mariakho...@chromium.org
, Jun 17 2016