BertvanDorp
|
2012-05-30
, 13:08
|
Posts: 58 |
Thanked: 43 times |
Joined on Aug 2010
|
#241
|
The Following User Says Thank You to BertvanDorp For This Useful Post: | ||
|
2012-05-30
, 13:30
|
Posts: 669 |
Thanked: 433 times |
Joined on May 2010
|
#242
|
Try for yourself, report back.Code: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 1024 > /proc/sys/vm/min_free_kbytes echo 95 > /proc/sys/vm/swappiness echo 250 > /proc/sys/vm/vfs_cache_pressure echo 0 > /proc/sys/vm/page-cluster echo 512 > /sys/block/mmcblk0/queue/nr_requests echo 512 > /sys/block/mmcblk1/queue/nr_requests echo 0 > /sys/block/mmcblk0/queue/iosched/slice_idle echo 0 > /sys/block/mmcblk1/queue/iosched/slice_idle echo 16 > /sys/block/mmcblk0/queue/iosched/quantum echo 16 > /sys/block/mmcblk1/queue/iosched/quantum echo 64 > /sys/block/mmcblk0/queue/iosched/fifo_expire_sync echo 64 > /sys/block/mmcblk1/queue/iosched/fifo_expire_sync echo 64 > /sys/block/mmcblk0/queue/iosched/fifo_expire_async echo 64 > /sys/block/mmcblk1/queue/iosched/fifo_expire_async
The Following 2 Users Say Thank You to impeham For This Useful Post: | ||
|
2012-05-30
, 18:01
|
Posts: 249 |
Thanked: 277 times |
Joined on May 2010
@ Brighton, UK
|
#243
|
Not really such a great idea, what if someone is using uSD but not ramz and wants swappolube settings?
# Size of cache in KB #COMPCACHE_SIZE = "65536" # Swap priorities #PRIORITY_COMPCACHE = "15" #PRIORITY_EXTERNAL = "10" #PRIORITY_INTERNAL = "0" # Timeout for device node to be ready in seconds #COMPCACHE_TIMEOUT = "10" # VM tuning for compcache DEFAULT_COMPCACHE_TUNING = "true" #vm_dirty_ratio = "3" #vm_dirty_background_ratio = "3" #vm_dirty_writeback_centisecs = "100" #vm_dirty_expire_centisecs = "100" #vm_min_free_kbytes = "32" #vm_swappiness = "95" #vm_vfs_cache_pressure = "200" #vm_page-cluster = "0" #int_nr_requests = "4000" #ext_nr_requests = "4000"
Finally I would not be so hasty to add this to your start up unless you are comfortable with using a rescue console to undo what may go wrong.
The Following 3 Users Say Thank You to mr_jrt For This Useful Post: | ||
|
2012-05-30
, 18:03
|
Posts: 1,341 |
Thanked: 708 times |
Joined on Feb 2010
|
#244
|
|
2012-05-30
, 18:31
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#245
|
Where did you get iostat for N900?
dpkg --search `which iostat`
Edit: ah, apt-cache search iostat
-> sysstat
|
2012-05-30
, 18:55
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#246
|
This ocurred to me as well. Always best to aim to be a good neighbour
Yes, good neighbours.
I propose then that swapset will have a set of override settings it will apply only when compcache is active. The trick will be managing to convince them to apply after swappolube's /etc/event.d/tuning gets executed. Hopefully upstart has dependencies in there somewhere.
Yes, it has. Just use
start on stopped tuning
This will start your script after 'tuning' script has stopped its activity.
We may use stopped here, as it terminates after setting its values. Otherwise just use
start on started tuning
and wait a few seconds.
There is also something like "signal" or "emit" afairc.
I'm thinking a set of defaults as given in this thread, with another set of overrides in /etc/default/swapset, i.e.Code:# Size of cache in KB #COMPCACHE_SIZE = "65536" # Swap priorities #PRIORITY_COMPCACHE = "15" #PRIORITY_EXTERNAL = "10" #PRIORITY_INTERNAL = "0" # Timeout for device node to be ready in seconds #COMPCACHE_TIMEOUT = "10" # VM tuning for compcache DEFAULT_COMPCACHE_TUNING = "true" #vm_dirty_ratio = "3" #vm_dirty_background_ratio = "3" #vm_dirty_writeback_centisecs = "100" #vm_dirty_expire_centisecs = "100" #vm_min_free_kbytes = "32" #vm_swappiness = "95" #vm_vfs_cache_pressure = "200" #vm_page-cluster = "0" #int_nr_requests = "4000" #ext_nr_requests = "4000"
The next item I wanted to add to swapset before my hiatus was a semaphore to signal the device booted OK to prevent reboot loops. Something simple, like an empty file when it starts that it then removes at the end. If it finds the file on boot, don't apply the settings and report to the user. Should hopefully make things safer.
Nice idea, like power kernel does maybe.
Anyway, I'll get on this once I get a few minutes and:
- Add boot semaphore
- Fix timeout bug reported by peterleinchen
- Fix bug reported by alfred, which IIRC, was due to having a SD card active without a swap partition on it (wish this forum saved sent PMs! - Incidentally, please email me bugs for exactly this reason)
this forum saves sent PMs, just enable it under your preferences
- Pull in override params from config file /etc/default/swapset
- Override swappolube settings when compcache is active
That everything?
More or less yes.
I found another bug, I think:
if [ $compcache_succeeded ]
always is true, use
if [ -e /dev/ramzswap0 -a -z "$(grep ramzswap0 < /proc/swaps)" ]
instead
|
2012-06-01
, 19:46
|
Posts: 1,033 |
Thanked: 1,013 times |
Joined on Jan 2010
|
#247
|
The Following User Says Thank You to patlak For This Useful Post: | ||
|
2012-06-01
, 19:56
|
Posts: 1,680 |
Thanked: 3,685 times |
Joined on Jan 2011
|
#248
|
|
2012-06-01
, 20:34
|
Posts: 1,033 |
Thanked: 1,013 times |
Joined on Jan 2010
|
#249
|
|
2012-06-01
, 21:15
|
Posts: 1,680 |
Thanked: 3,685 times |
Joined on Jan 2011
|
#250
|
insmod /lib/modules/current/ramzswap.ko disksize_kb=98304
The Following 5 Users Say Thank You to vi_ For This Useful Post: | ||