I already tried explaining the mechanism behind the drain, but everything gets lost very quickly in this thread, noone really reads more than two pages back any more with 100+ pages and counting. Anyone interested enough can use search tab in this thread and find earlier posts with my nick.
Quick recap, just to explain both 7 hours of usage in 24 hours and the fact people loose 10% of battery in 20-40 minutes of browsing on wifi. Many of you might even notice more battery drain on wifi than in 3g, something that should never happen.
The reason, in my humble opinion, is two fold - too aggressive data polling and semi stoned/hanged network connections from system services. Once again, if you want full explanation, you can search the forums, I already ranted the theory out in this thread several thousand pages ago. But in short:
you phone at the moment is doing all kinds of stupid malarky in the background, courtesy of apple -
For starters your iphone has a constant, round robin data connections going out to servers, most noticeably at push.apple.com (this has nothing to do with push services per say, as far as I can see this connections are always there - it's the first connection to open when the phone boots and last connection to go out when the phone shuts down)
In terms of battery life, the problem is not what this connection does and why it needs to be there all the time - this might or might not be privacy concern for a separate thread - but that's irrelevant to the battery discussion. The connections is there, end of, fact of life, true story, genuine event. What is important is that
this constant connection very often gets stoned, hangs, and when that happens the connection never exits and instead the phone remains semi active and eats battery.
What's worse, almost every service connection your iphone systematically opens, is theoretically equally likely to get stoned/become hanged in similar fashion to the main "push.apple.com" connection.
The mechanism is fairly simple - if the socket never closes and the connection remains active listening for the answer that never comes or tries to desperately resubmit some data to the server that no longer reacts, this is the "Usage" you see - with screen off, at night, in your pocket, warming up in your hand with screen off - this is the phone equivalent to "wake on LAN". The darn phone never properly sleeps.
Here's the "proof of concept" in pictures, to make it more clear:
1. *.push.apple.com connection is running, your phone is communicating with apple mothership, but something spooks it, there is some sort of misunderstanding, or you moved out of reach of 3G connection in the middle of communication, for whatever reason the socket is now screwed. If we are to believe netstat utility, what do we see - phone actively tried to talk with the server for total of 21 minutes, and waiting idle for 46 minutes, socket open, it didn't refresh, will not close, keeps on trying to talk - 21 minutes, that's a lot of data connection time. But with statistics like these - the connection is probably stoned.
How do we know it's stoned and will not sleep/remain active you ask? Well - if I were to enable wifi, all active, live, idling or not connections should move onto wifi, like this:
But instead, everything switches over to wifi, but the stoned socket stays behind - like a dog awaiting his masters voice it stays on 3G and keeps on barking at the moon.
The answer never comes. Mothership never responds. But now you have your explanation - so what you switched to Wifi - if any of the services on the phone suffered from this stoned/hanged data bug - your active 3G data connection potentially never went away - now both radios are active, the phone drains battery using both 3G and Wifi, switching to wifi was supposed to give you 50% more active time, but instead battery drains much faster.
What's even more stupid, there will be kb's of data involved, tiny or not. As a consequence, if you are abroad, you switched over to your hotel Wifi, you think you're safe, and yet the ****ing phone is still barking through roaming mast, one data connection over stoned socket never switches over to wifi and keeps exchanging data with apple mothership costing you few dollars a day.
What you will also notice in the pictures - is the excessive data spam.
With all applications closed, you phone, when active, keeps polling aggregator services at akamai, teliacarrier, amazonaws etc etc. I don't really know wtf iphones are doing with all of those connections, maybe prefetch, maybe check for notifications - again, not relevant to battery discussion - like a virused PC it's exchanging data via http, few kb at a time, without any app asking for it, with pull disabled, with mail fetch set to manual. Connections wake up, connect, disconnect, sockets close and disappear. Trouble of course is - since the stoned/hanged service connection prevents the phone from sleeping - them aggregator connections theoretically will just keep on waking up and polling aggressively all the time when the phone was supposed to be resting.
In my experience, as well, the faster you move between masts (car, train), the more aggressive this polling becomes, it's almost like there was some obsessive "must find another way of data communicating" watchdog running in the background.
And hence the 11 hours "Usage" stats per 12 hours of idle screenshots we see, the wifi that eats through battery faster than 3G mode, unexplained losses of battery over night, phones warming up in pockets etc. All the above is my opinion, and nothing but my opinion of course, but if the theory is correct
the more of us testing the quicker we could kick apple into doing something about it.
I can be completely wrong about the whole thing, I'm not IOS developer, I know a lot about BSD but very little about programming for iphone, but what I know for sure, is this - when I keep tabs on the stoned connections, reset network stack if I spot stoned connection or rouge usage in stats and most importantly - don't let push.apple.com block 3G radio from switching off when wifi is in use, my 4S is brilliant. Screw 1 day with 7 hours of usage - real life 7 hours of usage and 3 days before I run out of juice. No cheating, no airplane mode at night etc. Proof of concept:
If I stop "maintaining" it actively and let it go, sooner or later, especially during working week when I move a lot, the "stoned" socket bug returns and I get 12-24 hours standby time from my phone.