maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Massive interactivity improvement under high I/O load! (https://talk.maemo.org/showthread.php?t=69973)

qole 2011-04-24 04:03

Re: Massive interactivity improvement under high I/O load!
 
1 Attachment(s)
Ok so I was able to decompress ubuntu-m5-v1.img.ext2.lzma in less than 10 minutes (rather than the 45 minutes or more that it usually takes) using the included script, taken from freemangordon here and other places. I have no idea what piece is the "magic piece", I'll have to experiment some more...

Code:

#!/bin/sh
echo 75 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
echo 150000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate

echo 30 > /proc/sys/vm/swappiness
echo 0 > /proc/sys/vm/page-cluster

echo 512 > /sys/block/mmcblk0/queue/nr_requests
echo 512 > /sys/block/mmcblk1/queue/nr_requests
echo 0 > /sys/block/mmcblk0/queue/iosched/slice_idle
echo 0 > /sys/block/mmcblk1/queue/iosched/slice_idle
echo 32 > /sys/block/mmcblk0/queue/iosched/quantum
echo 32 > /sys/block/mmcblk1/queue/iosched/quantum
echo 80 > /sys/block/mmcblk0/queue/iosched/fifo_expire_sync
echo 80 > /sys/block/mmcblk1/queue/iosched/fifo_expire_sync
echo 180 > /sys/block/mmcblk0/queue/iosched/fifo_expire_async
echo 180 > /sys/block/mmcblk1/queue/iosched/fifo_expire_async

echo noop > /sys/block/mmcblk0/queue/scheduler

swapoff /dev/mmcblk0p3
swapon /dev/mmcblk0p3


qole 2011-04-24 05:55

Re: Massive interactivity improvement under high I/O load!
 
As a test, I rebooted and ran the same decompression with stock settings. It is still going, over an hour later...

UPDATE: Looking at my "stock" settings, I must have them already tweaked (maybe swappolube?) because I already have swappiness set to 30 and page-cluster set to 0. So those weren't the magic settings that sped up the decompression. And it isn't the noop > scheduler line either, that doesn't seem to have any effect.

I wonder if it is just the swapoff / swapon that I do just before decompressing? I'll try that next.

freemangordon 2011-04-24 09:46

Re: Massive interactivity improvement under high I/O load!
 
Quote:

Originally Posted by qole (Post 994405)
As a test, I rebooted and ran the same decompression with stock settings. It is still going, over an hour later...

UPDATE: Looking at my "stock" settings, I must have them already tweaked (maybe swappolube?) because I already have swappiness set to 30 and page-cluster set to 0. So those weren't the magic settings that sped up the decompression. And it isn't the noop > scheduler line either, that doesn't seem to have any effect.

I wonder if it is just the swapoff / swapon that I do just before decompressing? I'll try that next.

No, you need all of "mine" settings, moving swap to sd card helps, but does not do magic alone. I am running my n900 with those settings since I posted them here, mo single hang because of the io.

humble 2011-04-24 11:05

Re: Massive interactivity improvement under high I/O load!
 
@qole

i can confirm that with a
Code:

swapoff /dev/mmcblk0p3
swapon /dev/mmcblk0p3

lets lzma decompress faster and no reboots:) as for the other stuff in the script idk.
im going to incorporate that to DON so that we dont have to turn off watchdogs just for decompression.

qole 2011-04-24 16:35

Re: Massive interactivity improvement under high I/O load!
 
Yep. 8 minutes with only swapon/swapoff. The other stuff seems to have a small effect (-2 minutes) but the major speed gain seems to come from the cache reset...

casketizer 2011-04-24 18:39

Re: Massive interactivity improvement under high I/O load!
 
just tweaking the two nr_requests after fresh boot let me extract latest easy debian in ~5min (@1ghz)

stlpaul 2011-04-24 20:03

Re: Massive interactivity improvement under high I/O load!
 
What about the danger of disabling swap (even temporarily) if there is high memory usage at the time? Will OOM killer wreak havoc?

qole 2011-04-24 21:21

Re: Massive interactivity improvement under high I/O load!
 
I tried the cache reset while apps were open, it wouldn't let me. But definitely tell users to close all other apps during decompression.

I'll see if the nr_request lines help even more...

freemangordon 2011-04-24 23:16

Re: Massive interactivity improvement under high I/O load!
 
Quote:

Originally Posted by qole (Post 994749)
I tried the cache reset while apps were open, it wouldn't let me. But definitely tell users to close all other apps during decompression.

I'll see if the nr_request lines help even more...

The other stuff is to keep UI responsive during heavy io, torrent download for example.

gabby131 2011-04-25 01:57

Re: Massive interactivity improvement under high I/O load!
 
i run the commands at the first post and saved it as a custom setting on swappolube.

i noticed improvement on using the multi-task breaking and microSD card corrupting Transmission app. multi-tasking is like im doing nothing, with transmission open with 3 other apps (web[3], conky, qmltube). although Transmission still lags (not responding) the multi-tasking and other stuff is not affected, or if affected, not fully,

before post 1, my device is not usable when transmission is checking for files, but after post 1, this issue is resolved.

thanks.......:)


All times are GMT. The time now is 17:22.

vBulletin® Version 3.8.8