Jaa


More Persistent Storage Stuff part 2

A continuation of my "More Persistent Storage Stuff" entry, which is a follow up to "Why Persistent Storage Is A Good Thing."  These are responses to questions asked in various places as a result of the first post.

Performance concerns
Flash can be 10+ times slower than RAM.  Won't that mean the device is going to crawl?  No, not really.  Again, remember that this isn't a new trail we're blazing.  We've been doing this for years, and many others did it before us.  In many cases, we buffer the data first and write it out in the background.  In other cases, even going ten times slower isn't something you'll notice.  Something could go from taking 1/100 of a second to 1/10 of a second and you still wouldn't notice it.  Also realize that this change doesn't do much for application launch times.  Application code has always been stored in ROM.

That said, flash is slower than RAM, and there are places you'll notice it.  Any place where you need to write a LOT of data, you'll likely see a slowdown.  For instance, the initial sync where you've got 400 contacts, 100 calendar appointments, and 1000 emails (that's typical for me).  I definitely see that taking longer than it would if it were going into RAM.  But subsequent syncs don't bother me much.  Another potential place is large 3rd party applications.  A while ago I wrote a flashcard program to help me study Japanese.  The dictionary that it needed to load on start was 5 Megabytes.  Storing that in RAM would have gone faster than storing it in flash.  Of course, I still stored it in flash (on a storage card), because I didn't want to eat up that much RAM.  But if you've got an app with an enormous (for a small device) dataset that you need to read and write regularly, you may see it take longer than it used to. 

But I don't expect typical user scenarios of reading email, browsing the web, listening to music, etc. to be affected.

Is 64M RAM enough?
A number of posters have said that they want more than 64M of RAM.  I have a number of things to say about this. 

  • Realize that moving to Persistent Storage (PS) frees up a significant amount of RAM.  Before PS, RAM was split between storage and applications.  Every file you put on your device lowered your RAM by the size of that file.  By moving files to PS, all of the RAM can be used as RAM.
  • Microsoft doesn't have any "maxium RAM" requirements.  If an OEM wants to put in more than 64M, we won't stop them.  We do have a battery life requirement, though, so they have to put in a big enough battery to compensate for more RAM.  If there's a market for devices with more than 64M, an OEM will release a device to serve that market.
  • Because of the 72 hour rule, it was almost impossible to do 256M RAM devices in the past.  Now that PS has removed the 72 hour rule, those devices are possible.  I don't think it's likely that you'll see 256M RAM devices, but, again, if there's a market for them, OEMs can make them now.

Modern batteries don't like to be discharged
Lithium Ion and Lithium Polymer batteries don't like being fully discharged.  If you let them discharge completely, it will start to damage them.  An argument has been made that, since it was catastrophic to discharge the batteries before (you lost your data), no one did.  Now that you don't lose your data, maybe people will be more lax about this and ruin their batteries as a result. 

This is true, but I disagree that it's an argument for not going to PS.  If you're concerned about your battery, don't let it discharge all the way.  That was true before PS and it's still true afterward.  If anything, the world is in a better spot now, because PS makes it easier to do removable batteries in PocketPC.  Pre-PS you ran the risk of losing your data on swapping batteries, so OEMs avoided it.  Now that's not a problem, so OEMs have an easier time doing removable batteries.  At least with removable batteries, if you ruin one, you can get a new one for a fraction of the cost of a new PocketPC. 

Suspend vs. Shutdown
I didn't go into enough detail on this.  Although PocketPC now has the Smartphone Persistent Storage scheme, it still has a different power scheme.  The differences in their power schemes would fill an entire blog entry (yes, I'll do one on that subject later).  But, briefly, the PocketPC power system didn't fundamentally change.  It still suspends, just like before.  It doesn't do a full shutdown, the way a Smartphone does.  The main differences in this regard between WM2003SE and WM5 are that the 72 hour requirement has been removed, and we flush cached data to flash on suspend.  (We do it with the screen off so you don't realize we're doing it.)

Ram vs. other power drainers
People correctly pointed out that the backlight and the CPU burn more power than the RAM does.  However, I ask that you reread my description of the 72 hour rule.  That rule caused a 128M RAM device to reserve half of a typical battery's charge.  Removing that is huge.  Also, the typical user has his or her device suspended for a larger percentage of time than it is running.  Most people have it suspended while they're sleeping, etc.  When the device is suspended, the backlight, CPU, and screen are off.  During that time, your RAM is still burning power.  On a non-phone device, RAM is basically the only thing burning power when suspended.  Twice as much ram there means half as much suspend time.

Other things we could have done instead
Some people asked why we didn't give you a slider to make your own choices regarding the 72 hour rule.  Many of the iPAQ devices do exactly that.  We didn't go that route because the 72 hour rule wasn't the main problem we were trying to solve.  The main problem we were trying to solve was the bad story that, if you forgot to plug your device in over the weekend, you'd lose your data.  I know that power users learned to live with that.  I've never lost my data due to forgetting to charge my devices.  But the story had to be fixed.  Devices shouldn't bend us to their needs.  It is the devices that need to bend to our needs.  And needing to worry about finding a power outlet every few days to keep something catastrophic from happening was just wrong.  That was the problem we were trying to solve.  Being able to remove the 72 hour rule was gravy.  Really, really tasty gravy, but gravy nonetheless. 

Others asked why we didn't implement what amounts to laptop hibernate.  We talked about that.  Trouble is, it's terribly inefficient.  Either you write the entire contents of the user store to flash, or you implement everything we did for persistent storage.  The former would be too slow.  And, if you're doing the latter anyway, why not just go all the way to PS and not waste the RAM?  The basic trouble with the hibernate solution is that it requires two copies of everything, one in RAM and the other in ROM.  Laptops can get away with this because they have more storage than they know what to do with.  But that's not the case yet with PocketPCs.  So we've got to be efficient with our use of RAM and ROM.

What happens when a bad guy gets my device?
Someone posted that they felt secure in the knowledge that if someone got their device, it would eventually run out of power and their data would be cleared.  This is a false sense of security.  If you've got data on your device you don't want to fall into the wrong hands, you absolutely, positively, should password protect it.  If someone takes your device to get your data, they're not going to forget to plug it in. 

As for the question of whether or not there's a mechanism to clear your data (cold boot) in Persistent Storage, yes there is.  All OEMs will provide some mechanism for erasing your user data.  The mechanism will be different from device to device, but every device will have it. 

Innovation
There have been a number of posts berating us for waiting until 2005 to do PS on PocketPC.  We deserve those.  I wish we had done PS a long time ago.  No great conspiracy here.  Just a ton of stuff to do and not enough time to do it all.  You can argue that we should have done PS before features X, Y, or Z that we did in the past, but other people would say that, no, those features were more important.  We're doing our best to make the right product, and we're willing to keep working at it.  Whether PS is thirty years late as a recent feedback implied or just in time as another did, I'm just glad we've got it now.

Others have pointed out that this or that product had PS before us, so therefore we're not "innovative."  Folks, I never said Persistent Storage is innovative.  I said that it's a good thing. 

Some of the stuff we do is innovative.  Some of the stuff we do is keeping up with the Joneses.  This is how every single competitive product on the planet works--from automobiles to zoology.  And this is how it's been since the dawn of time.  Some of you will scream shrilly that "M$" has never done a single innovative thing.  And, though I disagree, nothing I could ever write would convince you otherwise. 

No, there's nothing innovative about Persistent Storage.  If a marketing guy tries to tell you otherwise, send him to me.  But PS is a good thing.

Mike Calligaro

Comments

  • Anonymous
    July 18, 2005
    Yo, Mike, VERY well said. Congrats!

  • Anonymous
    July 19, 2005
    With Windows Mobile 2005 coming to our cell phones and PDAs soon, you may want to become accustomed to the idea of "persistent storage", which means that in future all of your personal data, user-installed applications, and updates are stored in...

  • Anonymous
    July 19, 2005
    I work with WinMobile PPC and SmartPhone quite a bit and the dead battery killing my GPRS settings on the PPC was the cause of more cursing towards Bill Gates than anything since my friend's Windows ME installation in 2001.

    I doubt you'll get many developers or power users griping about this. The people who have thier PPC in the cradle 90% of the time might complain about the speed but only because they have benefitted from the design error up to this point.

  • Anonymous
    July 19, 2005
    PS seems definitively a good thing on paper.

    But what concerns me is the fiability of the Filestore.
    On many devices I have seen the Filestore disappear without apparent reasons (Ipaq 19xx ; Toshiba e8xx, etc.).
    The filestore wasn't appearing anymore using the build-In explorer, the memory settings panel or any other programm.
    Most of the time an hard reset resolved the issue, but not always.

    I haven't meet this problems yet on my Hx4700, but I don't use the filestore at all (I'm using a SD card for installing my programms)

    Is Filestore fiability going to be improved? Have you taken into account such problems?
    What will be happening on a WM2005 devices if the filestore became corrupted?

  • Anonymous
    July 22, 2005
    Since last night (Thursday), my smartphone has, literally, been my conduit to the world; I had to drive...

  • Anonymous
    July 24, 2005
    Blog link of the week 29

  • Anonymous
    July 25, 2005
    Although very interesting this "persistant memory" is confusing a lot a potential Pocket PC buyers who want to buy a VGA PDA the coming weeks....me included. With WM 2005 around the corner..should I buy a 64 Mb ROM device (with 128 Mb RAM - Loox 720 for example) or a 128 Mb ROM device (with 64 Mb RAM - Dell x50v for example)???? if waiting for these updates devices is not an option.
    I've asked questions about this on some fora..but never got a convincing aswer. Perhaps something to add in this blog ;-)

  • Anonymous
    July 26, 2005
    Seeing all the new features comming in WM5 I wonder if it is a good idea to buy an actual handheld today.

    I can bet OEM are working on supporting DirectX, PS, etc.

  • Anonymous
    July 26, 2005
    Dell has announced that they will be producing a WM5 upgrade to the X50v. I haven't heard (one way or the other) whether the Loox will be upgraded.

    In terms of which stats are better for persistent storage, more ROM is better than more RAM.

    As for whether to buy now or wait for a WM5 product, that's a classic problem with no easy answer. The only right answer is to weigh the tradeoffs and decide which are most important to you. Though, you can avoid the issue somewhat by buying a device today that has been announced to have a coming upgrade.

    Mike Calligaro

  • Anonymous
    July 28, 2005
    For the moment (WM2003 SE), 128RAM/64ROM is far better than the contrary.
    64RAM is not enough, you always have to take care to install programms in SD/CF memory card or ROM (which is not always possible, and will degrade performance for some programms)

    With WM2005, I believe 128ROM is not that much better than 64ROM, as SD card can be used instead of ROM.
    By the way, the Loox 720 is planned to support WM2005.

  • Anonymous
    August 06, 2005
    The comment has been removed

  • Anonymous
    August 06, 2005
    The comment has been removed

  • Anonymous
    August 08, 2005
    Buzz,

    The memory slider certainly was confusing. Fortunately, it's gone in WM5. Now that control panel shows you how much storage you have and how much ram you have, without a slider to mix them. People used to the old way will need to get used to it, but I think it'll make more sense to new users than the slider did.

    You're certainly welcome to link back to these blogs on your website. I'd prefer you didn't copy and paste the text though.

    Mike Calligaro

  • Anonymous
    August 09, 2005
    Thanx Mike,
    I didn't copy and paste them. ;o) that's why I asked first.
    But I will sure link it.

    thanx again
    buzz

  • Anonymous
    August 15, 2005
    Mike,
    let's say my phone ( WM 5.0 powered )goes to idle - you said RAM should not be refreshed in order to save power , right ?
    this applies only to XIP based OS images,true ? (if my OS is RAM based then my OS will go away if not refreshing the RAM )

  • Anonymous
    August 16, 2005
    According to HP support. HP has no such mechanism to clear persistant storage for the h5500 series IPAQ running WM2003.

  • Anonymous
    September 08, 2005
    MikeCal has posted a series of articles over on the Windows Mobile team blog that cover Persistent Storage...

  • Anonymous
    April 23, 2006
    The comment has been removed

  • Anonymous
    June 25, 2006
    As for palm (OS5 with a 3rd party app), now there is a way for reducing the amount of power which is left in the battery and that cannot be used.

    WM5 and some PPC2003 do this. But some older don't. Hmm.

    This is an OS-BASED feature. I wonder if it is possible to Software-override it (it is already done, in some way). I am right, am I not?

  • Anonymous
    June 26, 2006
    The old 72 hour rule is an OEM feature brought about by an OS licensing requirement.  On devices with volatile storage (where you lose your data if the batteries die) we required that a user could leave the office on Friday with low batteries and not lose his data by Monday when he got back to the charger at the office.  

    The way this requirement was handled was that the OEM's battery driver reported that it was critically low when it still had 72 hours of standby power in it.  The OS automatically shuts down whenever the battery reports that it's critically low.

    There were a few devices from HP that provided a slider that let the user say how long he wanted the device to last after critical shutdown.  That slider was basically a way around the 72 hour rule.  It shipped with the slider on 72 hours, thus meeting our requirement, but allowed the user to change it after the fact.  

    Because the code that makes this decision is in the OEM's battery driver, there's no general solution to users changing it.  Every OEM device could potentially be different.

    Remember that the 72 hour rule was removed in WM5.  There's not much chance of anyone doing new development to enable ways around it on WM2003 devices.  

    Mike

  • Anonymous
    July 02, 2006
    One of my colleagues Reed Robison published an internal summary of the great articles that Mike Calligaro...

  • Anonymous
    October 26, 2006
    Thanks for the great tips about <a href="http://eteamz.active.com/mailinglist/files/holidays-for-family.html"">http://eteamz.active.com/mailinglist/files/holidays-for-family.html" title="holidays for family">holidays for family</a> and [URL=http://eteamz.active.com/mailinglist/files/holidays-for-family.html]holidays for family[/URL]

  • Anonymous
    October 31, 2006
    How does one add additional Persistent Storage? i.e. How can you move messages recieved via email or contact location from the built in ROM to say a 1 gig or higher MMC or CF card?

  • Anonymous
    April 04, 2007
    I'm developer. We have a java aplication, it has a database to store data. We save hundred rows a day in the database. What happend in this case with the ROM? is it going to crash? what happend if we store out database in SD card? the problem is solved?

  • Anonymous
    November 11, 2008
    <a href='http://psycomfort.com/forms/logfile/cache/news-215.html'>hmi</a> <a href="http://psycomfort.com/forms/logfile/cache/news-215.html">hmi</a> [link=http://psycomfort.com/forms/logfile/cache/news-215.html]hmi[/link]

  • Anonymous
    November 17, 2008
    sick things hidden in disney movies [URL=http://furmanka.com/list/attachments/files/page265.html]sick things hidden in disney movies[/URL] [url=http://furmanka.com/list/attachments/files/page265.html]sick things hidden in disney movies[/url] [url]http://furmanka.com/list/attachments/files/page265.html[/url]