The Swaporific N810

I only discovered today that the n810 doesn't have any swap file turned on by default. It has only 128Mb of memory, which is quite easy to fill up. And when you fill up the memory you don't get a 'consumer friendly dialog' telling you that your machine is full. No instead of anything helpful, the machine will behave slowly, erratically and then ultimately crash. And after is has crashed you will often find that it won't boot anymore and you need to restore your root partition from a backup.

Read this review about the n810, and look for phrases that might hint the author has hit problems with not having a swap file: still isn't a perfect experience, thanks to lagging performance

..really this device needs to be faster in every way. We'd like to see apps pop open instantly, and YouTube videos play smoothly

The worst part, though, was the crashes. Often we had to close out of programs that became unresponsive, usually the Maps program or the Web browser, and a few times we found it necessary to restart the device entirely when ran app simply wouldn't open

I might be wrong and maybe the above problems weren't to do with running out of memory or not having enough memory, but it sounds a lot like it might be.

I've been having problems all the time with running out of memory when compiling stuff, and was about to give up trying to build anything serious on the device itself when I stumbled upon this post. The 'Virtual' tab under 'Memory' in the control panel allows you to set up a swap file '/media/mmc2/.swap' of up to 128Mb on the internal flash card. If you are concerned about wearing out the flash you can alternatively set up a 256Mb swap file on the exchangeable flash card, from the command line like this:

dd if=/dev/zero of=/media/mmc1/.swap bs=1M count=256
mkswap /media/mmc1/.swap
# Add this line to /etc/fstab:
/media/mmc1/.swap    none    swap    sw    0    0
# Add this to /etc/init.d/rcS, so that the swap mounts on startup
swapon -a

The n810 is so very nearly a great device, but little things like not having enough memory can spoil it. I think it really needs 256Mb of DDR ram instead of 128Mb, and then that would allow the device to run more apps, double buffer widget painting, have more than 64k colours with alpha channel and so on. But on top of that, the well hidden techie style 'Virtual' tab in the control panel with various settings of memory sizes, to turn on 'swap' is just so consumer hostile. If I'm a techie and didn't even realise about this problem for three weeks, what chance has an ordinary person?

baldhead root 501% swapon -s
swapon: invalid option -- s
BusyBox v1.6.1 (2008-05-22 10:32:35 EEST) multi-call binary

Usage: swapon [-a] [DEVICE]

Umm, well I'd like to be a fan of BusyBox too, but the above is a typical experience with the thing. But sorry I've done enough ranting for now..

Apologies to Nokia who kindly donated lots of n810s to the KDE devs, I still think it's great and am very excited about it, and I hope I'm not looking a gift horse in the mouth.


Stop thinking like a desktop guy!

128 MB is plenty of ram for an embedded device. In fact, its quite enough. Besides, a flash drive is not like a hard disk at all. It has very limited writes, so using swap on a flash chip is actually wearing it out faster than needed.

If you need more than 128MB ram on a handheld device, than you need to optimize whatever you are trying to run.

By Lorn Potter at Thu, 09/11/2008 - 09:15

You're thinking like a desktop guy

Yes, that's true, but I've been programming desktop computers since they had CPUs like twin 64k Z80s, and so as far as I'm concerned the n810 is a powerful linux computer. That's why I don't really believe in cross-compiling on my desktop machine, and have been building Qt 4.4.1 actually on the device itself. With swap space you can actually do that, but without it was a pain in the arse.

I'm not sure if the problem is with 128Mb of memory not being enough as such, more that if you accidently exceed it really bad things happen, that are worse than prolonging the life of your flash memory by not allocating any swap space to fall back on. So I am less bothered by computers not having much memory, than I am by them failing in random unpredictable ways.

By Richard Dale at Thu, 09/11/2008 - 11:32