![]() |
Re: How to set swappiness?
Well it's write mixed with reads, which on all sd/mmc/usbflash I've seen translates into a big read/modify/write cycle right after write-read commands come from host..
At one point I plotted all writes done by kswapd, and found that it's indeed mostly sequential until it reaches the end of the swap area, after which it becomes increasingly random.. swapoff/swapon fixes that, and I now have a script that checks iostat for amount of writes and does swapoff/swapon/swapoff via a temporary swapfile when writes exceed swap size.. |
Re: How to set swappiness?
i created a file named swapmop in etc/event.d/
content: Quote:
when doing cat /proc/sys/vm/swappiness, it still sais "100" what am i doing wrong? :O |
Re: How to set swappiness?
Quote:
|
Re: How to set swappiness?
Quote:
Code:
#!/bin/sh also try Code:
chmod a+x /etc/event.d/swapmop |
Re: How to set swappiness?
Quote:
though right now i'm not seeing any differences at all... /edit: ha, there is a difference: my RAM-usage is constantly at around 180 mb. not sure if thats good...?! |
Re: How to set swappiness?
#!/bin/sh should not have difference. But don't forget a space between 30 and >
Actually, it is better to use this script in /etc/event.d/myscript Code:
description "tuning system" Sorry for possible misguide... |
Re: How to set swappiness?
Quote:
High swappiness makes the system swap out (RAM->SWAP) aggressively (idle processes memory blocks are moved to disk). Low swappiness swaps out when memory is running full instead. http://kerneltrap.org/node/3000 Experiment with it and find out what setting fits Your usage pattern... ;) I wouldn't recommend setting the value too low (30 seems fine here so far). |
Re: How to set swappiness?
Quote:
i tried to use your script, but it did not work. i ended up modifying it until i had the first script i used to make it work. i had to remove the following part: Code:
description "tuning system" |
Re: How to set swappiness?
This worked for me (/etc/event.d/tuning):
Code:
description "System Tuning" |
Re: How to set swappiness?
its easier to use vi editor for this, run
sudo gainroot vi /etc/init.d/rcS scroll down to 263/281 press the letter i - don't press enter after it looks like this echo 100 > /proc/sys/vm/swappiness use the arrows to move the cursor and change the value to 30 or whatever you want - keep it above 30 tho then press the onscreen 'esc' button then type this :wq then hit enter |
All times are GMT. The time now is 09:41. |
vBulletin® Version 3.8.8