Re: 2.0 and Radio Impacts/battery efficiency

Salvatore Loreto <salvatore.loreto@ericsson.com> Fri, 13 April 2012 12:01 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9680821F871E for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 13 Apr 2012 05:01:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.936
X-Spam-Level:
X-Spam-Status: No, score=-8.936 tagged_above=-999 required=5 tests=[AWL=1.662, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OvPUxF-nR+Bm for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 13 Apr 2012 05:01:31 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 50B3F21F8763 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 13 Apr 2012 05:01:31 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.69) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1SIfAz-0004Ej-Ve for ietf-http-wg-dist@listhub.w3.org; Fri, 13 Apr 2012 12:00:30 +0000
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.69) (envelope-from <salvatore.loreto@ericsson.com>) id 1SIfAp-0003vD-DE for ietf-http-wg@listhub.w3.org; Fri, 13 Apr 2012 12:00:19 +0000
Received: from mailgw7.ericsson.se ([193.180.251.48]) by maggie.w3.org with esmtp (Exim 4.72) (envelope-from <salvatore.loreto@ericsson.com>) id 1SIfAi-0008U0-2J for ietf-http-wg@w3.org; Fri, 13 Apr 2012 12:00:17 +0000
X-AuditID: c1b4fb30-b7b07ae000006839-e8-4f8815361e6c
Authentication-Results: mailgw7.ericsson.se x-tls.subject="/CN=esessmw0184"; auth=fail (cipher=AES128-SHA)
Received: from esessmw0184.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) (using TLS with cipher AES128-SHA (AES128-SHA/128 bits)) (Client CN "esessmw0184", Issuer "esessmw0184" (not verified)) by mailgw7.ericsson.se (Symantec Mail Security) with SMTP id 9D.DF.26681.635188F4; Fri, 13 Apr 2012 13:59:50 +0200 (CEST)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0184.eemea.ericsson.se (153.88.115.82) with Microsoft SMTP Server id 8.3.213.0; Fri, 13 Apr 2012 13:59:50 +0200
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3]) by mail.lmf.ericsson.se (Postfix) with ESMTP id DE2C4230B; Fri, 13 Apr 2012 14:59:49 +0300 (EEST)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1]) by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 1DA1F52353; Fri, 13 Apr 2012 14:59:50 +0300 (EEST)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1]) by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 3DFFD51882; Fri, 13 Apr 2012 14:59:49 +0300 (EEST)
Message-ID: <4F881534.8050401@ericsson.com>
Date: Fri, 13 Apr 2012 13:59:48 +0200
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:11.0) Gecko/20120327 Thunderbird/11.0.1
MIME-Version: 1.0
To: "Markus.Isomaki@nokia.com" <Markus.Isomaki@nokia.com>
CC: "grmocg@gmail.com" <grmocg@gmail.com>, "zhong.j.yu@gmail.com" <zhong.j.yu@gmail.com>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
References: <4F8697C2.5000702@ericsson.com> <CACuKZqGA9Tyv_zhO2HhyLNvqvzNCrTyZYy+b_Tt616F7eLbT1w@mail.gmail.com> <CAP+FsNcGfj_G1U9nWA5qj+tW8rWwMn0+HVhYA40XXQg_hWfTuA@mail.gmail.com> <4F87E856.1000604@ericsson.com> <E44893DD4E290745BB608EB23FDDB7621CEF37@008-AM1MPN1-041.mgdnok.nokia.com>
In-Reply-To: <E44893DD4E290745BB608EB23FDDB7621CEF37@008-AM1MPN1-041.mgdnok.nokia.com>
Content-Type: multipart/alternative; boundary="------------020609030101060607030500"
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Received-SPF: pass client-ip=193.180.251.48; envelope-from=salvatore.loreto@ericsson.com; helo=mailgw7.ericsson.se
X-W3C-Hub-Spam-Status: No, score=-4.2
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1SIfAi-0008U0-2J 9a57513702fe4d7a6f4a9fd894a3bd68
X-Original-To: ietf-http-wg@w3.org
Subject: Re: 2.0 and Radio Impacts/battery efficiency
Archived-At: <http://www.w3.org/mid/4F881534.8050401@ericsson.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/13438
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>
Resent-Message-Id: <E1SIfAz-0004Ej-Ve@frink.w3.org>
Resent-Date: Fri, 13 Apr 2012 12:00:29 +0000

On 4/13/12 12:45 PM, Markus.Isomaki@nokia.com wrote:
>
> Hi,
>
> It’s not clear to me that using less _/TCP/_ connections automatically 
> reduces battery power on 3G. For instance, the use of battery is 
> roughly the same if a client opens a single TCP connection and 
> pipelines (or multiplexes in SPDY style) multiple GETs over it vs. 
> opens simultaneously a separate connection for each GET. The radio 
> wakes up on the first TCP SYN and stays up a few seconds after the 
> last byte in the last response has been obtained. A single connection 
> may or may not make this time shorter.
>
> How the connections are closed does potentially have an impact. If the 
> connections are closed immediately after the responses are done, there 
> isn’t any significant difference between 1 vs. many connections. The 
> radio is already up. However, if the connections are closed after some 
> idle period, for instance by a server timeout, that makes the radio 
> wake-up an additional time. If the separate connections are closed 
> after _/different/_ timeouts (more than a couple of seconds 
> difference), that can make the radio wake-up multiple times, which is 
> bad.
>
> If servers really do use random timeouts, I agree that fewer 
> connections are better. Is that the case?
>
yes, it is!
at least that is also my reading of the advices on the android developer 
website.

> If there are connections to multiple servers and servers send data in 
> an asynchronous and uncoordinated manner is a problem as the radio 
> wakes up quite often.  One solution is to use some kind of 
> gateway/proxy to buffer and bundle the data together and use just a 
> single connection to that gateway.
>

> Markus
>
> *From:*ext Salvatore Loreto [mailto:salvatore.loreto@ericsson.com]
> *Sent:* 13 April, 2012 11:48
> *To:* Roberto Peon
> *Cc:* Zhong Yu; HTTP Working Group
> *Subject:* Re: 2.0 and Radio Impacts/battery efficiency
>
> Roberto is right!
>
> the problem with multiple TCP connections is that the server can send 
> packets on several connections.
>
> Low power to full power will always be the case no matter who send 
> data on (or closes) the connection, server or client.
> On top of this, when the server send data on (or closes) the 
> connection the system needs to page the device,
> send out a signal on the common control channel in order to make the 
> device re-establish its radio channel, these are in many systems quite 
> loaded.
> When the TCP close is initiated from the device the device does not 
> need to be paged.
>
> /Sal
>
> -- 
> Salvatore Loreto, PhD
> www.sloreto.com  <http://www.sloreto.com>
>
>
>
> On 4/13/12 9:27 AM, Roberto Peon wrote:
>
> The most obvious reason would be that the server sends a packet which 
> requires the radio to awaken (e.g. because the tcp stack emits a 
> packet back).
>
> -=R
>
> On Thu, Apr 12, 2012 at 8:23 AM, Zhong Yu <zhong.j.yu@gmail.com 
> <mailto:zhong.j.yu@gmail.com>> wrote:
>
> I don't get it. Cerntainly a new connection requires an extra round
> trip which drains extra power, but only for the duration of the round
> trip. Why is it "extremely expensive"?
>
> The article says
>
>    "Every time you create a new network connection, the radio
> transitions to the full power state."
>
> which I don't think implies that,
>
>    "If you reuse a network connection, the radio does NOT necessarily
> transition to the full power state."
>
> To compress all network activities(including FIN-FIN) into a shorter
> time span, the article event suggests that
>
>    "so it's also good practice to close your connections when they
> aren't in use"
>
>
>
> On Thu, Apr 12, 2012 at 3:52 AM, Salvatore Loreto
> <salvatore.loreto@ericsson.com <mailto:salvatore.loreto@ericsson.com>> 
> wrote:
> > Hi there,
> >
> > here a good read about "Optimizing Downloads for Efficient Network 
> Access"
> > 
> http://developer.android.com/training/efficient-downloads/efficient-network-access.html
> >
> > the major points are
> >
> > 1) reducing the number of connections is a MUST as each new network
> > connection is extremely expensive
> > from a Radio/Battery prospective
> >
> > It is also worth to add that the server-initiated closing of  idle
> > connection is also something to avoid.
> > So if the client keeps the connection open longer, then the 
> specification
> > has to mandate servers to keep
> > the connection open for very long.
> >
> >
> > 2) the ping frequency is also very important:
> > "An app that pings the server every 20 seconds, just to acknowledge 
> that the
> > app is running and visible to the user, will keep the radio powered on
> > indefinitely"
> >
> >
> > 3) also Prefetching data need some consideration from the radio 
> prospective
> > as Prefetching data (on a wireless connection)
> >  may cost money but for sure has a cost from a battery prospective
> >
> >
> > cheers
> > Sal
> >
> > --
> > Salvatore Loreto, PhD
> > www.sloreto.com <http://www.sloreto.com>
>