New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 617719 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Jul 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocking:
issue 620852



Sign in to add a comment

Flush socket pools on low memory notification

Project Member Reported by mariakho...@chromium.org, Jun 6 2016

Issue description

From 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.


 
Blocking: 620852

Comment 2 by mmenke@chromium.org, Jun 22 2016

Cc: mmenke@chromium.org
 Issue 622444  has been merged into this issue.
Project Member

Comment 3 by bugdroid1@chromium.org, 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

Comment 4 by mmenke@chromium.org, Jul 15 2016

Status: Fixed (was: Available)

Sign in to add a comment