![]() |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
Yeah, this will allow memory hungry apps to at least "run" but not "fast". Still good to know. =)
|
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
The 10megabytes/sec speed is only achieved with large sequential access. Random writes access, which swapping is, yields less than 1 megabyte/s in most cases, and worst case it degrades to less than 100kbyte/s. SD/mmc storage isn't designed for random access :)
|
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
Be careful with terminology, folks.
o RAM: RAM is always physical RAM. In the N900 there's 256MB of it. o There's no such thing as 'virtual RAM'. o Swap space: Resides in the built-in flash storage (there's 768MB of it on the N900), or could be set up on microSD as well). o Virtual memory: This is (on Linux) the sum of swap and RAM. On the N900 it's 1GB (768+256). Virtual memory is what the applications can potentially use (not considering some limitations added by the kernel). Virtual memory is the only thing applications know about. If you have no swap space allocated, only the 256MB physical RAM, then your virtual memory size would be 256MB. There's no such thing as 'not having virtual memory set up'. You mean _swap_ here. o Swap space is always slower than RAM. Maybe in the future this could change, when/if some of the stuff being worked on in the labs manifests itself. Then maybe we'll have RAM, SD cards, USB sticks, other mass storage, all built from the same magical, non-volatile, super-fast stuff. o Adding swap will not make for a faster device, only for a device which can sustain more applications running at the same time, or using more data, without going down in flames. There was a myth, for a while, that the N800 and N810 would be faster if you enabled swap space. This was only in the imagination - I tested this. And there's no rational reason it should be faster, except in very carefully thought out scenarios that won't happen with normal use. o Adding excessive amounts of swap _will_ make your device slower, eventually. Particularly if you keep your applications (e.g. browser) running at all times. |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
@TA-t3: Good info. Sometimes I forget that these things aren't always so clear to everyone...
|
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
If anyone is curious, I submit that moving your swap to your microsdhc card dramatically increases performance. It offloads swap I/O from the internal MMC, which frees it up for concurrent access (ie. program/library loading).
I created a 512mb slice on my microsd card, and modified the boot scripts to use it instead (excluding the 768mb mmc swap area completely) and the device is significantly more responsive when you have more than a few processes running. :) This should be an option out-of-the-box (assuming the user is fairly warned about being unable to eject the microsdhc card while running). Also note that you need a separate partition; a swap file seems to lock /sbin/swapon (bug?), and in any case you'd lose the ability to mount the vfat partition via USB (filesystem in use). |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
Quote:
Only optified programs are stored on the eMMC, the same flash chip used for swap. So it should only make a difference in certain very specific circumstances. There is also a question of how the bus works in the N900, for all we know the microSD and eMMC have to contend for the same bandwidth. Obviously that does not explain your positive results of moving the swap to microSD though. I usually find the N900 far more responsive after a reboot anyway, so are you sure you are not mistaking fresh boot speediness for swap speed improvement? If it does help though, why not keep both swap partitions? Surely it being able to stripe between two separate devices should be even faster still? |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
Quote:
Would the striping idea work? It certainly seems logical. |
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
Speed depends on SD Class class 6 and class 10 are the fastest at the moment but there is only class 6 micro sd cause class 10 was just released
|
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
Quote:
|
Re: Using Micro SD Card as Virtual Ram on Nokia N900?
Good point on rootfs being on a separate partition. I do run a lot of optified apps, and many apps access a lot of files in ~ (though small, still wait in the queue during heavy swap I/O).
My uptime's ~6 days right now and I have 8 apps running, and it's showing no signs of slowing down. Everything is still lightning fast. My microsd card is a 4gb sandisk. Not sure the class, but maybe it is faster at the block size the swap is using. I should check that. I did a quick I/O test with dd/sync, and it seemed to be slightly slower than the internal MMC. I should retest with more granularity. I can write up a howto as soon as I get to the office. :) It's pretty straightforward. I'll also note some program load / switch times for reference and comparison. |
All times are GMT. The time now is 04:56. |
vBulletin® Version 3.8.8