The Performance Implications of Multitasking

I noticed that many users were frustrated that the split screen multitasking in iOS 9 was only being brought to the iPad Air 2 and future iPads. If you’re an iPad Mini 3 owner then I think you’re rightfully upset, as your tablet launched at the same time as the Air 2. Users who aren’t aware of things like how much RAM an iOS device has may see this as artificial segmentation. Unfortunately, it’s really a result of the fact that every iOS device before the iPad Air 2 had only 1GB of RAM at most. The iPad Air 2 has 2GB of RAM, and this is crucial to enabling multitasking. But with iOS already running into RAM limitations just running a single intensive app on 1GB devices, it’s very reasonable to question whether or not even 2GB is enough to be running two applications. There’s also the question of whether or not the CPU is up to the task. To try to answer these questions about CPU and memory usage I’ve constructed a couple of use cases which attempt to saturate these components of the system.

Since Apple’s default apps are so lightweight, it’s difficult to set up an actual CPU test for multitasking right now. During this test I had Photos in a 50/50 split with Safari, along with a video playing using picture-in-picture. Since nothing was going on in Safari the CPU usage was very low. Decoding video occurs on its own fixed function blocks as well, so there’s very little CPU usage there. If you decide to try and play Hi10P or HEVC files in another application then you might see CPU usage rise very high during video decoding, but that’s a very limited set of users.

I found that editing in the Photos app seemed to be the most intensive task that you can do with Apple’s default apps, and even it only uses 50-60% of a single core on A8X. Backboardd is also using an additional 24% of a core as it handles information coming from various device sensors and input. As far as Apple’s apps go, A8X is more than fast enough to handle running two applications at once.

Once you consider some more intensive third party apps things get a bit more stressful for the system. While I can’t test this with a split view due to the fact that no third party apps support it yet, you can see above that Adobe’s Photoshop Express application can use an entire CPU core and 65% of another simply by applying photos to filters and rendering the changes in real time. If you were to run two apps of this intensity you would still likely not saturate A8X’s CPU capabilities as you would need to be interacting with both apps at the same time, but it does highlight the possibility that if one application is doing any sort of intensive work on its own it could end up having a negative impact on the performance of the other active application. However, I think for 99% of use cases there’s nothing to worry about as far as CPU performance goes when multitasking on the iPad Air 2.

My test of RAM naturally involved Safari. Safari is an app that quite frankly does not work incredibly well on any iPad except for the Air 2. The reason I say this is because there’s a very rapid eviction of tabs due to the limited amount of memory on those devices. I can recall situations on iOS 7 where an iPad Mini Retina was unable to keep three heavy tabs in memory at the same time. In my test case I have Safari with 6 tabs open. These tabs are all pages from a certain technology website which has particularly heavy pages. With all six pages loaded into memory, I then open the Apple Maps app and enter a split screen view, and I then proceed to bring the map to a 3D city view which requires the caching of various models and textures in memory. Below you can see my observed memory usage.

As you can see, the Safari process and all its tabs ends up using a whopping 728.12MB of RAM. A 3D view of New York City in Maps uses another 322.73MB on top of that, for a total of 1.05GB. On top of that you’ll have something between 100 and 200MB used for general background processes and the iOS system. This makes it pretty clear why Apple has limited multitasking to only the iPad Air 2, as a use case with only two default apps can already use over 1GB before you even consider what the system needs. One could argue that Safari could evict tabs to free up memory, but there are other applications that can’t jettison memory that easily, and even then evicting tabs from memory creates a poor user experience. That brings us to the next question: is even 2GB of RAM enough?

Since most of Apple’s included applications are fairly lightweight, it’s safe to say that you won’t come close to using 2GB of memory even when multitasking unless you open a very large number of Safari tabs. However, many third party applications can be very complex. You could be handling very large images, or drawing complicated 3D scenes. Naturally, these applications will require more memory to keep all of the assets that they’re working with accessible.

The above image shows you the memory usage when the foreground app on a device is Paper by FiftyThree. This is my favorite mobile drawing application, and it’s what one would call a very simple 2D drawing app. You’re not working with extremely high res bitmaps, or RAW image files, or 3D models. Despite that, I was able to see memory usage peak as high as 376MB. In a theoretical case where one had paper in split screen view with Safari, your total RAM usage for the entire system would be somewhere between 1.1 and 1.2GB. This is still well below the total amount of memory the iPad Air 2 has, but a web browser and a simple 2D drawing app in split screen is hardly the most RAM intensive situation I can imagine. If you were to have two applications with a memory footprint as large as or even larger than my Safari example then you could end up running into the 2GB memory wall. This isn’t even considering the memory impact of picture-in-picture windows, or spikes in memory caused by loading in new assets due to the user resizing the split between two apps or interacting with the applications themselves. Even if you can manage two active apps and the system processes with 2GB of RAM, you may end up having to evict every other background application to do so.

The question now is what the solution to this potential issue is. The most obvious is to start shipping devices with more RAM. Apple has traditionally been very conservative with the amount of memory they include in both their mobile devices and even their computers, but in the mobile world it’s becoming a more pressing issue as applications become far more advanced to make use of the enormous increases in mobile processing power, while the amount of memory they can use hasn’t increased nearly as much. Outside of more physical memory, developers can optimize their applications to manage and use RAM as effectively as possible. There’s only so much that a developer can do to minimize memory usage, and beyond that there’s really only one more solution, and it’s not something that I ever expected to see in mobile in the same way it was implemented in PCs. That solution is memory mapped data, which you may also know as swapping to disk or paging.

iOS has actually supported memory mapped data for a number of years, but in iOS 9 Apple is making it more well known to developers and recommending that it be used to manage the memory use of applications rather than its traditional purpose of streaming large files or groups of files that couldn't all fit into memory at once. Apple’s recommendation is that it be used for unchanging read only data, such as images. While this is a “solution”, it introduces the possibility of the user encountering page faults, which is an error/exception that occurs when the system is trying to access memory that is mapped into virtual memory but not actually loaded into RAM. This is something that, for the most part, has never existed on mobile devices. The reason for this is that even with NAND based storage solutions that are several orders of magnitude faster than spinning disk storage, your system memory and cache are significantly faster. Quite frankly, this situation is embarrassing when one considers how much users pay for iPhones and iPads.

I think in most cases, the 2GB of RAM in the iPad Air 2 will be enough to handle two foreground applications. That being said, with 2GB of RAM it’s still possible that you could get dangerously close to having an active app evicted from memory if they're very RAM heavy, such as applications that work with complicated 3D models. Multitasking may also require many background applications to be killed. Even with tricks like compressed memory and high levels of memory optimization, the fact of the matter is that the amount of RAM shipping in iOS devices has needed an increase for a while now, and in the case of the iPad I think it needed to go beyond 2GB. Not only could there be issues in the future with the iPad Air 2, but Apple has been forced to block the split screen feature from every other existing iPad, which is ridiculous when you consider that the best iPad Mini you could go and buy before last week is on the list incompatible devices. Paging is not really an acceptable solution, as the latency of NAND is somewhere around 10x higher than DRAM, and 25x higher than L3 cache.

As for CPU usage, I think A8X is more than fast enough to handle 99% of use cases. If you have an app rendering a video and are also editing photos at the same time you may run into issues, but beyond those edge cases you can expect very fluid performance in both active applications. I'm interested in seeing how the iPad Mini 4 handles multitasking with its dual core Apple A8 SoC.

What would have been optimal for RAM would be if Apple had moved to 2GB with A7 to offset the additional memory usage of 64bit applications, and moved to 4GB in the next generation iPads (Air 2, future devices) to accommodate multitasking. An accidental leak from Adobe implies that the iPad Pro actually will come with 4GB of RAM which is great, but it's possible that the user experience may suffer in heavy use cases with multitasking occurring on existing iPads. Alternatively developers will be limited in the functionality and experiences they can provide in order to function within the limited amount of memory they have to work with, which wouldn't be a good situation either.

Multitasking On The iPad Under the Hood: UI Navigation, Input, App Thinning
Comments Locked

227 Comments

View All Comments

  • Speedfriend - Thursday, September 17, 2015 - link

    @melgross I have recently seen numerous tablets being used by businesses (restaurants, delivery companies) that were clearly no-name Android tablets designed for that specific tasks. Why would a corporate that needs a tablet for a single task buy a $500 iPad when they can get a $200 Android?

    iPad is now caught in the middle between cheap single task Androids and multi-task windowns 2-in-1s. Our CEO is obsessed with Apple products but we have gone Windows tablets and it looks like we are going to go full surface range soon (3 and Pros). Why, because an iPad is too limited even as something you just take to meetings with you.
  • FunBunny2 - Wednesday, September 16, 2015 - link

    -- a respected history of hardware-design and innovation..

    really, really now? Apple has always bought their silicon, 99.44% is off-the-shelf. Yeah, I know, the fanbois brag that the Ax chips are somehow blessed by Apple. Fact is: Apple only tweaked around the edges, using industry standard silicon design tools, a bit of cache added here and there. Just look at the BoM from any of the usual teardown sites. You'll see the fact: it's always other people's parts.
  • osxandwindows - Wednesday, September 16, 2015 - link

    So why is apple not using 8core chips ha?
  • Intervenator - Wednesday, September 16, 2015 - link

    I hope that post was sarcastic or it would really be funny.
  • damianrobertjones - Thursday, September 17, 2015 - link

    ...Because that would be too far a jump. Apple wants to MILK its customers for everything then can hence the small updates. Someone like Nokia committed a mortal sin as they released a 41Mp (36+5mp) camera phone while others are still messing with 20Mp.

    All about the cash.

    P.s. Android NEEDS more cores as it runs like a bag of crap.
  • calden - Monday, September 28, 2015 - link

    Actually Android runs just as smooth as iOS. The problem is skinned, custom versions of Android, i.e. TouchWiz. When I replaced TouchWiz with CM 12.1 on my Note 4, the system took up only 580MB, where as TouchWiz took up more than 1.5GB before a single app was even installed. I also installed the launcher SmartLauncher 3, the whole experience is lightning fast. Even when running multiple apps in the background, something iOS still can't do. I think it is ridiculous that a modern OS in 2015 cannot do something as simple as stream a movie to your TV and still allow you to use the device, iOS simply pauses, even disconnects the stream in some cases if you want to do something as simple as look up an actors name in IMDB. With my Android tablet I can not only stream a film to my TV but play a game like Modern Combat 5 at the same time. As a programmer I need to run a terminal app to stay connected to my firms server during trading hours as I have monitoring tools. IOS has terminal apps as well but I can't run them them in the background the entire day without iOS terminating it's connections. Again, I find this to be absolutely ridiculous as who wants to stare at a terminal the entire day, especially when I need access to my tablet or phone to do other tasks. Apple adding Pro behind the iPad doesn't automatically make it a pro device. IOS still has one of the worst document, file management systems on the market today. My Nokia 9500 from 2004 is light years better than what iOS provides, apps should never be allowed to manage their own files. Default apps, I still can't change the default apps in iOS, why? I have no use for Apple's included apps, if I had the choice I would immediately delete them from the system, as such I need the ability to select my own browser, email client, messenger, media player, etc. as the default applications. I find this tactic of not being able to select my own default apps in iOS highly anti-competitive. The EU went after Microsoft for including Internet Explorer in XP, even though the user had the option of choosing another browser as their default. Why hasn't Apple be scrutinized about this?
  • calden - Monday, September 28, 2015 - link

    I'm aware of those few audio and GPS apps that can run in the background in IOS, but this is a far cry than allowing any app that the user needs in the background. No, this has nothing to do with battery life, if it is than Apple really needs to rewrite iOS. My BlackBerry Passport, running three apps in the background, easily lasts the entire day on a single charge, actually it lasts a day and a half with moderate to heavy use. Android has the ability to select how many apps are allowed to run in the background, you can even set it to 1. So if people feel like their apps are eating up their battery they can control the amount of running apps. Apple could easily implement such a feature, they don't though, which means they have all the control, they dictate how the user uses their own devices. iOS is a wolf in sheep's clothing, looks pretty, inviting but once you start to do real work you encounter a brick wall a 20 stories high. How many times have you iOS users logged into iCloud on your device, I had to do it over 25 times to cover every app. Why, why do I need to log in even twice, once should be enough, in Android upon setting up my Google user that was it, from that point on every app that could communicate with Google Drive would automatically be setup. This is because the apps talk to the system at the lowest level, iOS requires spaghetti API's, a spiderweb of tunnels trying to pass info to each other. The Share TO function in iOS works only if the app dveloper has created a share profile. Why can't the system just dynamically create these Share To lists like Android 5.1.2, SailFish 2.0, Windows Mobile 10, BlackBerry OS 10.3.2 by looking for every compatible app that is installed and than listing. No, instead iOS uses this half ass API system. What about mult-user support, will never happen in iOS because of the way it handles files. To support multi-users in iOS each user would have to reinstall each app over again to distinguish each users. They could embed the users info in the file's metadata so the app can distinguish each user but that is just hacky at best would and how would these modified files react when used on other systems. IOS is definitely not a pro system and anyone thinking differently is either lying to themselves to protect their beloved Apple brand, aren't professionals themselves so don't reall understand the meaning or are working around these limitations, fighting the system at every point to get their work done which falls in line with point one, their lying to themselves.

    I'm not saying that iOS devices don't have their uses, they do. They make great consumer devices for media consumption, social media, gaming, drawing and other artistic apps, music and music creation, etc. However as a productivity tool these devices are highly limited and can't compete with the likes of a Surface Pro 3 or even Surface 3. Even an Android tablet would be a better option. With my Nexus 9 I can log into the LDAP and gain access to all my allowed users NAS storage, mount it as a local asset. Set file extensions to open up certain apps, etc. Trying to do this in iOS is like trying to put a round peg into a square one. You can do it with a bit of force but your going against it's designed purpose. Apple needs to completely rewrite iOS, combine many functions found in OSX before I would ever consider using another mobile device from Apple.
  • mikhapop - Monday, September 28, 2015 - link

    you really nailed it, i am a web developer and i often fail to tell my friends how the ios is very limiting for even the basic stuff (my basic stuff). android is far better as far as the os go. Now i am using a surface pro 3 and never looked back, very good in meetings, and it is now my main machine for 98% of my work.
  • blackcrayon - Wednesday, September 16, 2015 - link

    Sounds like you know close to nothing about the Ax chips. They are custom Apple designs, and they also optimize their OS for them. I bet you thought Intrinsity and PA Semi were just marketing facades that didn't actually do anything before Apple acquired them years ago, right?
  • KoolAidMan1 - Wednesday, September 16, 2015 - link

    Apple spent billions acquiring semiconductor companies and is one of the few companies along with Qualcomm that has a license to make ARM chips. Anand himself highlighted this while showing that Apple's custom designs matched or exceeded Intel's Bay Trail.

    You really think their custom designs are something to be dismissed just because of the name on the package? The fanboy is strong in your posts

Log in

Don't have an account? Sign up now