[Sprint HTC One (M7)] gsx1000r02:
First is sysctl -p then su sysctl -p. And sysctl.conf file at the end. I don't understand if everything is working correctly.

u0_a224@android:/ $ export PATH=/data/local/bin:$PATH

u0_a224@android:/ $ sysctl -p

sysctl: error setting key 'vm.drop_caches': Permission denied

sysctl: error setting key 'vm.oom_kill_allocating_task': Permission denied

sysctl: error setting key 'vm.panic_on_oom': Permission denied

sysctl: error setting key 'vm.dirty_background_ratio': Permission denied

sysctl: error setting key 'vm.dirty_ratio': Permission denied

sysctl: error setting key 'vm.vfs_cache_pressure': Permission denied

sysctl: error setting key 'vm.overcommit_memory': Permission denied

sysctl: error setting key 'vm.min_free_order_shift': Permission denied

sysctl: error setting key 'vm.laptop_mode': Permission denied

sysctl: error setting key 'vm.block_dump': Permission denied

sysctl: error setting key 'vm.oom_dump_tasks': Permission denied

sysctl: error setting key 'vm.swappiness': Permission denied

sysctl: error setting key 'vm.dirty_writeback_centisecs': Permission denied

sysctl: error setting key 'vm.dirty_expire_centisecs': Permission denied

sysctl: error setting key 'vm.min_free_kbytes': Permission denied

sysctl: error setting key 'fs.file-max': Permission denied

sysctl: error setting key 'fs.inotify.max_queued_events': Permission denied

sysctl: error setting key 'fs.inotify.max_user_instances': Permission denied

sysctl: error setting key 'fs.inotify.max_user_watches': Permission denied

sysctl: error setting key 'fs.lease-break-time': Permission denied

sysctl: error: 'kernel.msgmax' is an unknown key

sysctl: error: 'kernel.msgmni' is an unknown key

sysctl: error setting key 'kernel.panic': Permission denied

sysctl: error setting key 'kernel.random.read_wakeup_threshold': Permission denied

sysctl: error setting key 'kernel.random.write_wakeup_threshold': Permission denied

sysctl: error: 'kernel.sem' is an unknown key

sysctl: error: 'kernel.shmmax' is an unknown key

sysctl: error setting key 'kernel.threads-max': Permission denied

sysctl: error setting key 'net.core.rmem_max': Permission denied

sysctl: error setting key 'net.core.wmem_max': Permission denied

sysctl: error setting key 'net.ipv4.tcp_rmem': Permission denied

sysctl: error setting key 'net.ipv4.tcp_wmem': Permission denied

sysctl: error setting key 'net.ipv4.tcp_timestamps': Permission denied

sysctl: error setting key 'net.ipv4.tcp_sack': Permission denied

sysctl: error setting key 'net.ipv4.tcp_congestion_control': Permission denied

sysctl: error setting key 'net.ipv4.tcp_window_scaling': Permission denied

sysctl: error setting key 'net.ipv4.tcp_tw_recycle': Permission denied

sysctl: error setting key 'net.ipv4.tcp_tw_reuse': Permission denied

u0_a224@android:/ $ su

root@android:/ # sysctl -p

vm.drop_caches = 3

vm.oom_kill_allocating_task = 0

vm.panic_on_oom = 0

vm.dirty_background_ratio = 70

vm.dirty_ratio = 90

vm.vfs_cache_pressure = 10

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 = 60

vm.dirty_writeback_centisecs = 500

vm.dirty_expire_centisecs = 250

vm.min_free_kbytes = 4096

fs.file-max = 524288

fs.inotify.max_queued_events = 32000

fs.inotify.max_user_instances = 256

fs.inotify.max_user_watches = 10240

fs.lease-break-time = 10

sysctl: error: 'kernel.msgmax' is an unknown key

sysctl: error: 'kernel.msgmni' is an unknown key

kernel.panic = 10

kernel.random.read_wakeup_threshold = 128

kernel.random.write_wakeup_threshold = 256

sysctl: error: 'kernel.sem' is an unknown key

sysctl: error: 'kernel.shmmax' is an unknown key

kernel.threads-max = 524288

net.core.rmem_max = 524288

net.core.wmem_max = 524288

sysctl: short write

1|root@android:/ #

Sysctl.conf file

vm.drop_caches=3

vm.oom_kill_allocating_task=0

vm.panic_on_oom=0

vm.dirty_background_ratio=70

vm.dirty_ratio=90

vm.vfs_cache_pressure=10

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=60

vm.dirty_writeback_centisecs=500

vm.dirty_expire_centisecs=250

vm.min_free_kbytes=4096

fs.file-max=524288

fs.inotify.max_queued_events=32000

fs.inotify.max_user_instances=256

fs.inotify.max_user_watches=10240

fs.lease-break-time=10

kernel.msgmax=65536

kernel.msgmni=2048

kernel.panic=10

kernel.random.read_wakeup_threshold=128

kernel.random.write_wakeup_threshold=256

kernel.sem='500 512000 64 2048'

kernel.shmmax=268435456

kernel.threads-max=524288

net.core.rmem_max=524288

net.core.wmem_max=524288

net.ipv4.tcp_rmem='6144 87380 524288'

net.ipv4.tcp_wmem='6144 87380 524288'

net.ipv4.tcp_timestamps=0

net.ipv4.tcp_sack=1

net.ipv4.tcp_congestion_control=cubic

net.ipv4.tcp_window_scaling=1

net.ipv4.tcp_tw_recycle=1

net.ipv4.tcp_tw_reuse=1