Tuning sysctl.conf

Dành cho con giời nào thích phá. Mở terminal, gõ sudo nano /etc/sysctl.conf enter, điền password xong paste cái này vào:

kern.sysv.shmmax=536870912
kern.sysv.shmall=131072
kern.sysv.shmmin=1

kern.sysv.shmmni=12288
kern.sysv.shmseg=12192
kern.sysv.semmns=99541
kern.sysv.semmni=87381
kern.sysv.semmsl=99541

kern.maxproc=2048
kern.maxprocperuid=1024
kern.ipc.somaxconn=8192
kern.ipc.maxsockbuf=4194304
kern.ipc.somaxconn=32768
net.inet.tcp.rfc1323=1
net.inet.tcp.win_scale_factor=3
net.inet.tcp.sockthreshold=16
net.inet.tcp.sendspace=250000
net.inet.tcp.recvspace=250000
net.inet.tcp.mssdflt=1440
net.inet.tcp.msl=10000
net.inet.tcp.always_keepalive=1
net.inet.tcp.keepidle=120000
net.inet.tcp.keepinit=1500
net.inet.tcp.keepintvl=1500
net.inet.tcp.delayed_ack=0
net.inet.tcp.slowstart_flightsize: 4
net.inet.tcp.blackhole=2
net.inet.udp.blackhole=1
net.inet.icmp.icmplim=50

net.local.stream.sendspace=163840
net.local.stream.recvspace=163840
net.local.dgram.recvspace=4096
net.inet.tcp.slowstart_flightsize=89
net.inet.tcp.local_slowstart_flightsize=10
net.inet.tcp.mssdflt=1460
net.inet.tcp.delayed_ack=3
net.inet.tcp.delayed_ack=0
net.inet.tcp.delayed_ack=3

xong bấm Ctrl+X, bấm Y, Enter, gõ reboot, enter và cảm nhận nhé.