Reply
Thread Tools
Posts: 58 | Thanked: 43 times | Joined on Aug 2010
#241
Originally Posted by don_falcone View Post
Indeed 32 may be too little. Otherwise i couldn't explain memory read-only errors during a dpkg run.
Can confirm that: value of 32 leads to dpkg errors (like, a lot)
 

The Following User Says Thank You to BertvanDorp For This Useful Post:
Posts: 669 | Thanked: 433 times | Joined on May 2010
#242
Originally Posted by vi_ View Post
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
Try for yourself, report back.
I've used these settings during today and device lags a lot especially when a phone call arrives.
 

The Following 2 Users Say Thank You to impeham For This Useful Post:
Posts: 249 | Thanked: 277 times | Joined on May 2010 @ Brighton, UK
#243
Originally Posted by vi_ View Post
Not really such a great idea, what if someone is using uSD but not ramz and wants swappolube settings?
This ocurred to me as well. Always best to aim to be a good neighbour

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.

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"
Originally Posted by vi_ View Post
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 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.

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)
  • Pull in override params from config file /etc/default/swapset
  • Override swappolube settings when compcache is active

That everything?
 

The Following 3 Users Say Thank You to mr_jrt For This Useful Post:
Posts: 1,341 | Thanked: 708 times | Joined on Feb 2010
#244
I just missed a phone call, because I could not answer. The phone went unresponsive. I didn't have anything running. I think it was because compcache. I haven't had problems like this before when even nothing is running (web, music, gps) the phone is stalling in the critical moment.
 
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#245
Same happened to me. First one after months.

--edit
Uh, very late in the game; must have missed the last page of answers:
Originally Posted by zimon View Post
Where did you get iostat for N900?
dpkg --search `which iostat`

Edit: ah, apt-cache search iostat
-> sysstat
You may use this one or busybox-power. Or just simply:
disk=mmcblk1p2
awk '{if ($3=="'"$disk"'") print $10}' /proc/diskstats

Last edited by peterleinchen; 2012-05-30 at 18:40.
 
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#246
Some comments inside quote

Originally Posted by mr_jrt View Post
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
And another one, maybe you should open your own thread about swapset (link here of course), as it feels a bit of hijacking fremangordon's one here, even it is same thema?

Last edited by peterleinchen; 2012-05-31 at 07:05.
 

The Following 3 Users Say Thank You to peterleinchen For This Useful Post:
Posts: 1,033 | Thanked: 1,013 times | Joined on Jan 2010
#247
Enabling 128MB ramzswap made the device much faster and responsive. However, getting the said memory full, device crawls to a halt requiring a reboot. Amazing while it lasts
 

The Following User Says Thank You to patlak For This Useful Post:
Posts: 1,680 | Thanked: 3,685 times | Joined on Jan 2011
#248
yeah

However if you look on the wiki page you will find the 64MB settings that work like a champ.
__________________
N900: One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.
 
Posts: 1,033 | Thanked: 1,013 times | Joined on Jan 2010
#249
Originally Posted by vi_ View Post
yeah

However if you look on the wiki page you will find the 64MB settings that work like a champ.
How about running 96MB? Have you tested it?
 
Posts: 1,680 | Thanked: 3,685 times | Joined on Jan 2011
#250
No. Correct me if I am wrong but you will insta-crash if you attempt to set a disksize of 96MB?
_________________________

I thankfully stand corrected!

Code:
insmod /lib/modules/current/ramzswap.ko disksize_kb=98304
96MB works! Proceeding directly to 96MB mode!
__________________
N900: One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.

Last edited by vi_; 2012-06-01 at 21:53.
 

The Following 5 Users Say Thank You to vi_ For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 06:46.