maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Swappiness set for good (https://talk.maemo.org/showthread.php?t=96068)

Ridd92 2015-10-18 07:19

Swappiness set for good
 
Hi there all.

I bought two microSD cards with adapters of course to have some mooore GB on my n800. So, one of them (Those cards) is really, I mean REALLY fast, In my test up to 24mb/s of write with avg. 18,8, and almost 35mb/s of read with avg 31.

Card doesn't cause any problems. Now Im using only maemo 4 - Diablo booted from flash memory, so Im in need for swap, new fast card can deliver but Im tired of sending echo after I reboot the device.

Is there any way to set the swappiness value permanent? Like editing rcS file on n900?

auouymous 2015-10-19 02:09

Re: Swappiness set for good
 
You can add create a new file in /etc/init.d/, lets say you call it "foo". Run this command to add the file to runlevels 2, 3, 4 and 5. Any commands you put in the file will run everytime the system starts.

Code:

update-rc.d foo start 99 2 3 4 5 .

Ridd92 2015-10-19 07:23

Re: Swappiness set for good
 
Done that but doesn't work.

when I try to update again it's says that links to "foo" file exist already.

foo file containts alone and only

echo 75 > /proc/sys/vm/swappines

which works alone from console, but after reboot swappiness is still default, 1.

auouymous 2015-10-19 12:38

Re: Swappiness set for good
 
Sorry, forgot to mention you need to add #!/bin/sh on the first line of the file and set its permissions to 755.

foo contents:
Code:

#!/bin/sh

echo 75 > /proc/sys/vm/swappines

type on command line:
Code:

chmod 755 /etc/init.d/foo
You might also want to name it something like my-startup-commands instead of foo.

If you do, remove foo from runlevels with this command:
Code:

update-rc.d -f foo remove
And then run the other update command for new file name.

Edit:
Only run update once to install the script, you don't need to run it for any changes to the script.


All times are GMT. The time now is 10:47.

vBulletin® Version 3.8.8