Reply
Thread Tools
Posts: 692 | Thanked: 264 times | Joined on Dec 2009
#101
A 1GHz overclock would give a bigger overall performance boost than running the primary swap from a Class 6 MicroSD, but both modifications at the same time would be best.
__________________
"Impossible is not in the Maemo vocabulary" - Caballero
 
Banned | Posts: 358 | Thanked: 160 times | Joined on Dec 2010
#102
I can confirm that this mod can tune-up the device. In fact it must be a great imrpovement because when doing filesharing eMMC s***s. I think it has to do with 2 interfaces. And about speed increase one cannot expect a wonder an increase in 6% - 30% is not bad compared to a shareholde value of an enterprise or other badly coded programs here. BTW. I have some tune-up utilities in my signature.
 
Posts: 25 | Thanked: 1 time | Joined on Nov 2010
#103
osomee is we need high class memory card like class 6 or class 2 is sufficent
 
Posts: 18 | Thanked: 6 times | Joined on Mar 2010
#104
I was looking around for a sandisk extreme and couldnt find one in microSD format, so I grabbed a 4gb Patriot class 10, and put it through a sandra benchmark:
Code:
Benchmark Results
Device Score : 256.2IOPS
Endurance Factor : 49.10
Results Interpretation : Higher scores are better.

Performance vs. Speed
Drive Score : 12.01IOPM/Mbps
Results Interpretation : Higher scores are better.

4kB Files Test
Read Performance : 610.3IOPS / 2.38MB/s
Write Performance : 28.4IOPS / 113.62kB/s
Delete Performance : 48.7IOPS
File Fragments : 1.0
Combined Score : 406.6IOPS / 1.59MB/s

64kB Files Test
Read Performance : 234.4IOPS / 14.65MB/s
Write Performance : 34.8IOPS / 2.18MB/s
Delete Performance : 50.6IOPS
File Fragments : 1.0
Combined Score : 164.5IOPS / 10.28MB/s

1MB Files Test
Read Performance : 18.0IOPS / 18MB/s
Write Performance : 10.5IOPS / 10.54MB/s
Delete Performance : 53.4IOPS
File Fragments : 1.0
Combined Score : 15.4IOPS / 15.38MB/s

16MB Files Test
Read Performance : 1.1IOPS / 18.4MB/s
Write Performance : 0.8IOPS / 12.32MB/s
Delete Performance : 39.7IOPS
File Fragments : 1.0
Combined Score : 1.0IOPS / 16.27MB/s

256MB Files Test
Read Performance : 0.1IOPS / 18.42MB/s
Write Performance : 0.1IOPS / 13MB/s
Delete Performance : 4.0IOPS
File Fragments : 1.0
Combined Score : 0.1IOPS / 16.53MB/s

Performance Test Status
Result ID : Generic STORAGE DEVICE 4GB (RAID/USB)
Platform Compliance : x64
System Timer : 3.58MHz

Endurance Test Status
Operating System Disk Cache Used : No
Use Overlapped I/O : No
Test File Size : 32MB
Block Size : 4kB
File Fragments : 1

Endurance Benchmark Breakdown
Repeated Sector ReWrite : 1MB/s
Sequential Sector Write : 1MB/s
Random Sector Write : 14kB/s

Drive
Total Size : 3.72GB
Free Space : 3.72GB, 100%
Cluster Size : 32kB
 
Posts: 1,258 | Thanked: 672 times | Joined on Mar 2009
#105
113 kbyte/s... Best I've seen so far...
 
Posts: 10 | Thanked: 8 times | Joined on Jan 2011 @ Malaysia
#106
Swap

Swap is a virtual memory which runs off storage devices (HDD, SSD, eMMC, microSD...). It is in a form of a file on a drive (currently this method does not work on Maemo 5) or as a seperate partition (this is actually a better method). Its advantages are that it expands available memory, but it is of course very slow compared to thousand times faster RAM and is therefore used by the system to drop off data which is currently not needed. That means that you can run many programs at once, but they will be running slowly. Virtually every desktop OS does that (for example Windows has page file).

Enabling additional swap is not needed on the N900 for expanding available memory, because it has already 256 MB of RAM and 768 MB of swap space on internal 32 GB eMMC module, resulting in 1 GB of total available memory, which is enough for a device like that. It does however help to offload the work from internal eMMC if there is additional swap space enabled on microSD, because kernel uses both swap partitions and is therefore swapping bandwidth increased which results in higher performance.

Swappiness

Swappiness is a kernel parameter which tells it how aggressively to swap. The more aggressive it is, more RAM is freed, but there is a performance impact, because more data needs to be swapped (written to the slower drive). Swappiness value is between 0 and 100 with 100 being the least aggressive. Maemo 4 had swappiness set to 1 by default while Maemo 5 sets it to 100. The best value is somewhere in between. 256 MB of N900's RAM is enough for a few open programs and there is also enhanced battery life because eMMC doesn't need to write so much swap data. So swappiness should be set somewhere between 30 and 50. It is set with the following command which has to be run as root.

Code:
echo 30 > /proc/sys/vm/swappiness
You can set swappiness at each boot automatically by using a startup script.

(EDIT by egoshin):

In case of N900 you should check that with lower swappiness values you still have an acceptable time of answering calls by phone application. With lower swappiness your N900 more likely meet the situation then there is no enough memory to load phone application for incoming calls - kernel needs to swap-out some applications and you may miss a call. Maximum swap-out speed is around 18 MBytes/sec into eMMC.

With maximum swappiness the kernel just discards the memory pages of some applications because it is already in swap space and cut a time. I believe it is a reason why Nokia set 100 by default for swappiness.

(EDIT by eero):

The situation will also change after a while because swap becomes fragmented (parts of processes' memory are spread all over swap in little pieces). I.e. testing the speed only for few hours after boot isn't enough, new setting needs to be tested for several days.

Configure microSD card for swapping

The microSD card must be split into at least 2 partitions. The first one should be FAT32 (vfat) formatted and the second one must be formatted for linux swap (type 82) and about 384 MB in size. You can change the size of it, but this value should be suitable for most people.

You can repartition and reformat the card with standard Linux tools from the N900 terminal, but the easiest way is to connect the device in mass storage mode to a Linux machine (which can also be a virtual machine if you use other OS as your primary one) and you can do the partitioning with GUI tools.

Using microSD partition as swap

Reboot after the repartitioning and after the boot, this is seen in /dev.

Please Take Note On Below Explaination, This I don't Want You All Simply KeyIn Script Without Understanding What It Means
by
- mmcblk0
- mmcblk0p1
- mmcblk0p2
- mmcblk0p3
- mmcblk1
- mmcblk1p1
- mmcblk1p2


* /dev/mmcblk0 (internal eMMC itself)
* /dev/mmcblk0p1 (27 GB partition mounted on /home/user/MyDocs)
* /dev/mmcblk0p2 (2 GB partition mounted on /home)
* /dev/mmcblk0p3 (768 MB swap partition on eMMC)
* /dev/mmcblk1 (microSD itself)
* /dev/mmcblk1p1 (FAT32 partition on your microSD mounted on /media/mmc1)
* /dev/mmcblk1p2 (swap partition on your microSD)

1. mmc part defines type of storage device
2. blkX defines number of storage device (0 is internal eMMC, 1 is microSD)
3. pY defines partition number
The swap partitions are not activated, but you can enable swapping on microSD partition with:

Code:
swapon /dev/mmcblk1p2
If you have repartitioned microSD differently you have to change the partition number accordingly. The last part is setting the swapon command to run at every boot and you can do that with a startup script.

There is an additional warning and that is that while the device is running and swap is turned on on microSD partition, you shouldn't take the card out. It would be the same as taking out a RAM stick while running.

Swap priorities

In order to utilize both swap partitions to balance the I/O load (striping), they should have the same priority. The /bin/swapon command shipped with Maemo is the busybox version that does not support -p option. If you don't have Easy Debian environment installed, download the stock Debian mount package for the armel architecture and extract (-x) the swapon binary from it, and copy it somewhere e.g. /sbin/swapon.debian.

It seems that it's not possible to use -p -1 to match the priority of the default eMMC swap partition. I use the following trick:

Code:
1. activate the microSD swap: 
swapon.debian -p 0 /dev/mmcblk1p2

2. temporarily deactivate the eMMC swap: 
swapoff /dev/mmcblk0p3

3. activate it again with matching priority: 
swapon.debian -p 0 /dev/mmcblk0p3
After that your swaps should look like this:

Code:
/home/user # cat /proc/swaps
Result:
Code:
Filename         Type         Size     Used     Priority
/dev/mmcblk0p3   partition    786424   65464      0
/dev/mmcblk1p2   partition    393272   97908      0

Depending on the performance of your microSD card, your N900 might now feel much faster when swapping takes place, about the same, or even slower - YMMV. My N900 definitely seems to have less those total I/O trashing episodes lasting 5-10 minutes, where you might think your N900 just died, after doing heavy I/O (e.g. download a 100 MB podcast with gPodder) after activating this dual-swap scheme.

Note: In my testing my N900 crashed when I tried to fill the VFAT data partition on the microSD with something like dd from /dev/null to a file. It's propably best to dedicate the whole microSD card for swap, if possible.

Credit To - Original Author Unknown
 

The Following 6 Users Say Thank You to izzuddinmeister For This Useful Post:
Posts: 193 | Thanked: 104 times | Joined on Oct 2010 @ Romania
#107
hi there....i've read this thread and i just cant get the microsd card to be a VR thing...

Care to help or just bring some light on this?
 
Posts: 47 | Thanked: 31 times | Joined on Jul 2010
#108
That was a very helpful post, and the last sentence concerns me. I was planning on getting a large micro SDHC card to split up into VFAT, ext4 (for Easy Debian), and swap partitions. Now I wonder if that would be a stable combination.

Originally Posted by izzuddinmeister View Post

Swap


...

Note: In my testing my N900 crashed when I tried to fill the VFAT data partition on the microSD with something like dd from /dev/null to a file. It's propably best to dedicate the whole microSD card for swap, if possible.
 
Posts: 42 | Thanked: 19 times | Joined on Dec 2007
#109
I've got an 8 GB mSD card split into 3 partitions between swap, ext3 and FAT32, out of necessity. No problems.

Based off of these instructions:
http://discussions.europe.nokia.com/.../751901#M17953
 
Posts: 6 | Thanked: 0 times | Joined on Feb 2011
#110
Hi there

Trying to set up 1gb MMC for swap, having an issue:

sudo gainroot
mkswap /dev/mmcblk1p1
swapon /dev/mmcblk1p1

first to steps are fine, get an 'invalid argument' on step 3.

Any ideas?
 
Reply


 
Forum Jump


All times are GMT. The time now is 11:18.