View Single Post
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#103
@impeham - I wanted to send You PM with answer, but for some reason, I'm unable to PM You (some stupid forum rules limitation, I think) - so, I'm answering here, despite it being off-topic.

Generally, inside Your N900, You have 2 different storage 'devicesm - 256 MB NAND (super fast, at least compared to Your every day flash devices) - where most important (in terms of access times and read/write speeds) system files reside, and 32 GB eMMC, which is "regular" flash storage, and files from optified packages rest there, (symlinked, so system see them as sitting on same storage). On eMMC, You also have - by default - swap partition (if You don't know what swap is, You can google with ease, it's well-documented thing).

Now, SWAP is used pretty often - given the amount of RAM we have (256 MB). Flash-based storages doesn't handle many different input-output requests at once (especially true about write operations), and having opt and swap on same storage medium (physically) result in many conflicting I/O requests.

Fortunately, on N900 You have another storage medium available - microSD. By creating linux SWAP partition there (using linux machine, linux live CD, or N900 itself, if You feel comfortable with partitioning via terminal commands), enabling it and disabling eMMC swap partition, You get rid of such I/O collisions. For details, see:
http://wiki.maemo.org/Swap_on_microSD
(You'll find also information on using both eMMC and microSD swap with same priorites - scratch that part, it's outdated, and assumption about performance gain by increased bandwidth - aka RAID0 philosophy - doesn't consider I/O collisions on eMMC, so it's wrong on basics).

Generally, if You have swap type partition on Your microSD, You need to place script like tht:
Code:
description "swapoff eMMC, swapon MMC"
start on started hildon-desktop
stop on starting shutdown
console none
service

script

swapon /dev/mmcblk1p2
swapoff /dev/mmcblk0p3

end script
...placed i /etc/event.d/ directory. Of course, mmcblk1p2 apply only, if Your swap is second partition on microSD - in other cases, change number accordingly.

Another thing is swap fragmentation - occurring, after total amount of data written to swap partition (during one session) exceed total size of swap partition (this occur, due to write-erase characteristic of flash storage media) - it can be 'fought' by simply disabling and enabling swap again, but to measure when it's needed, You need simple iostat-based script, which parts of it bundled also inside Your (mentioned already) startup script it /etc/event.d/.

Ho ever, it's quite too wide topic for this post, being already *epic* off-topic - thinking about that, I may create separate thread summarizing around-swap knowledge, as it's now spread around whole forum. My augmented version of shadowjk's measuring (anti swap-fragmentation) script, may be also of interst o some, so I'll post it there as well.

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!

Last edited by Estel; 2011-12-23 at 21:12.
 

The Following 5 Users Say Thank You to Estel For This Useful Post: