maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   How to set swappiness? (https://talk.maemo.org/showthread.php?t=48966)

mr_xzibit 2010-09-03 22:47

Re: How to set swappiness?
 
how do i edit with midnight commander? i can locate the rcS edit it but it wont save my settings?

egoshin 2010-09-03 23:27

Re: How to set swappiness?
 
Quote:

Originally Posted by JaseP (Post 805475)
And since flash memory's faster than disk

That is wrong. Test it yourself - eMMC flash speed is around 19MByte/sec but most of modern hard disk have more than 50MBytes/sec. And some server disks have around 130MByte/sec.

However, the swapiness 100 is definitely wrong, at least with current kernel - it doesn't have a conditional swapiness which would stop swap ops in progress if there is no "not-enough-memory" condition and some urgent flash IO.

tomast 2010-09-03 23:34

Re: How to set swappiness?
 
You must become root before starting mc. Install package 'rootsh', start xterminal, write
Code:

root
mc

But be careful, especially when editing rcS. It's easy to render your N900 unbootable.

egoshin 2010-09-04 00:22

Re: How to set swappiness?
 
I highly recommend to anybody who wants to change rcS - instead of that just create a file /etc/event.d/somename with following lines:

Code:

description "my somename fix"
author "My Name"

console output

start on started rcS-late

script
      echo "30" > /proc/sys/vm/swappiness
end script

... and insert any another wished lines after "echo 30" and before "end script"

This would not corrupt your N900 in case of problem and it allows the next Nokia OTA upgrade.

You need to be root and run your favorite editor (see prev posts for know how to edit file).

toxaris 2010-09-07 06:49

Re: How to set swappiness?
 
Quote:

Originally Posted by egoshin (Post 806769)
I highly recommend to anybody who wants to change rcS - instead of that just create a file /etc/event.d/somename with following lines:

Code:

# my somename fix

start on started rcS-late

script
      echo 30 > /proc/sys/vm/swappiness
end script

... and insert any another wished lines after "echo 30" and before "end script"

This would not corrupt your N900 in case of problem and it allows the next Nokia OTA upgrade.

You need to be root and run your favorite editor (see prev posts for know how to edit file).

Yea, good idea. thx

hassan_badredin 2010-09-07 14:53

Re: How to set swappiness?
 
how do i get this symbol in n900??

>

wmarone 2010-09-07 14:58

Re: How to set swappiness?
 
Quote:

Originally Posted by egoshin (Post 806732)
That is wrong. Test it yourself - eMMC flash speed is around 19MByte/sec but most of modern hard disk have more than 50MBytes/sec. And some server disks have around 130MByte/sec.

As I noted to you elsewhere, a hard disk can do 50MByte/s or better but only when streaming. As soon as you start pushing random pages on and off disk, doing small reads and writes, a hard disk can fall under 200KB/s while a decent SSD will maintain at least 1MByte/s or better.

Consider that writing a single 4K RAM page consists of 8 x 512B writes (with the only benefit being that -this- page will be contiguous) and if you're pushing off more than a few pages swap partition, you're going to be hurting.

The eMMC lacking moving parts should maintain throughput much better. If you're real curious, you could always throw IOMeter at it ;)

sony123 2010-09-07 18:33

Re: How to set swappiness?
 
FYI this is a good tutorial of Linux VM

http://www.redhat.com/magazine/001nov04/features/vm/

geneven 2010-09-07 18:45

Re: How to set swappiness?
 
Quote:

Originally Posted by hassan_badredin (Post 809602)
how do i get this symbol in n900??

>

You go to the manual and read the section titled "Enter a character not found from the keyboard."

To save you some time, here is what the manual says:

"Press and hold (the diagonal blue arrow) and then press the sym key."

egoshin 2010-09-07 19:09

Re: How to set swappiness?
 
Actually, flash devices are more suitable for streaming then random access - there is a serious logic behind that. Yes the random access in flash is faster for READ but write is another story and it is not very good for flash devices yet.

In any way, swap write is essentially a sequential operation. Kernel does a special logic behind this.


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

vBulletin® Version 3.8.8