Push Notifications vs. background apps

Posted:
in iPhone edited January 2014
Apple's justification (at least one of them) for not allowing App Store apps to run in background, is that apps running in background drastically reduce battery life, and that's why push notifications are a much better idea for getting much of the same functionality. The thing is, enabling push notifications also drastically reduces battery life. In my case I went from getting at least 24 hours standby time to be lucky to get 12 hours standby time with Push enabled. The way that Apple does push (by attempting to maintain a constant network connection open) is obviously a huge battery hog.



I'd be curious to know how much of a battery hog (if any) running background apps on an iPhone really is. Anyone here with a JailBroken phone running background apps have any info? Given that the iPhone already runs a bunch of (Apple) apps and processes in background anyway it's difficult to imagine that a reasonably well written 3rd party app would have much, if any, additional impact on battery life.



I'm inclined to believe that Apple had other reasons for not allowing background apps and just peddled the "battery life" excuse as a cover up. I suspect that they eventually will allow background apps and are just waiting to get the SDK and/or UI for it perfected, much the same way as they tried to sell everyone the "Web Apps in Safari is all you'll ever need" whilst they were still developing the proper iPhone SDK.
«1

Comments

  • Reply 1 of 24
    mac voyermac voyer Posts: 1,294member
    Now that I am a 3GS owner, I do not find the lack of 3rd party background processes to be an issue. App launching is very fast. It is nice to know that most all of the available processing power is going towards running the current app. There are already many background processes available. The ability to make a call and still use everything on the phone including data services is great. I can go into iTunes and play a lecture from iTunes U while doing other things. Mostly, when people complain about the lack of background apps, they are referring to streaming Pandora. Well I can listen to anything in my music library or stream from iTunes and still do anything else. Personally, if it means giving the iPhone the same battery life as what has been reported with the Pre, count me out.
  • Reply 2 of 24
    bbwibbwi Posts: 812member
    Quote:
    Originally Posted by michaelab View Post


    (by attempting to maintain a constant network connection open)



    Not sure what you mean by this. This is not how push works. Where in Apple's docs does it say it maintains a constant connection?



    I have push enabled and get fine battery life. I can go two days without charging
  • Reply 3 of 24
    tenobelltenobell Posts: 7,014member
    I would assume the point being made is for push to work the phone must maintain a network connection. Without the connection there is no push. For background tasks you don't necessarily need a network connection.



    Quote:
    Originally Posted by bbwi View Post


    Not sure what you mean by this. This is not how push works. Where in Apple's docs does it say it maintains a constant connection?



    I have push enabled and get fine battery life. I can go two days without charging



  • Reply 4 of 24
    tulkastulkas Posts: 3,757member
    Quote:
    Originally Posted by bbwi View Post


    Not sure what you mean by this. This is not how push works. Where in Apple's docs does it say it maintains a constant connection?



    I have push enabled and get fine battery life. I can go two days without charging



    They have described it as the Apple servers maintaining a persistent connection to each and every iPhone. It does impact battery life and they described this themselves. having said that, my battery on my 3G has never been great anyway and i haven't noticed a significant drop since installing and using a few push apps. Battery drain would be much worse with 2, 3 or 10 apps running, each maintaining their own connections etc.
  • Reply 5 of 24
    bbwibbwi Posts: 812member
    This is straight from their website.



    Quote:

    Products Affected

    iPhone, iPod touch, iPhone 3G, iPhone 3GS, iPod touch (2nd generation)

    If the Settings > Notifications menu does not appear on your device, you don't have an application installed that supports notifications.

    You need to open an application at least once to get any notifications from that app.

    When the iPod touch screen is on and has a Wi-Fi connection, push notifications are received at any time. If the iPod touch screen is asleep, it will check every 15 minutes for a notification.

    If you want to disable notifications from an application, turn off all notifications for that application in Settings > Notifications.

    When you restore a backup to a different iPhone or iPod touch, apps will need to be opened again to get notifications.



    The articles you're reading regarding a "persistent IP connection" are in reference to 3rd party app servers talking to the Apple Push Notification service. Not the Apple Push Notification service talking to your device.



    http://developer.apple.com/iphone/program/sdk/apns.html
  • Reply 6 of 24
    MarvinMarvin Posts: 15,323moderator
    The problem would be determining which apps to leave running. The Palm Pre for example doesn't have any 3D games and you wouldn't want those to keep processing while you answered a phone call or tried to browse the web.



    They could probably have rules to suspend a 3D rendering context but it's making sure that every app resumes correctly.



    Then there are apps that just do a lot of processing, how would the iphone know which ones to leave open?



    I personally don't like push notifications, they are too intrusive and they don't fulfill the role of background apps adequately.



    Apple should perhaps have simple rules for background processing such as dropping the CPU allocation right down, only quitting apps that use too much Ram and only maintaining a periodic network connection for background apps.



    Even just let the user decide in the global settings panel. Allow us to setup a list of apps that we don't want to quit when switching between apps.
  • Reply 7 of 24
    bbwibbwi Posts: 812member
    Quote:
    Originally Posted by Marvin View Post


    The problem would be determining which apps to leave running. The Palm Pre for example doesn't have any 3D games and you wouldn't want those to keep processing while you answered a phone call or tried to browse the web.



    They could probably have rules to suspend a 3D rendering context but it's making sure that every app resumes correctly.



    Then there are apps that just do a lot of processing, how would the iphone know which ones to leave open?



    I personally don't like push notifications, they are too intrusive and they don't fulfill the role of background apps adequately.



    Apple should perhaps have simple rules for background processing such as dropping the CPU allocation right down, only quitting apps that use too much Ram and only maintaining a periodic network connection for background apps.



    Even just let the user decide in the global settings panel. Allow us to setup a list of apps that we don't want to quit when switching between apps.



    I think its too early to tell if push or background processes are better. Most apps don't even support push yet and if they do they have not proven themselves to be bug free nor has the Apple Push Service proven to be reliable and bug free. Additionally, in the settings of each app your should be able to turn off the "intrusive" behavior, I hope. We'll see down the road if more platforms adopt the push method vs background processes. Even Microsoft is limiting background processes in Win 7 Starter so they're at least thinking about it and may translate that in some capacity over to WinMo
  • Reply 8 of 24
    tenobelltenobell Posts: 7,014member
    This begins to go down a complex path. Apple would have to check and make sure all apps that want to run in te background don't hog resources. Not all developers are equal, some are skilled in making apps extremely process efficient, some will be less skilled, some won't care.



    As far as alllowing the user to decide. The overwhelming majority of people don't understand the concept of system resource allocation. Most people won't want to be bothered with it. Apple understands this and does not force this concept on the common user. Which is part of the success of the iPhone.



    Quote:
    Originally Posted by Marvin View Post


    Apple should perhaps have simple rules for background processing such as dropping the CPU allocation right down, only quitting apps that use too much Ram and only maintaining a periodic network connection for background apps.



    Even just let the user decide in the global settings panel. Allow us to setup a list of apps that we don't want to quit when switching between apps.



  • Reply 9 of 24
    Quote:
    Originally Posted by bbwi View Post


    The articles you're reading regarding a "persistent IP connection" are in reference to 3rd party app servers talking to the Apple Push Notification service. Not the Apple Push Notification service talking to your device.



    No they're not. Check out this link:



    http://developer.apple.com/iPhone/li...shService.html



    Quote:

    Apple Push Notification Service (APNs for short) is the centerpiece of the push notifications feature. It is a robust and highly efficient service for propagating information to devices such as iPhone and iPod touch devices. Each device establishes an accredited and encrypted IP connection with the service and receives notifications over this persistent connection. If a notification for an application arrives when that application is not running, the device alerts the user that the application has data waiting for it.



    This is also the way that push Email works on the iPhone, as Exchange's ActiveSync, and MobileMe's Push-IMAP work in the same way, that is, keeping open a persistent connection. Strictly speaking it's not actually push, but "long polling". See here for some more info on P-IMAP.



    Keeping a persistent IP connection going inevitably has a non-trivial cost in terms of battery usage, which gets worse in proportion to how good the iPhone's reception is. As reception deteriorates, the timeout for the long lived HTTPS request is made progressively shorter, implying more data transmission. Every time you pass in and out of areas of coverage the connection also has to be re-established, more data transmission. For this reason, the battery life hit varies a lot depending on circumstances. Even with push enabled I can go a whole weekend without charging if I leave the phone in once place with good reception. During the week though I'm lucky to make it through the day without needing a charge. With push disabled though my iPhone lasts a couple of weekdays without a charge.



    For the average user, enabling Push Email or Push Notifications will cause a huge hit on your battery life. What I'm suggesting is that in most cases this hit is likely to be much greater than the hit caused by (well written) applications running in background, and that Apple's justification for not allowing background apps is not a genuine one.



    Quote:
    Originally Posted by Marvin View Post


    The problem would be determining which apps to leave running



    Not really. This should be left to the user. Apple famously ridiculed the "Task Manager" included in WinMo, and rightly so, but I'm sure that Apple could come up with a much better UI paradigm for managing which apps are running. The default action of the Home button could continue to kill an app as it does now so only user's who knew what they were doing would have background apps running.



    Quote:
    Originally Posted by Mac Voyer View Post


    I do not find the lack of 3rd party background processes to be an issue



    Neither do I really, and that's not really what this thread is about. It's about whether Apple's alternative is any better, and IMO it's not.



    Quote:
    Originally Posted by Mac Voyer View Post


    if it means giving the iPhone the same battery life as what has been reported with the Pre



    It's meaningless to compare different devices, with different batteries and different OSes. What I'm saying is that just enabling Push Notifications will give you a battery life hit at least as big as running 3rd party apps, so you're taking the hit already anyway.
  • Reply 10 of 24
    tenobelltenobell Posts: 7,014member
    Quote:
    Originally Posted by michaelab View Post


    For the average user, enabling Push Email or Push Notifications will cause a huge hit on your battery life. What I'm suggesting is that in most cases this hit is likely to be much greater than the hit caused by (well written) applications running in background, and that Apple's justification for not allowing background apps is not a genuine one.



    The iPhone has to maintain a persistent connection with or without push notifications. While it's true push does impact battery life, it is not huge. There have been many tests of iPhone battery life, none have shown push being a major hinderence on battery life.



    With the Pre and background multitasking has proven a significant hit to battery life.





    Quote:

    Not really. This should be left to the user. Apple famously ridiculed the "Task Manager" included in WinMo, and rightly so, but I'm sure that Apple could come up with a much better UI paradigm for managing which apps are running. The default action of the Home button could continue to kill an app as it does now so only user's who knew what they were doing would have background apps running.





    Most people won't want to be bothered with system resource management.
  • Reply 11 of 24
    Quote:
    Originally Posted by TenoBell View Post


    The iPhone has to maintain a persistent connection with or without push notifications.



    No it doesn't. You can disable both Push Notifications and Push Email. If you do, the iPhone no longer maintains a persistent IP connection and the resultant increase in battery life is immediately obvious. The iPhone obviously maintains a cell network connection just like any other phone but that's something completely different.



    Quote:

    While it's true push does impact battery life, it is not huge. There have been many tests of iPhone battery life, none have shown push being a major hinderence on battery life.



    Show me some examples. In all the empirical tests myself and friends of mine have done with the iPhone it was immediately clear that the single biggest battery hog on the iPhone is enabling Push (email or notifications). Differences enabling or disabling Bluetooth, 3G or WiFi and even changing the screen brightness were insignificant in comparison.



    Quote:

    With the Pre and background multitasking has proven a significant hit to battery life.



    How so? Have tests been run comparing running a single app vs running several on the Pre? AFAIK the Pre simply has poor battery life period, and it has little to do with running background apps. In any case, the iPhone already runs a lot of background processes (the Memory Info app on my phone currently lists 24 running processes) so it's hard to see that adding another 2 or 3 would make a significant difference.



    Quote:

    Most people won't want to be bothered with system resource management.



    That's a very patronising view. Most people seem to manage it just fine in OS X.
  • Reply 12 of 24
    tenobelltenobell Posts: 7,014member
    Quote:
    Originally Posted by michaelab View Post


    No it doesn't. You can disable both Push Notifications and Push Email. If you do, the iPhone no longer maintains a persistent IP connection and the resultant increase in battery life is immediately obvious. The iPhone obviously maintains a cell network connection just like any other phone but that's something completely different.



    That IP connection has to come across the cell network. I don't see how you beleive the IP connection is going to use more energy than the cell network it rides on.



    Quote:

    Show me some examples. In all the empirical tests myself and friends of mine have done with the iPhone it was immediately clear that the single biggest battery hog on the iPhone is enabling Push (email or notifications). Differences enabling or disabling Bluetooth, 3G or WiFi and even changing the screen brightness were insignificant in comparison.



    Of all the processes that drain the iPhone battery, I don't beleive you've eliminated them all to definitely see exactly how much power push itself drains. To do this would mean you would have to shut off or not use every other function on the iPhone to only see push notifications.



    Quote:

    How so? Have tests been run comparing running a single app vs running several on the Pre? AFAIK the Pre simply has poor battery life period, and it has little to do with running background apps. In any case, the iPhone already runs a lot of background processes (the Memory Info app on my phone currently lists 24 running processes) so it's hard to see that adding another 2 or 3 would make a significant difference.



    Every app is always allowed to run in the background on the Pre. You cannot divorce the battery life from it's common use. With the Pre you are not simply adding two or three more processes, everything is allowed to run.



    Quote:

    That's a very patronising view. Most people seem to manage it just fine in OS X.



    Most people are not directly dealing with resource management on their computers. The most common solution to a slow running computer is to shut it off and turn it back on, which in effect clears out the cache and memory. Few people go through their system to find what processes are using up resources.
  • Reply 13 of 24
    Quote:
    Originally Posted by TenoBell View Post


    That IP connection has to come across the cell network. I don't see how you beleive the IP connection is going to use more energy than the cell network it rides on.



    They are two entirely different things. If your phone has a connection with a cell tower the amount of radio transmission it has to do to maintain it (or switch to the next cell if necessary) is negligible, all though it too increases in areas with poor reception. OTOH maintaining a persistent IP connection means the phone is transmitting and receiving very frequently, and that's what kills the battery life.



    Quote:

    Of all the processes that drain the iPhone battery, I don't beleive you've eliminated them all to definitely see exactly how much power push itself drains. To do this would mean you would have to shut off or not use every other function on the iPhone to only see push notifications.



    It's quite simple. With Push disabled I can easily go 24-36 hrs between charges. With Push enabled that number drops consistently below 12hrs.



    Quote:

    Every app is always allowed to run in the background on the Pre. You cannot divorce the battery life from it's common use. With the Pre you are not simply adding two or three more processes, everything is allowed to run.



    Whatever. It's simply irrelevant to try and use Pre battery life as any kind of indicator as to what might happen if the iPhone allowed background apps. What would be interesting and relevant is to hear from people with JailBroken phones who run background apps on their iPhone, and what the effect is (if any) on battery life.





    Quote:

    Most people are not directly dealing with resource management on their computers. The most common solution to a slow running computer is to shut it off and turn it back on, which in effect clears out the cache and memory. Few people go through their system to find what processes are using up resources.



    Most people who use OS X know how to use Cmd-Tab and Q to "resource manage" their active processes. We're not talking Activity Monitor and checking memory/cpu usage, just simple "get rid of the stuff I'm not using".
  • Reply 14 of 24
    bbwibbwi Posts: 812member
    Quote:
    Originally Posted by michaelab View Post


    OTOH maintaining a persistent IP connection means the phone is transmitting and receiving very frequently, and that's what kills the battery life.



    Not necessarily, if both devices agree, I can create a connection and just leave it open for a period of time with no Keep Alive packets needed.



    Quote:

    It's quite simple. With Push disabled I can easily go 24-36 hrs between charges. With Push enabled that number drops consistently below 12hrs.



    But are you using the phone more or just turning the phone on and letting it sit for 12 hours? Again, I think its too early to tell if background processes or push is better. I think Apple envisions that people could potentially have dozens of applications "running" at any one time with push. If you had dozens of applications running in background processes the phone would be as peppy as your Windows Vista computer is. I think clearly Push scales better and is more resilient against the degradation of a users experience as apps are installed.



    By implementing push tho they have introduced another point of failure, APNs. Didn't Phil say that the Blackberry architecture was inferior to ActiveSync because it introduced another point of failure, the NOC? Seems like that is exactly what they've done.
  • Reply 15 of 24
    Quote:
    Originally Posted by bbwi View Post


    But are you using the phone more or just turning the phone on and letting it sit for 12 hours?



    The 36 hours with push disabled and less than 12 hours with push enabled are values from a typical weekday where I use the phone normally. I ran a week or two with push disabled and a week or two with it enabled. Obviously some days were better than others but 36hrs vs 12hrs was about the average.



    Quote:

    Again, I think its too early to tell if background processes or push is better. I think Apple envisions that people could potentially have dozens of applications "running" at any one time with push. If you had dozens of applications running in background processes the phone would be as peppy as your Windows Vista computer is. I think clearly Push scales better and is more resilient against the degradation of a users experience as apps are installed.



    I agree, and clearly push is a better option for apps such as IM clients, where you'd need to keep a network connection going anyway, but I think there's room for allowing some level of background apps.
  • Reply 16 of 24
    tenobelltenobell Posts: 7,014member
    That is definitely not an accurate way to isolate the power draw from push notifications. No credible battery test is judged from everyday use. Too many different factors are introduced.





    Quote:
    Originally Posted by michaelab View Post


    The 36 hours with push disabled and less than 12 hours with push enabled are values from a typical weekday where I use the phone normally. I ran a week or two with push disabled and a week or two with it enabled. Obviously some days were better than others but 36hrs vs 12hrs was about the average.



  • Reply 17 of 24
    pmzpmz Posts: 3,433member
    Quote:
    Originally Posted by michaelab View Post


    Apple's justification (at least one of them) for not allowing App Store apps to run in background, is that apps running in background drastically reduce battery life, and that's why push notifications are a much better idea for getting much of the same functionality. The thing is, enabling push notifications also drastically reduces battery life. In my case I went from getting at least 24 hours standby time to be lucky to get 12 hours standby time with Push enabled. The way that Apple does push (by attempting to maintain a constant network connection open) is obviously a huge battery hog.



    I'd be curious to know how much of a battery hog (if any) running background apps on an iPhone really is. Anyone here with a JailBroken phone running background apps have any info? Given that the iPhone already runs a bunch of (Apple) apps and processes in background anyway it's difficult to imagine that a reasonably well written 3rd party app would have much, if any, additional impact on battery life.



    I'm inclined to believe that Apple had other reasons for not allowing background apps and just peddled the "battery life" excuse as a cover up. I suspect that they eventually will allow background apps and are just waiting to get the SDK and/or UI for it perfected, much the same way as they tried to sell everyone the "Web Apps in Safari is all you'll ever need" whilst they were still developing the proper iPhone SDK.





    Wrong and speculative.
  • Reply 18 of 24
    Quote:
    Originally Posted by TenoBell View Post


    That is definitely not an accurate way to isolate the power draw from push notifications. No credible battery test is judged from everyday use. Too many different factors are introduced.



    Ok, so it's not a peer-reviewed scientific study that will be making the pages of any Journal, but the reliable and consistent nature of the difference over long time periods (and amongst many iPhone users, not just myself) cannot be dismissed as circumstantial. The long time periods involved even out the possible effects of other factors.



    Quote:
    Originally Posted by pmz View Post


    Wrong and speculative.



    If you have nothing to say, say nothing.
  • Reply 19 of 24
    tenobelltenobell Posts: 7,014member
    There are some important details you leave unknown and at best untested, that are factored into a proper battery test. Namely the type of wireless network used and how long it was used. Was the phone on EDGE, 3G, or WiFi? Battery life is entirely different on each. On a general day how long was the phone on either one?



    There are many other examples of activity that can render your test completely unreliable. At best you can say in your own daily usage these are the results you've found, but it's difficult to say definitively that push cuts 24 hours off of the battery life.



    Quote:
    Originally Posted by michaelab View Post


    Ok, so it's not a peer-reviewed scientific study that will be making the pages of any Journal, but the reliable and consistent nature of the difference over long time periods (and amongst many iPhone users, not just myself) cannot be dismissed as circumstantial. The long time periods involved even out the possible effects of other factors.



  • Reply 20 of 24
    Quote:
    Originally Posted by TenoBell View Post


    but it's difficult to say definitively that push cuts 24 hours off of the battery life.



    That's not what I'm saying. I'm saying that in my daily usage pattern push reduces my battery life by about 70%. Many of my friends and colleagues with iPhones experience similar results. IMO there's enough evidence to say that Push is likely to take a significant amount off battery life whatever the conditions. As ever of course, your mileage may vary.



    Even Apple's guidance on iPhone battery life lists Push Notifications and Push Mail as #2 and #4 on their list of things to disable to increase battery life.
Sign In or Register to comment.