#sysctl.conf file
#
#############################
## Battery life tweaks #
#############################
vm.dirty_writeback_centisecs=3000
vm.dirty_expire_centisecs=500
#
#
#############################
## CPU tweaks #
#############################
#
## Queue size modifications
net.core.optmem_max=20480
net.unix.max_dgram_qlen=50
#
## Net Core Settings
## Location: /proc/sys/net/core
net.core.wmem_max=524288
net.core.rmem_max=524288
net.core.rmem_default=256960
net.core.wmem_default=256960
#
#############################
## VM & Filesystem tweaks #
#############################
fs.lease-break-time=10
#fs.file-max=65536
vm.overcommit_memory=1
vm.min_free_order_shift=4
vm.block_dump=0
vm.oom_dump_tasks=1
vm.page-cluster=0
#
#############################
## Net Speed tweaks #
#############################
#
## UnderUtilized Networking Tweaks below as recommended by avgjoemomma (from XDA)
net.ipv4.tcp_congestion_control=cubic
#
# # Hardening the TCP/IP stack to SYN attacks
net.ipv4.tcp_syncookies=1
net.ipv4.conf.all.rp_filter=1
net.ipv4.conf.default.rp_filter=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_ignore_bogus_error_responses=1
net.ipv4.tcp_no_metrics_save=1
net.ipv4.tcp_fin_timeout=15
net.ipv4.tcp_keepalive_time=1800
net.ipv4.ip_forward=0
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_sack=1
net.ipv4.tcp_fack=1
#
# Don't accept source routing
net.ipv4.conf.default.accept_source_route=0
net.ipv4.conf.all.accept_source_route=0
#
# Don't accept redirects
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
####################################
## previous Neptune tweak settings #
####################################
# Set swappiness to very low - Try to use as much memory as you can before swapping
vm.swappiness = 26
# Controls the tendency of the kernel to reclaim the memory which is used for
# caching of directory and inode objects. - Prefer to clear dentry and inode caches
vm.vfs_cache_pressure = 10000
# Contains, as a percentage of total system memory, the number of pages at which a
# process which is generating disk writes will itself start writing out dirty data.
vm.dirty_ratio = 10
# Contains, as a percentage of total system memory, the number of pages at which
# the pdflush background writeback daemon will start writing out dirty data.
vm.dirty_background_ratio = 5
Wichtig hierbei ist der Wert vm.swappiness der in diesem Fall für 1-2 GB RAM auf 26 steht. Habt ihr mehr RAM könnt ihr dementsprechend das ganze herabsetzen. Es zuweit herabzusetzen würde ich allerdings nicht empfehlen.
Update: Tritt zu starkes stocken bei voll laufendem RAM mit zu niedrigem vm.swappiness auf, kann das ganze natürlich auch hoch gesetzt werden. Bei 1 GB RAM kann hier z.B. 40 ein deutlich besserer Wert sein.