The Following 15 Users Say Thank You to vi_ For This Useful Post: | ||
|
2012-05-28
, 06:55
|
Posts: 309 |
Thanked: 456 times |
Joined on Jan 2010
|
#222
|
|
2012-05-28
, 10:35
|
Posts: 1,680 |
Thanked: 3,685 times |
Joined on Jan 2011
|
#223
|
The Following 11 Users Say Thank You to vi_ For This Useful Post: | ||
|
2012-05-28
, 11:30
|
Posts: 3,074 |
Thanked: 12,960 times |
Joined on Mar 2010
@ Sofia,Bulgaria
|
#224
|
w00t, meh first wikeh
The Following 4 Users Say Thank You to freemangordon For This Useful Post: | ||
|
2012-05-28
, 12:32
|
Posts: 1,680 |
Thanked: 3,685 times |
Joined on Jan 2011
|
#225
|
Any idea what is the rationale behind "echo 4 > /sys/block/mmcblkN/queue/nr_requests" in the context of compcache? As I see it, that setting will have a major impact on device responsiveness during heavy i/o, leading to watchdog kicking in some corner cases.
insmod /lib/modules/current/ramzswap.ko disksize_kb=131072 && sleep 1 swapon /dev/ramzswap0 && sleep 1 swapoff /dev/mmcblk0p3 && sleep 1 && swapon /dev/mmcblk0p3 && sleep 1 echo 3 > /proc/sys/vm/dirty_ratio echo 3 > /proc/sys/vm/dirty_background_ratio echo 100 > /proc/sys/vm/dirty_writeback_centisecs echo 100 > /proc/sys/vm/dirty_expire_centisecs echo 32 > /proc/sys/vm/min_free_kbytes echo 95 > /proc/sys/vm/swappiness echo 200 > /proc/sys/vm/vfs_cache_pressure echo 0 > /proc/sys/vm/page-cluster echo 4000 > /sys/block/mmcblk0/queue/nr_requests echo 4000 > /sys/block/mmcblk1/queue/nr_requests
cat /proc/swaps Filename Type Size Used Priority /dev/mmcblk0p3 partition 786424 72924 -2 /dev/ramzswap0 partition 131064 131060 -1
The Following 4 Users Say Thank You to vi_ For This Useful Post: | ||
|
2012-05-28
, 13:11
|
Posts: 1,225 |
Thanked: 1,905 times |
Joined on Feb 2011
@ Quezon City, Philippines
|
#226
|
By jove FMG. You have done it.
Code:insmod /lib/modules/current/ramzswap.ko disksize_kb=131072 && sleep 1 swapon /dev/ramzswap0 && sleep 1 swapoff /dev/mmcblk0p3 && sleep 1 && swapon /dev/mmcblk0p3 && sleep 1 echo 3 > /proc/sys/vm/dirty_ratio echo 3 > /proc/sys/vm/dirty_background_ratio echo 100 > /proc/sys/vm/dirty_writeback_centisecs echo 100 > /proc/sys/vm/dirty_expire_centisecs echo 32 > /proc/sys/vm/min_free_kbytes echo 95 > /proc/sys/vm/swappiness echo 200 > /proc/sys/vm/vfs_cache_pressure echo 0 > /proc/sys/vm/page-cluster echo 4000 > /sys/block/mmcblk0/queue/nr_requests echo 4000 > /sys/block/mmcblk1/queue/nr_requests
|
2012-05-29
, 17:24
|
Posts: 249 |
Thanked: 277 times |
Joined on May 2010
@ Brighton, UK
|
#227
|
The Following 8 Users Say Thank You to mr_jrt For This Useful Post: | ||
|
2012-05-29
, 20:33
|
Posts: 1,523 |
Thanked: 1,997 times |
Joined on Jul 2011
@ not your mom's FOSS basement
|
#228
|
The Following 4 Users Say Thank You to don_falcone For This Useful Post: | ||
|
2012-05-29
, 20:45
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#229
|
~ $ cat /proc/swaps Filename Type Size Used Priority /dev/mmcblk0p3 partition 786424 0 -1 /dev/loop7 partition 786424 226948 0
#peterleinchen
if [ -e /lib/modules/current/ramzswap.ko ]
then
log "modprobing compcache/ramzswap/zramswap"
modprobe ramzswap disksize_kb=65535
ramzswap_succeeded=$?
log "ramzswap result: $ramzswap_succeeded"
if [ "$ramzswap_succeeded" = "0" ]
then
start_wait=$(date +%s)
wait=$start_wait
timeout=1
while [ ! -e /dev/ramzswap0 -a $(($wait - $start_wait)) -lt $timeout ]
do
log "waiting for ramzswap devnode"
sleep 1; wait=$(date +%s)
done
if [ $(($wait - $start_wait)) -lt $timeout ]
then
#can never be reached, as /dev is not mounted properly
log "activating ramzswap"
swapon -p 1 /dev/ramzswap0
#so we have to activate later...
fi
fi
fi
#peterleinchen end
|
2012-05-29
, 20:57
|
Posts: 669 |
Thanked: 433 times |
Joined on May 2010
|
#230
|
From this morning I am using:
64MB ramzswap
swap on eMMC
echo 3 > /proc/sys/vm/dirty_ratio
echo 3 > /proc/sys/vm/dirty_background_ratio
echo 100 > /proc/sys/vm/dirty_writeback_centisecs
echo 100 > /proc/sys/vm/dirty_expire_centisecs
echo 32 > /proc/sys/vm/min_free_kbytes
echo 95 > /proc/sys/vm/swappiness
echo 666 > /proc/sys/vm/vfs_cache_pressure
echo 0 > /proc/sys/vm/page-cluster
echo 4 > /sys/block/mmcblk0/queue/nr_requests
echo 4 > /sys/block/mmcblk1/queue/nr_requests
All is as smooth as Bulgarian butter so far, and yes I have opened many webpages, have a video playing in the background and conversations+images+file manager.
Cat /proc/swaps shows ramz is well full ages ago.
Will report later.
The Following User Says Thank You to impeham For This Useful Post: | ||
The whole time I had running:
I am running CSSU-T+KP50@250-900(SR vdd1+2).
All in all I have not seen any lagz, in fact everything seems like a fresh boot 'normal'. I think this is a definite improvement from 'as soon as ramz full, n900 lags to ****'. As to whether it is a complete improvement? I do not know yet and this is not even using the swap on uSD which in theory should make things even better.
My proc/sys/vm/:
You will notice is swappiness is so damn high. My notion being that with reduced ram (due to ramz taking up so much space) the device is going to swap, there is no fighting it. So to use swappolube style settings will not work. They angle for swap little and swap rarely. So if we are going to HAVE TO swap then by christ we are going to swap to the mutha ****ing MAX with only programs being swapped in/out, no VFS cache.
VFS_cache_pressure > 100 tells the VM system to dump file system caches whenever it can (more or less). Reading from our RAM and flash media is mega fast, so we do not really need any file system caches so chuck em, chuck em as fast as you can. I think you can see the effect of this. With VFS_cache pressure so high (although it could go higher) I can actually see the amount of space used in ramz swap going up and down. This suggests to me that ramz space is properly being churned through, i.e. there is no junk in there just good tasty stuff that we need swapped in and out. Before I would observe ramz filling, the lags would start then I would give up.
echo 32 > /proc/sys/vm/min_free_kbytes sets the amount of free space for allocating big chunks if they happen to come along. Screw it, I need every goddamned KB. So it has been reduced from 4MB of waste to 32KB of waste.
The rest of the stuff is cruft left over from swappolube and some stuff by the guy in 'massive IO improvement under heavy load'. Particularly the parts about nr_requests and dirty ratios.
This is after about 8 hours of use:
Next I shall run 128MB Ramz and see what happens.
Last edited by vi_; 2012-05-27 at 21:17.