Posted by : Unknown Tuesday, October 2, 2012


Talk about Android battery life and performance as if there never was never-ending. On the one hand if you want to improve performance, inevitably will usually inversely affect the battery life. And vice versa. Human desire is confusing: D
There are a few tweaks to improve performance and durable batteries, one with sysctl config. Here's how to make dough

  • create a file named sysctl.conf with ES File Explorer or Root Explorer or similar
  •      open as text and then copy and paste the script below
vm.min_free_kbytes=11264
vm.oom_kill_allocating_task=0
vm.panic_on_oom=0
vm.dirty_background_ratio=60
vm.dirty_ratio=90
vm.vfs_cache_pressure=20
vm.overcommit_memory=1
vm.min_free_order_shift=4
vm.laptop_mode=0
vm.block_dump=0
vm.oom_dump_tasks=1
vm.swappiness=100
vm.drop_caches=0
vm.dirty_writeback_centisecs=2000
vm.dirty_expire_centisecs=1000

kernel.panic=30
kernel.panic_on_oops=1
kernel.msgmni=2048
kernel.msgmax=65536
kernel.random.read_wakeup_threshold=128
kernel.random.write_wakeup_threshold=256
kernel.hung_task_timeout_secs=30
kernel.sched_latency_ns=18000000
kernel.sched_min_granularity_ns=1500000
kernel.sched_wakeup_granularity_ns=3000000
kernel.sched_compat_yield=1
kernel.sched_shares_ratelimit=256000
kernel.sched_child_runs_first=0
kernel.threads-max=524288
fs.lease-break-time=10
fs.file-max=524288
fs.inotify.max_queued_events=32000
fs.inotify.max_user_instances=256
fs.inotify.max_user_watches=10240
net.core.wmem_max=1048576
net.core.rmem_max=1048576
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.optmem_max=20480
net.unix.max_dgram_qlen=50
net.ipv4.tcp_moderate_rcvbuf=1
net.ipv4.route.flush=1
net.ipv4.udp_rmem_min=6144
net.ipv4.udp_wmem_min=6144
net.ipv4.tcp_rfc1337=1
net.ipv4.ip_no_pmtu_disc=0
net.ipv4.tcp_ecn=0
net.ipv4.tcp_rmem='6144 87380 1048576'
net.ipv4.tcp_wmem='6144 87380 1048576'
net.ipv4.tcp_timestamps=0
net.ipv4.tcp_sack=1
net.ipv4.tcp_fack=1
net.ipv4.tcp_window_scaling=1
net.ipv4.tcp_tw_recycle=1
net.ipv4.tcp_tw_reuse=1
net.ipv4.tcp_congestion_control=cubic
net.ipv4.tcp_syncookies=1
net.ipv4.tcp_synack_retries=2
net.ipv4.tcp_syn_retries=2
net.ipv4.tcp_max_syn_backlog=1024
net.ipv4.tcp_max_tw_buckets=16384 
net.ipv4.icmp_echo_ignore_all=1
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.icmp_ignore_bogus_error_responses=1
net.ipv4.tcp_no_metrics_save=1
net.ipv4.tcp_fin_timeout=15
net.ipv4.tcp_keepalive_intvl=30
net.ipv4.tcp_keepalive_probes=5
net.ipv4.tcp_keepalive_time=1800
net.ipv4.ip_forward=0
net.ipv4.conf.all.send_redirects=0
net.ipv4.conf.default.send_redirects=0
net.ipv4.conf.all.rp_filter=1
net.ipv4.conf.default.rp_filter=1
net.ipv4.conf.all.accept_source_route=0
net.ipv4.conf.default.accept_source_route=0
net.ipv4.conf.all.accept_redirects=0
net.ipv4.conf.default.accept_redirects=0
net.ipv4.conf.all.secure_redirects=0
net.ipv4.conf.default.secure_redirects=0
  • save
  • copy file sysctl.conf tsbt ke /system/etc
* to run the script page, open 'terminal', type su then sysctl-p
* see the result type sysctl-a | grep vm and / or sysctl-a | grep kernel to see the kernel value.
* feel the difference, running a few hours or days: D

AutoRun script above each time booting yet. For can autorun on boot :
  • create a file in /system/ect/init.d
  • Let's suppose you create a file with the name 01sysctl 
  • open as text with ES Explorer or similar
  • content with script
#!/system/bin/sh
sysctl -p
  • save
  • set permission rwxr-xr-x or 777
  • reboot and see successful autorun on boot or with the command sysctl-a | grep xx as above via the terminal.
If there are some scripts that can not autorun when booting, check if you are using any other script or system settings that function the same. for example setting zram in CM9, if enabled then the line will not work because vm.swappiness with zram overwrite the settings
.
Value or the figures above may be slightly different from that you often find. In fact there are aggressive as in vm.swappiness, and the value of vm.drop_caches, then what is good for your device? Try it first and see the results: D

Values ​​or figures above may be suitable blm with all ROM and / or device, please try and test yourself as needed. You can change the value, delete one or more rows, added another line is also not a problem. Congratulations to experiment.

{ 4 komentar ... read them below or Comment }

  1. "vm.swappiness=100".

    Do you even know what swappiness is? No one in their right mind would set the swap value to 100, not even on a pre-2012 Android device.

    ReplyDelete
  2. @alex ohannes... The page specifically says that swap setting is aggressive. If your going through the trouble to make this script, is it that hard to change ANY of the values to something you'd prefer? Your questions pretty funny though... Do you actually think after this whole post from like 2 years ago, you pop up with a redic comment he'd come back with a 'uuuhh no'?


    Anyways,
    This DOES make a substantial increase in speed, thanks!

    ReplyDelete
    Replies
    1. "Do you actually think after this whole post from like 2 years ago, you pop up with a redic comment he'd come back with a 'uuuhh no'?"

      I know I certainly would if I wrote this blog post, so it wouldn't surprise me one bit if the author is as supportive of his own content as I am of mine.

      And sorry, I did write my original comment when I was sleep-deprived, so I'm sorry if I came across as rude. I still feel that my points are somewhat valid, though. With that said, (in contradiction to my first comment) you'd be crazier to use such a setting on a pre-2012 device than a post-2012 one. If you used such a setting for a device like the Moto E, it wound't be nearly as bad. You would probably even... get some speed increases (depending on what tasks are being caried out). :O

      Delete

follow me :

  • Random post :

    Powered by Blogger.

    - Copyright © hendy's Blog - Metrominimalist - Powered by Blogger - Designed by Johanes Djogan -