Guest twrock Posted December 4, 2011 Report Posted December 4, 2011 (edited) I'm trying to put the final touches on a couple of roms, and I'm frustrated by not being able to pre-set swappiness. Yes, I know people can just set it themselves after the initial boot, but I'd like to pre-set it to something much more realistic than the kernel default of 60, because it creates terrible lag on most of our phones. I've attempted to add a script to init.d with this line: echo "15" > /proc/sys/vm/swappiness I also tried to add that line to sysctl.conf, but no luck. It doesn't change it. Any help would be appreciated. Edited December 10, 2011 by twrock
Guest pier11 Posted December 5, 2011 Report Posted December 5, 2011 Only guess. I'd think the proper place would be init.rc located on RAMDISK. I see similar entries there: write /proc/sys/vm/overcommit_memory 1 write /proc/sys/vm/min_free_order_shift 4 # Tweak background writeout write /proc/sys/vm/dirty_expire_centisecs 200 write /proc/sys/vm/dirty_background_ratio 5 But may be I'm wrong. Probably worth to experiment if not yet.
Guest twrock Posted December 6, 2011 Report Posted December 6, 2011 Only guess. I'd think the proper place would be init.rc located on RAMDISK. I see similar entries there: write /proc/sys/vm/overcommit_memory 1 write /proc/sys/vm/min_free_order_shift 4 # Tweak background writeout write /proc/sys/vm/dirty_expire_centisecs 200 write /proc/sys/vm/dirty_background_ratio 5 But may be I'm wrong. Probably worth to experiment if not yet. Thanks, I'll check that out. From this thread, I see that there must be some way to do it in an init.d script or in sysctl.conf, but I can't get it to work: http://forum.xda-developers.com/showthread.php?t=1289539 So it seems I must still be doing something wrong. (There is a lot I don't understand about all of this.) Thanks again for the idea.
Guest twrock Posted December 6, 2011 Report Posted December 6, 2011 Fibble did it. Ask him. I should go look to see where he is "hanging out" these days. His PM is turned off, so I can't get to him that way. If I was smarter, I'd register for the "developer" forum, but those really smart guys intimidate me. :unsure:
Guest D-D- Posted December 6, 2011 Report Posted December 6, 2011 I asked him on twitter. I hope he will see the mention.
Guest Simon O Posted December 6, 2011 Report Posted December 6, 2011 Add the command to init.qcom.sh in the boot.img and it should take effect on each boot.
Guest twrock Posted December 6, 2011 Report Posted December 6, 2011 (edited) Add the command to init.qcom.sh in the boot.img and it should take effect on each boot. Great! Thanks. (And thanks to D-D- as well.) Do I assume correctly that it can still be set to something different via the "a2sd swappy??" command after doing that? I'll see what I can do tomorrow to get things working, but now I've really got to get to bed.:blink: Edited December 6, 2011 by twrock
Guest twrock Posted December 7, 2011 Report Posted December 7, 2011 Add the command to init.qcom.sh in the boot.img and it should take effect on each boot. Hmm, no init.qcom.sh in this boot.img. I think Tom took it out and put those settings directly into init.qcom.rc.
Guest D-D- Posted December 7, 2011 Report Posted December 7, 2011 Well still it's not a bad thing. I mean, after installing the rom, u need to change it only once, right? It's not with the thing we had to do before the command a2sd swappy was available, right?
Guest twrock Posted December 7, 2011 Report Posted December 7, 2011 Only guess. I'd think the proper place would be init.rc located on RAMDISK. I see similar entries there: write /proc/sys/vm/overcommit_memory 1 write /proc/sys/vm/min_free_order_shift 4 # Tweak background writeout write /proc/sys/vm/dirty_expire_centisecs 200 write /proc/sys/vm/dirty_background_ratio 5 But may be I'm wrong. Probably worth to experiment if not yet. Pier, that was it! Thanks much. For future reference and clarification for anyone who stumbles onto this thread later: I was trying to modify a CM6.1 rom to reduce the original swappiness to 15 (down from 60). I added the following to the init.rc file in the ramdisk of the boot.img: write /proc/sys/vm/swappiness 15
Guest Simon O Posted December 11, 2011 Report Posted December 11, 2011 Glad you sorted it. I'm getting my devices mixed up and I did forget what files the Pulse use!
Guest twrock Posted December 12, 2011 Report Posted December 12, 2011 Glad you sorted it. I'm getting my devices mixed up and I did forget what files the Pulse use! It was just Tom's 2.2 boot.img that had gotten rid of it, so I don't think your memory was that bad. ;)
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now