From fabio.forno at gmail.com Tue Sep 1 03:09:06 2009 From: fabio.forno at gmail.com (Fabio Forno) Date: Tue, 1 Sep 2009 10:09:06 +0200 Subject: [mobile] Using XMPP to talk to a mobile client In-Reply-To: <4A9C33B7.2090402@ubikod.com> References: <2ec5902e0904081226v734582e9ib30ebca6c2f7ce18@mail.gmail.com> <2ec5902e0904081230o422f20e3ud1700d84cd262163@mail.gmail.com> <2ec5902e0904081231k4772c0a7l8fd12abd4e116264@mail.gmail.com> <0ADE480E-040A-4B3E-A80F-52348D57D5A3@deepdarc.com> <4A9C1625.3060102@ubikod.com> <4A9C33B7.2090402@ubikod.com> Message-ID: <2fd53c3a0909010109h70fd00d4tb139be68a366d651@mail.gmail.com> On Mon, Aug 31, 2009 at 10:33 PM, Vincent BARAT wrote: > Additional information regarding battery consuption (in favor of XMPP): > according to our tests (using an ammeter), keeping a TCP/IP socket open DOES > NOT CONSUME MORE POWER than having none open at all, as long as there is no > activity on the socket. With which phones did you test it and which type of network? I'm asking because we don't don't have the same experience, in particular with 3G phones. Our tests show that TCP with a keepalive is much better than UDP sockets, but there is still a noticeable reduction of battery life (for example with no traffic we are still waiting for symbian phone able to stay connected for more than 36h over edge, utms is worse; in comparison when idle battery lasts a week). We believe this depends on many factors, density of cells, firmware version of phone and cells too, since we noticed a considerable improvement in the last 2years (for example a nokia n95 went from just 12h of battery life to more than a day with a simple firmware upgrade). -- Fabio Forno, Ph.D. Bluendo srl http://www.bluendo.com jabber id: ff at jabber.bluendo.com From dave at cridland.net Tue Sep 1 03:40:01 2009 From: dave at cridland.net (Dave Cridland) Date: Tue, 01 Sep 2009 09:40:01 +0100 Subject: [mobile] Using XMPP to talk to a mobile client In-Reply-To: <2fd53c3a0909010109h70fd00d4tb139be68a366d651@mail.gmail.com> References: <2ec5902e0904081226v734582e9ib30ebca6c2f7ce18@mail.gmail.com> <2ec5902e0904081230o422f20e3ud1700d84cd262163@mail.gmail.com> <2ec5902e0904081231k4772c0a7l8fd12abd4e116264@mail.gmail.com> <0ADE480E-040A-4B3E-A80F-52348D57D5A3@deepdarc.com> <4A9C1625.3060102@ubikod.com> <4A9C33B7.2090402@ubikod.com> <2fd53c3a0909010109h70fd00d4tb139be68a366d651@mail.gmail.com> Message-ID: <23259.1251794401.726760@puncture> On Tue Sep 1 09:09:06 2009, Fabio Forno wrote: > On Mon, Aug 31, 2009 at 10:33 PM, Vincent > BARAT wrote: > > Additional information regarding battery consuption (in favor of > XMPP): > > according to our tests (using an ammeter), keeping a TCP/IP > socket open DOES > > NOT CONSUME MORE POWER than having none open at all, as long as > there is no > > activity on the socket. > > With which phones did you test it and which type of network? I'm > asking because we don't don't have the same experience, in > particular > with 3G phones. Our tests show that TCP with a keepalive is much > better than UDP sockets, but there is still a noticeable reduction > of > battery life (for example with no traffic we are still waiting for > symbian phone able to stay connected for more than 36h over edge, > utms > is worse; in comparison when idle battery lasts a week). I'd note that "with keepalive" makes all the difference. A TCP session with no data traffic on it has no packets sent or received, so should be the same as having the packet data session live, but no connections over it, at least in principle. If there are data packets going over, then that means actual transmissions, which will inevitably cost much more. > We believe > this depends on many factors, density of cells, firmware version of > phone and cells too, since we noticed a considerable improvement in > the last 2years (for example a nokia n95 went from just 12h of > battery > life to more than a day with a simple firmware upgrade). There's also the structure and behaviour of the mobile operator's IP network. Orange in the UK dramatically improved over the past few years, for instance. I've no idea what they did, but they changed from dropping dormant TCP sessions within a minute or two to keeping non-silent TCP sessions live for several minutes while the handset was outside coverage. So I'm quite willing to believe that on some networks, it's possible to use no keepalives at all, and get really very good battery life out of the handset. (I used to be on Orange - still am, actually - but I'm moving to 3, so no doubt I'll discover their networks foibles soon enough...) Dave. -- Dave Cridland - mailto:dave at cridland.net - xmpp:dwd at dave.cridland.net - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/ - http://dave.cridland.net/ Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade From vincent.barat at ubikod.com Tue Sep 1 04:08:23 2009 From: vincent.barat at ubikod.com (Vincent BARAT) Date: Tue, 01 Sep 2009 11:08:23 +0200 Subject: [mobile] Using XMPP to talk to a mobile client In-Reply-To: <2fd53c3a0909010109h70fd00d4tb139be68a366d651@mail.gmail.com> References: <2ec5902e0904081226v734582e9ib30ebca6c2f7ce18@mail.gmail.com> <2ec5902e0904081230o422f20e3ud1700d84cd262163@mail.gmail.com> <2ec5902e0904081231k4772c0a7l8fd12abd4e116264@mail.gmail.com> <0ADE480E-040A-4B3E-A80F-52348D57D5A3@deepdarc.com> <4A9C1625.3060102@ubikod.com> <4A9C33B7.2090402@ubikod.com> <2fd53c3a0909010109h70fd00d4tb139be68a366d651@mail.gmail.com> Message-ID: <4A9CE487.8050208@ubikod.com> Fabio Forno a ?crit : > On Mon, Aug 31, 2009 at 10:33 PM, Vincent BARAT wrote: >> Additional information regarding battery consuption (in favor of XMPP): >> according to our tests (using an ammeter), keeping a TCP/IP socket open DOES >> NOT CONSUME MORE POWER than having none open at all, as long as there is no >> activity on the socket. > > With which phones did you test it and which type of network? Phone: HTC G1 & HTC Magic OS: Android 1.5 ejabberd: 2.0.4 The test was to send only 1 log by minute (a small stanza) on a permanent XMPP connection, and to compare to the same done using a non permanent HTTP connection. Mesures were performed during 1 hour, using the 2G and 3G network. Results (median consumption) 2G: XMPP: 21,8 mA, BOSH: 24,45 mA, HTTP: 26,16 mA 3G: XMPP: 25,34 mA, BOSH: 29,09 mA, HTTP: 27,44 mA Our BOSH client uses a HTTP connection with keep alive. I'm > asking because we don't don't have the same experience, in particular > with 3G phones. Our tests show that TCP with a keepalive is much > better than UDP sockets, but there is still a noticeable reduction of > battery life (for example with no traffic we are still waiting for > symbian phone able to stay connected for more than 36h over edge, utms > is worse; in comparison when idle battery lasts a week). We believe > this depends on many factors, density of cells, firmware version of > phone and cells too, since we noticed a considerable improvement in > the last 2years (for example a nokia n95 went from just 12h of battery > life to more than a day with a simple firmware upgrade). -------------- next part -------------- A non-text attachment was scrubbed... Name: vincent_barat.vcf Type: text/x-vcard Size: 280 bytes Desc: not available URL: From fabio.forno at gmail.com Tue Sep 1 04:25:34 2009 From: fabio.forno at gmail.com (Fabio Forno) Date: Tue, 1 Sep 2009 11:25:34 +0200 Subject: [mobile] Using XMPP to talk to a mobile client In-Reply-To: <23259.1251794401.726760@puncture> References: <2ec5902e0904081226v734582e9ib30ebca6c2f7ce18@mail.gmail.com> <2ec5902e0904081230o422f20e3ud1700d84cd262163@mail.gmail.com> <2ec5902e0904081231k4772c0a7l8fd12abd4e116264@mail.gmail.com> <0ADE480E-040A-4B3E-A80F-52348D57D5A3@deepdarc.com> <4A9C1625.3060102@ubikod.com> <4A9C33B7.2090402@ubikod.com> <2fd53c3a0909010109h70fd00d4tb139be68a366d651@mail.gmail.com> <23259.1251794401.726760@puncture> Message-ID: <2fd53c3a0909010225k2f3e7bdeu938d59b35126d1c4@mail.gmail.com> On Tue, Sep 1, 2009 at 10:40 AM, Dave Cridland wrote: >> >> With which phones did you test it and which type of network? I'm >> asking because we don't don't have the same experience, in particular >> with 3G phones. Our tests show that TCP with a keepalive ?is much >> better than UDP sockets, but there is still a noticeable reduction of >> battery life (for example with no traffic we are still waiting for >> symbian phone able to stay connected for more than 36h over edge, utms >> is worse; in comparison when idle battery lasts a week). > > I'd note that "with keepalive" makes all the difference. > > A TCP session with no data traffic on it has no packets sent or received, so > should be the same as having the packet data session live, but no > connections over it, at least in principle. > If there are data packets going over, then that means actual transmissions, > which will inevitably cost much more. Well, with keepalives I meant a byte each 10-30 minutes, depending on the timeout imposed by the network and you can ignored it. This is the minimum traffic you can do, otherwise your connection is dropped. Indeed the problems are related to levels 1-2 of the network, and you can't do a lot about it: for example you can't control when you radio receiver is on listening for possible incoming packets an that makes you consume a lot also when there is no traffic. > > > There's also the structure and behaviour of the mobile operator's IP > network. Orange in the UK dramatically improved over the past few years, for > instance. I've no idea what they did, but they changed from dropping dormant > TCP sessions within a minute or two to keeping non-silent TCP sessions live > for several minutes while the handset was outside coverage. yep, that was I meant with the firmware of the cells, however, I repeat, it has much more to do about L1-L2 than L4 > So I'm quite willing to believe that on some networks, it's possible to use > no keepalives at all, and get really very good battery life out of the > handset. Yes, there are improvements as I've said, but so far the only phones which work more or less well with long time connections seem to be blackberries bye -- Fabio Forno, Ph.D. Bluendo srl http://www.bluendo.com jabber id: ff at jabber.bluendo.com