Re: 2.0 and Radio Impacts/battery efficiency

Roberto Peon <grmocg@gmail.com> Sun, 15 April 2012 07:47 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 4F77321F864F for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 15 Apr 2012 00:47:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.285
X-Spam-Level:
X-Spam-Status: No, score=-10.285 tagged_above=-999 required=5 tests=[AWL=0.013, BAYES_00=-2.599, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, 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 dHnUcg3r0fF6 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 15 Apr 2012 00:47:57 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id EBE9E21F8650 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 15 Apr 2012 00:47:56 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.69) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1SJKA2-0005fp-4m for ietf-http-wg-dist@listhub.w3.org; Sun, 15 Apr 2012 07:46:14 +0000
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.69) (envelope-from <grmocg@gmail.com>) id 1SJK9o-0005et-Pk for ietf-http-wg@listhub.w3.org; Sun, 15 Apr 2012 07:46:00 +0000
Received: from mail-vx0-f171.google.com ([209.85.220.171]) by maggie.w3.org with esmtp (Exim 4.72) (envelope-from <grmocg@gmail.com>) id 1SJK9l-00022j-8t for ietf-http-wg@w3.org; Sun, 15 Apr 2012 07:45:58 +0000
Received: by vcbfl15 with SMTP id fl15so3870735vcb.2 for <ietf-http-wg@w3.org>; Sun, 15 Apr 2012 00:45:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ZihQ75rnMKCn7UpTwFpGKhsm/VnEyjC5gRvKExBEvXQ=; b=n/sWHQzDu8rw30TwBtXz4ENd32lpBPn237lTAEhNYxFCP9FJQfNBoAD7YodHRi989k EeblItdYbcTmrjmE1SJyq8bujzihO0TvM6MFTd3F7XBEuJEowwfJ6X/wikN80F8SWFWw PgTmDTrBkLIxxM6ltR9NpWkf1+BistoizvTMQpT5gEtlxTkoTYPyPTFnA0U6jBOKYeuE fMAR1gLOn5TgbjHFtWt+/iky1UK31QE0sDIlSvCnLB/ODaTRWxEgxizv9q7z5uFxHqIN dG0rCnka+2eqp8FxhOysncxl6UCkvm+LxtEXRE9kdepgtQyGFxT8Vpw708fdOVBYoh8B vHqQ==
MIME-Version: 1.0
Received: by 10.52.36.81 with SMTP id o17mr3044349vdj.97.1334475931746; Sun, 15 Apr 2012 00:45:31 -0700 (PDT)
Received: by 10.52.34.103 with HTTP; Sun, 15 Apr 2012 00:45:31 -0700 (PDT)
In-Reply-To: <CAA4WUYgPCAdgVEZ3ky4wH+UYKnO7FQofXbmsEPbXGWZA9j5-Dw@mail.gmail.com>
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> <7180B750-BD93-4E2D-9506-E186A5CA87F6@tzi.org> <CAP+FsNcL=GmbMB5F9ByAF3EOP2iiKKCYk=O0vkduSArci6B4qw@mail.gmail.com> <CAA4WUYgPCAdgVEZ3ky4wH+UYKnO7FQofXbmsEPbXGWZA9j5-Dw@mail.gmail.com>
Date: Sun, 15 Apr 2012 00:45:31 -0700
Message-ID: <CAP+FsNeHpwmw8MAYKY5zYqG+M3eTe-PH7pkT076u8WWB6v1maw@mail.gmail.com>
From: Roberto Peon <grmocg@gmail.com>
To: "William Chan (陈智昌)" <willchan@chromium.org>
Cc: Carsten Bormann <cabo@tzi.org>, Markus.Isomaki@nokia.com, salvatore.loreto@ericsson.com, zhong.j.yu@gmail.com, ietf-http-wg@w3.org
Content-Type: multipart/alternative; boundary="20cf307c9e4adf828e04bdb2e38b"
Received-SPF: pass client-ip=209.85.220.171; envelope-from=grmocg@gmail.com; helo=mail-vx0-f171.google.com
X-W3C-Hub-Spam-Status: No, score=-2.7
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1SJK9l-00022j-8t 516787e08d9f3ed29fc949119fbac2cf
X-Original-To: ietf-http-wg@w3.org
Subject: Re: 2.0 and Radio Impacts/battery efficiency
Archived-At: <http://www.w3.org/mid/CAP+FsNeHpwmw8MAYKY5zYqG+M3eTe-PH7pkT076u8WWB6v1maw@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/13448
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: <E1SJKA2-0005fp-4m@frink.w3.org>
Resent-Date: Sun, 15 Apr 2012 07:46:14 +0000

That is only true if the browser is reusing the same connection for the
next request. If, as many do when doing AJAX, the app uses multiple
overlapping GETs, it will use multiple connections and will be almost
guaranteed to go idle at different times. This is made worse if the app
makes other requests to the same domain (which must be done over separate
connections...)

Anyway, I think that there are so many things interplaying here that the
only way to figure things out is to measure and study. It is certainly not
something that has high determinism...


-=R
On Apr 14, 2012 4:58 PM, "William Chan (陈智昌)" <willchan@chromium.org> wrote:

> On Sat, Apr 14, 2012 at 2:11 PM, Roberto Peon <grmocg@gmail.com> wrote:
>
>> First: There needs to be better integration between the transport, app,
>> and hardware/radio on this in order to vastly improve the situation.
>>
>> Second: Setting keep-alive to such low values can also adversely impact
>> battery, depending on the pattern of connection use, as it will increase
>> (significantly) latency for getting the user what they want. Additionally
>> many chat clients and/or ajax sites will use "hanging" gets, which return
>> perhaps every 30s. Even using a bidirectional stream (e.g. WebSockets),
>> this problem persists.
>
>
> Just to be clear, I believe Apache's KeepAliveTimeout refers to the idle
> time at the server after a HTTP transaction completes before Apache closes
> the socket. So hanging GETs should be fine since those HTTP transactions
> are active.
>
>
>>
>> Until there is a study looking at what many websites do on devices from
>> various carriers, any supposition about reducing or increasing timeouts and
>> the impact on battery is just hypothetical supposition.
>>
>> One thing is clear, however: Regardless of the usage pattern, use of a
>> proxy will reduce the number of extraneous radio wake-ups.
>> -=R
>>
>>
>> On Sat, Apr 14, 2012 at 1:07 PM, Carsten Bormann <cabo@tzi.org> wrote:
>>
>>> On Apr 13, 2012, at 12:45, <Markus.Isomaki@nokia.com> wrote:
>>>
>>> > 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.
>>>
>>> I haven't measured this, but looking at the docs leads to the following
>>> conjectures:
>>> The Apache 2.0 KeepAliveTimeout default was 15 seconds.  With the 17
>>> seconds the AT&T parameters take to power down the radio and the 2 s to
>>> power up again, this would lead to a total of 15+2+17 = 34 seconds to power
>>> down.
>>> The Apache 2.2 KeepAliveTimeout default is 5 seconds.  With any latency,
>>> this appears to make sure the radio has just been put to low power only to
>>> go through a 1.5 s transition to full power again (unless the FIN can be
>>> handled on the FACH -- I don't know).
>>>
>>> Summary: With the AT&T numbers cited here, you could do your mobile
>>> users a favor by setting KeepAliveTimeout to 4 or less seconds.
>>>
>>> (Find more about the 3G states and their timing in
>>> http://www.pasieronen.com/publications/haverinen_siren_eronen_vtc2007.pdf-- this has a much smaller T2 than the 15 seconds the Android docs cite.
>>> One interesting number in
>>> http://research.nokia.com/files/tr/NRC-TR-2008-002.pdf was that a
>>> single keep-alive exchange on their 3G network costs 9200 mJ (as opposed to
>>> 280 mJ on WiFi), about 0.7 mAh on a 3.7 V battery.  You might have some
>>> 2000 of those keep-alives in your cellphone battery before it is gone.
>>>  Ouch.)
>>>
>>> Grüße, Carsten
>>>
>>>
>>
>