Why there is no swap in iOS

Discussion in 'iOS 9' started by Ganoninc, Nov 25, 2015.

?

Should Apple activate swap in iOS

  1. Yes

    40.0%
  2. No

    60.0%
  1. Ganoninc macrumors newbie

    Joined:
    Nov 25, 2015
    Location:
    Lille, France.
    #1
    Hello,

    I see a lot of threads about how slower became the iOS devices through the years and one of the main reason is the lack of ram.

    On classical computers, there is a special area called swap on the hard drive that is used by the operating system when the RAM is full. This solution used to be slow because the read and write operations on hard drives are slow but it made computers able to run a lof of applications without closing the previous opened ones.

    Since many years now, hard drives are replaced by SSDs. Those drives are really fast and makes the swap comfortable. Even when the RAM is full, the computer is still fast.

    The memory used by the SSDs is present in the iOS devices too.

    Let's assume that Macbook Pro Retina, Macbook Air and iOS Devices use the same memory for data storage and that OS X and iOS share the same kernel base.

    Why there is no swap in iOS ?

    It would help devices with 512mb of RAM like iPhone 4S and iPad 2 to run a lot better. The apps wouldn't close as fast as they do currently. The system elements such as keyboard, control center, notification center could stay in the memory and the swap area and make the iPhone respond faster.

    The devices with 512Mb of RAM are slow because they need 512Mb extra memory. A simple 512Mb of swap in the storage area would help a lot and it wouldn't require a lot of free space in the stockage area.

    Some people would say flash memory has a limited write cycles life so the swap is dangerous and it would kill the iOS devices.
    But the swap is enabled on Macbook Pro Retina, Macbook Air and the new Macbook so why not on iDevices ? They use the same stockage memory.

    I think iOS devices become unusable long before the flash memory dies.

    We should ask Apple to activate the swap on very old iOS devices.

    What do you think of that?


    PS: sorry for my english, I'm french.
     
  2. keysofanxiety, Nov 25, 2015
    Last edited: Nov 25, 2015

    keysofanxiety macrumors 604

    keysofanxiety

    Joined:
    Nov 23, 2011
    #2
    The Flash speeds on the older devices are a lot slower so it's not as clear-cut a solution as that. Also iOS does use the disk as virtual memory in a sense, although it's not exactly like OS X. From what I understand, when the RAM gets full, it just runs a new application from the disk rather than loading it into active RAM. This is much quicker than writing an open app from RAM to free disk space.

    If it didn't have any sort of memory management, then when you hit the RAM limit, it would just kernel panic the OS, completely freeze, or at best just crash every application in open memory. And a lot of the performance issues come from newer iOS iterations being optimised for the faster processors rather than exclusively being a RAM bottleneck.
     

Share This Page