maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [announce] swappolube to lubricate your gui (https://talk.maemo.org/showthread.php?t=62312)

ndi 2010-09-19 21:37

Re: [announce] swappolube to lubricate your gui
 
Quote:

Originally Posted by fms (Post 820932)
I am sorry to ask the obvious, but have you tried sacrificing a black goat and drawing "666" with its blood across your N900's screen?

I was all out of black goats. I only have a white one, but that's an iGoat. Doesn't work on Nokia. Not sure it's an ARM goat, either.

Besides, if I want to keep my warranty, it has to be an Original Nokia Accessory, the GT-003. Have you seen the prices on those?

lq_sunshine 2010-09-20 16:27

Re: [announce] swappolube to lubricate your gui
 
wow.. it really boosted my n900!!

Thanks

zimon 2010-09-20 16:59

Re: [announce] swappolube to lubricate your gui
 
Quote:

Originally Posted by debernardis (Post 816676)
I
echo "30" > /proc/sys/vm/swappiness
echo "0" > /proc/sys/vm/page-cluster
echo "1" > /proc/sys/vm/laptop_mode [1]
echo "1" > /proc/sys/vm/oom_kill_allocating_task
echo "0" > /proc/sys/vm/dirty_expire_centisecs
echo "0" > /proc/sys/vm/dirty_writeback_centisecs
echo "60" > /proc/sys/vm/dirty_background_ratio
echo "95" > /proc/sys/vm/dirty_ratio
echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "1" > /proc/sys/net/ipv4/tcp_no_metrics_save

If someone has extra time, would be nice to have URI's for every setting what it really is (to Linux kernel docs for example). Some of them have surely been explained here and there on these posts, but gather them all to one single post or preferrably to this starting post of this thread.

Or a wiki page would be nice for this package and for the settings it use.

[1] http://www.linuxjournal.com/article/7539

(Edit: I did as an example for laptop_mode.)

(Edit2: Oh, didn't try this link in the first post. Maybe they are all there already. And seems also now underneath an another link. But links to actual Linux kernel docs are missing in both.)

noobmonkey 2010-09-20 17:07

Re: [announce] swappolube to lubricate your gui
 
Not quite support (And maybe mentioned in here already - apologies if it is)

But a good little description of most of the above, none the less - http://www.freemaemohelp.com/home/-/ablog/entryId/36094

ndi 2010-09-20 17:32

Re: [announce] swappolube to lubricate your gui
 
echo "30" > /proc/sys/vm/swappiness
Tendency to swap. 0 means swap as a last resort, 100 is swap as soon as possible.

echo "0" > /proc/sys/vm/page-cluster
page-cluster controls the number of pages which are written to swap in a single attempt. The swap I/O size.

echo "1" > /proc/sys/vm/laptop_mode
Laptop mode is used to minimize the time that the hard disk needs to be spun up, to conserve battery power on laptops.

echo "1" > /proc/sys/vm/oom_kill_allocating_task

When out of memory, the OS will kill a task to revive. When 0, kills the largest task. When 1, it kills the task that requested the memory.

echo "0" > /proc/sys/vm/dirty_expire_centisecs

echo "0" > /proc/sys/vm/dirty_writeback_centisecs

The VM subsystem, in the Linux kernel, buffers writes to files that applications perform for a period of time. This caching allows the kernel to group consecutive writes into one big write, and to generally optimize the disk IO to be the most efficient. The kernel, by default, will start writing out data to disk after 5 seconds, so, if a power failure or kernel crash happens, at most, 5 seconds of data would be lost.

echo "60" > /proc/sys/vm/dirty_background_ratio

Contains, as a percentage of total system memory, the number of pages at which the pdflush background writeback daemon will start writing out dirty data.

echo "95" > /proc/sys/vm/dirty_ratio

Contains, as a percentage of total system memory, the number of pages at which a process which is generating disk writes will itself start writing out dirty data.

echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "1" > /proc/sys/net/ipv4/tcp_no_metrics_save


These settings disable some of the features of TCP as defined by the RFC.

Not the best links out there, but it's a first effort.

ETA: Wow, it looked better in preview mode :P

TiagoTiago 2010-09-20 18:59

Re: [announce] swappolube to lubricate your gui
 
which settings get reset at boot and which settings i can change without fighting with the swappo?

egoshin 2010-09-20 19:49

Re: [announce] swappolube to lubricate your gui
 
Some comments:

Quote:

Originally Posted by ndi (Post 821642)
echo "30" > /proc/sys/vm/swappiness
Tendency to swap. 0 means swap as a last resort, 100 is swap as soon as possible.



More precisely - swapout. With 100 the kernel swaps out anything but it doesn't erase it from memory and uses it if it is still in memory. The value 100 guarantee your a minimal time for your application load or swap in, for exam - in a middle of your video somebody calls you and kernel starts downloading phone application immediately.

As disadvantage, 100 forces a flash channel I/O high usage which decreases a performance of downloading because it services swapout each time. It also decreases battery time life because kernel does a lot of unnecessary work.

Quote:

echo "0" > /proc/sys/vm/page-cluster

Quote:

page-cluster controls the number of pages which are written to swap in a single attempt. The swap I/O size.
The value "0" provides you a wider I/O channel to download application from flash because kernel uses small blocks for swapping and can put an application load request faster. In over case it may increase your swapout time and wear eMMC much faster.

Quote:


echo "1" > /proc/sys/vm/laptop_mode
Laptop mode is used to minimize the time that the hard disk needs to be spun up, to conserve battery power on laptops.
It forces a huge time delay (up to 10min) between file system writes. Usually it is OK for N900 but if you have some regular system halts, unexpected reboots etc then you are in danger of losing directory data --> loosing your user files (even old and unchanged) and forcing system problems too.

Actually, it is not good things because "laptop_mode" was designed for disks - it tries to group multiple writes in short time instead of spreading it, so, it is a good for disks spin down. But it has no sense for flash-based systems like N900 and introduces a serious danger of losing old files.

Airtux 2010-09-20 19:57

Re: [announce] swappolube to lubricate your gui
 
I'm Sorry, but I do not understand what is this application, you can explain?
Thanks

cfh11 2010-09-20 20:10

Re: [announce] swappolube to lubricate your gui
 
Quote:

Originally Posted by Airtux (Post 821771)
I'm Sorry, but I do not understand what is this application, you can explain?
Thanks

You know what they say about staying away from extras-devel unless you know what you're doing? That x1000 for .debs and scripts posted outside the repositories.

Alanstrainor 2010-09-20 20:45

Re: [announce] swappolube to lubricate your gui
 
Thanks a lot, noticed an immediate speed increase.


All times are GMT. The time now is 09:06.

vBulletin® Version 3.8.8