IPv4 Tuning SFOS 4.x

Rating: 
5
Your rating: None Average: 5 (4 votes)

Network TCP Performance Tuning IPv4

This is a quick fix for my stuttering network connection when streaming videos over LTE and WIFI with the native browser. The fix has only been tested with the Sony Xperia 10 Plus DS and SFOS 4.x. This fix can be applied to other devices as well.

This fix additionally installs the following sysctl values in the /etc/sysctl.d/ipv4-settings.conf file

# Queue size modifications
net.core.wmem_max=1048576
net.core.rmem_max=1048576
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
#
# Re-use sockets in time-wait state
net.ipv4.tcp_tw_recycle=1
net.ipv4.tcp_tw_reuse=1
#
net.ipv4.tcp_congestion_control=cubic
#
# Hardening the TCP/IP stack to SYN attacks
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
#
# Enable spoofing protection (turn on reverse packet filtering)
net.ipv4.conf.all.rp_filter=1
net.ipv4.conf.default.rp_filter=1
#
# Don't accept source routing
net.ipv4.conf.all.accept_source_route=0
net.ipv4.conf.default.accept_source_route=0 
#

Application versions: 
AttachmentSizeDate
File ipv4-tuning-0.1-1.armv7hl.rpm7.34 KB22/03/2021 - 15:34
Changelog: 

- First build.

Comments

tkoham's picture

Works a treat on my xperia 10

ferlanero's picture

I don't know what this app really does, but overall connectivity has been improve on my XA2 in SF 4.0 So thank you very much for it