• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [TWEAK][WIP] sysctl.conf Tweaking

justainchoe

Well-Known Member
Jan 20, 2012
191
45
Los Angeles, CA
This ONLY works on roms that have sysctl.conf capabilites. Broken Out supports this, I think Black Plague supports this (can someone please confirm), but Number Two and Stock roms do not support this.

Ok, my phone is freaking FAST right now. I have a LOT of apps installed and I use my phone a lot, and that combination causes my phone to lag after a while. Even after a shutoff/reboot, it quickly slows down. I'm not really noticing any of this type of slowdown with this tweak.

What I changed was the Min Free KBytes, Dirty Ratio, Dirty Background Ratio, VFS Cache Pressure, and Oom Kill Allocating Task. You can change these settings with Rom Toolbox. Also, I installed an app called Cache Cleaner NG.

From what I've read (15 pages of a 60+ page thread), you want to have low VFS Cache Pressure so that you use as much cache as possible instead of having Android OS drop it. However, lowering the cache pressure will make you have more cache so you need a way to clear cache for you. So I use Cache Cleaner NG to clear my cache twice a day, and I use these settings for sysctl.conf:

91LlC.png


Initially I had my VFS Cache Pressure at 1, but I got a reboot after 14 hours (quite fast for a reboot actually, around 20 seconds?) so I bumped VFS Cache pressure up to 5. If it stays stable here for a few days, I'm gonna experiment a bit and try to get a number closer to 1, but we'll see. Even though it crashed, I didn't really experience much slow-down if at all.



If you want to know more about what these settings do:

macpro88 from droidxforums.com:
[Tutorial] ROMs & Sysctl.conf & other tweaks!

The sysctl.conf is a configuration file for "sysctl" which is an interface for dynamically changing kernel parameters in the Linux OS. The configuration file contains the following elements, vm.min_free_kbytes, vm.dirty_ratio, vm.dirty_backgroud_ratio, vm.vfs_cache_pressure, vm.oom_kill_allocating_task. There are many other elements within the file, but we will be primarily focusing on these specifically (the vm prefix stands for virtual memory). The sysctl.conf file should be located in /etc (/system/etc) by default. To enable it you need your ROM to execute "sysctl -p" somewhere during the boot process (or shortly afterward). We will also be discussing how to enable it if it is not already done so. You can also run sysctl -p manually to enable it any time after the OS is started.

Now, let
 
This ONLY works on roms that have sysctl.conf capabilites. Broken Out supports this, I think Black Plague supports this (can someone please confirm), but Number Two and Stock roms do not support this.

Ok, my phone is freaking FAST right now. I have a LOT of apps installed and I use my phone a lot, and that combination causes my phone to lag after a while. Even after a shutoff/reboot, it quickly slows down. I'm not really noticing any of this type of slowdown with this tweak.

What I changed was the Min Free KBytes, Dirty Ratio, Dirty Background Ratio, VFS Cache Pressure, and Oom Kill Allocating Task. You can change these settings with Rom Toolbox. Also, I installed an app called Cache Cleaner NG.

From what I've read (15 pages of a 60+ page thread), you want to have low VFS Cache Pressure so that you use as much cache as possible instead of having Android OS drop it. However, lowering the cache pressure will make you have more cache so you need a way to clear cache for you. So I use Cache Cleaner NG to clear my cache twice a day, and I use these settings for sysctl.conf:

91LlC.png


Initially I had my VFS Cache Pressure at 1, but I got a reboot after 14 hours (quite fast for a reboot actually, around 20 seconds?) so I bumped VFS Cache pressure up to 5. If it stays stable here for a few days, I'm gonna experiment a bit and try to get a number closer to 1, but we'll see. Even though it crashed, I didn't really experience much slow-down if at all.



If you want to know more about what these settings do:

macpro88 from droidxforums.com:
[Tutorial] ROMs & Sysctl.conf & other tweaks!

The sysctl.conf is a configuration file for "sysctl" which is an interface for dynamically changing kernel parameters in the Linux OS. The configuration file contains the following elements, vm.min_free_kbytes, vm.dirty_ratio, vm.dirty_backgroud_ratio, vm.vfs_cache_pressure, vm.oom_kill_allocating_task. There are many other elements within the file, but we will be primarily focusing on these specifically (the vm prefix stands for virtual memory). The sysctl.conf file should be located in /etc (/system/etc) by default. To enable it you need your ROM to execute "sysctl -p" somewhere during the boot process (or shortly afterward). We will also be discussing how to enable it if it is not already done so. You can also run sysctl -p manually to enable it any time after the OS is started.

Now, let
 
Upvote 0
What's I/O schedule under advanced?

I use SIO. I have no idea what it is, but it seems like it's the best one available for our phone. Supposedly VR scheduler is the best. SIO is better than noop, deadline, and cfq:

Technical stuff Aussie Android ROMS
xda-developers - View Single Post - [ROM] Avaritia HD v0.7 (Udate: 20 jan )
I/O Scheduler - A quick test - xda-developers

What app is that your using?
Rom Toolbox Pro (you can change kernel tweaks in the free version though).
 
  • Like
Reactions: DONLATINOHEAT
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones