Slashdot Mirror


Flash Memory, Not Networks, Hamper Smartphones Most

Lucas123 writes "New research shows that far more than wireless network or CPUs, the NAND flash memory in cell phones, and in particular smartphones, affects the device's performance when it comes to loading apps, surfing the web and loading and reading documents. In tests with top-selling 16GB smartphones, NAND flash memory slowed mobile app performance from two to three times with one exception, Kingston's embedded memory card; that card slowed app performance 20X. At the bottom of the bottleneck is the fact that while network and CPUs speeds have kept pace with mobile app development, flash throughput hasn't. The researchers from Georgia Tech and NEC Corp. are working on methods to improve flash performance (PDF), including using a PRAM buffer to stage writes or be used as the final location for the SQLite databases."

11 of 121 comments (clear)

  1. Cut back a little by Waccoon · · Score: 4, Insightful

    While I sympathize with developers who have ambitious ideas, the bottom line is that you have to develop within the limitations of the hardware. If your software is too slow or otherwise suffers in performance, then your software is simply too slow.

    Cue stories about how RAM chips were too slow to keep up with cutting-edge video controllers in the 90's.

    1. Re:Cut back a little by tlhIngan · · Score: 5, Interesting

      RAM speeds have not been a significant issue for some time now. Go and read some of the performance tests done recently on various speed RAM, even jumping from 1333 to something like 2133 DR3 RAM has such an insigificant performance change on the rig that it is clear memory is not the bottleneck nowadays. The Bus, HDD etc are the bottlenecks that hurt more than anything else.

      False.

      RAM speed does have a significant impact. It's just that cache hides a LOT of the impact. If you ever disable the cache on your CPU, your computer would feel like it was 15 years old - it's that slow.

      Now, one thing about RAM - RAM hasn't actually gotten significantly faster - the clock speeds may have gone up, but the latencies have gone up as well. The faster RAM may have true access times (measured in nanoseconds) close to that of the slower one, especially the cheaper RAM.

      But a modern CPU is very cache dependent. Hell, even the little ARM in your smartphone suffers tremendously when cache is off. (I should know - I've had to do actual timing tests of the ARM caches.).

  2. Re:A truly stupid comparison by Microlith · · Score: 5, Interesting

    SSDs and the eMMC NAND storage inside smartphones are wildly different, even if they are fundamentally the same concept.

    SSDs get all of their speed from massive parallelization, writing to and reading from multiple die at once. Often these die tend to consume a bit more power, allowing for faster overall access. In smartphones, you usually have eMMC as the primary NAND device. These are basically high capacity, soldered down SD cards packed with several high density MLC NAND. You have drastically fewer IO channels, no DMA capability (it's all PIO via the CPU,) and slower NAND due to reduced power requirements.

    This is why watching your memory consumption is essential on mobile devices, and why optimization for each device has to be done. The moment the CPU has to access the NAND, you're going to take a performance hit no matter how many cores you have.

  3. Re:Why not a ramdrive? by Microlith · · Score: 4, Insightful

    RAM consumes a lot of power, far more than a NAND disk that can be powered down in between accesses.

  4. Choose two... by Anonymous Coward · · Score: 4, Insightful

    Reliable, fast, energy efficient. Choose two.

  5. Re:A truly stupid comparison by Nemyst · · Score: 4, Funny

    The good term is "Apples and Androids", obviously.

  6. Could have told you that... by aaronb1138 · · Score: 5, Interesting

    It is nice to see that there is an actual effort to make an empirical test, but I think most techies had this figured out long ago. The simple test is boot time on the devices. A relatively small OS which typically takes 2+ minutes to cold boot, yeah sounds like a storage issue.

    Fixing the issue with some form of data striping would be attractive, but chews battery for each additional chip. Some kind of balloon-able RAM buffer configuration would work nicely, where the buffer RAM was turned off when the device was not in active use or where individual modules could be brought online as needed.

    Frankly, Microsoft pointed at flash as being a speed culprit early on with their requirements for WP7 phones for add-on, non-removable storage expansion micro SD cards. Sure there were a lot of people all gruff and bemoaning the double price premium for Microsoft certified micro SD cards, but it was mostly just a lack of understanding of the needs for device performance. If I recall correctly, Microsoft had somewhere around 10-12 MiB/S read and write and I/O per S requirements which put most cheap commodity flash modules out of the running. I would also guess that WP7 stripes data between the on board and add-on SD card or otherwise uses some kind of secondary caching algorithm since the micro SD cards get married to the device.

    In the Android world, plenty of RAM cache hacks have been implemented, most notably some in Cyanogen and similar. Consider the technical implications of this post at XDA forums regarding I/O schedulers: http://forum.xda-developers.com/showpost.php?p=22134559&postcount=4

    As an anecdote, the most frequent crashy app on my Android device is the Gallery. It tends to have all kinds of issues with the scheduler as it is reading images and creating thumbnails, likely due to flash access speeds.

  7. Re:Or, you know, maybe by icebike · · Score: 5, Informative

    writing smaller applications? Maybe, you know, stick to one thing and master it instead of spewing forth so many .

    An interesting comment, but not the focus of the linked article.

    Its not about the size of applications. Large reads into memory of big applications is not the problem, as this happens with sequential reads, which are very fast on the media type they were looking at.

    Its the small RANDOM read/write units that cause the problem, the small sqlite database updates to databases stored on the MicroSD card that are the problem.
    The recommendations for placing often used sqlite databases in RAMdisk yielded a tremendous performance increase because it eliminates tons of little random read and write operations that tend to be scattered all over the microSD card. This is buried in page 10 of the Actual Research document, but pretty much glossed over in the linked article. This would require a bit of an OS re-engineering, on the part of smartphone OS designers, such as offering APIs to do much of the routine data storage that these apps all end up using. That storage would be in ram, backed up to MicroSD in a more efficient manor.

    Programmers tend to heavily use the general-purpose
    “all-synchronous” SQLite interface for its ease of use but
    end up suffering from performance shortcomings. We
    posit that a data-oriented I/O interface would be one that
    enables the programmer to specify the I/O requirements
    n terms of its reliability, consistency, and the property of
    he data, i.e., temporary, permanent, or cache data, with-
    out worrying about how its stored underneath.

    Yes, ramdisk can go away on a un-planned phone reboot, but if the RAMdisk was used as a cache, and occasionally written to disk performance would be much better, because you find these little sqlite databases used all over Android and IOS.

    --
    Sig Battery depleted. Reverting to safe mode.
  8. Re:Or, you know, maybe by __aaltlg1547 · · Score: 4, Interesting

    A couple points:

    1. Smart phone makers have no control of what crap software you're going to stick on their phone -- only the crap software that comes preinstalled.

    2. The former is the point of why consumers buy smart phones in the first place.

    3. The smart phone makers have a big incentive to find a way to make the hardware faster because running your apps faster is a selling point.

  9. Re:Or, you know, maybe by arth1 · · Score: 4, Informative

    Its the small RANDOM read/write units that cause the problem, the small sqlite database updates to databases stored on the MicroSD card that are the problem.
    The recommendations for placing often used sqlite databases in RAMdisk yielded a tremendous performance increase because it eliminates tons of little random read and write operations that tend to be scattered all over the microSD card.

    How about the recommendation to not use sqlite whenever a flat file works better? Do one write instead of database operations which cause multiple blocks to change even if you only change one thing.

    And if you have to use SQL for whatever reason, don't use indices unless absolutely necessary. It seldom is, despite what school has taught you. The index has to get updated too, which causes additional non-sequential writes. The minor speed boost you may get from selects are easily eaten up by the major speed bumps you cause on inserts and updates.

    An embedded system, which this should be treated as, isn't a miniature version of your desktop computer. And an SD card isn't a miniature version of a hard drive, or even an SDD. You have to think about minimizing writes and especially random writes. Not just minimize the number of high-level-abstracted changes, but actual low-level writes caused by them. Because there isn't a 1:1 correspondence.

    Also, memory is at a premium. Dropping pages really hurts speed. Don't rely on garbage collection as a substitute for using less memory or freeing up memory manually.
    Don't hang on to resources in case you may need them. Be cooperative, and close the sockets and file handles when you don't use them, because other parts of the system may benefit from that memory. CPU is rarely the issue, so don't worry about CPU outside identified bottlenecks. Worry about being a resource hog, because that causes the entire system to slow down, and drag your app with it.

  10. Gee storage is a bottleneck by Osgeld · · Score: 4, Insightful

    Isn't this true with any computer system since the dawn of computers?

    from plugging in jumper wires to transfer a program from paper to memory, to tape streamers, to magnetic disks, to flash the slowest thing for a computer is its mass storage, always has been, and will continue to be for a very long time