linux优化
Posted 蜗角虚名,蝇头微利,算来著甚干忙
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux优化相关的知识,希望对你有一定的参考价值。
1 #!/bin/bash 2 echo "* soft nofile 1048576" >> /etc/security/limits.conf 3 echo "* hard nofile 1048576" >> /etc/security/limits.conf 4 5 echo "fs.file-max = 1048576" >> /etc/sysctl.conf 6 7 echo "net.ipv4.ip_local_port_range = 1024 65535" >> /etc/sysctl.conf 8 echo "net.ipv4.tcp_mem = 786432 2097152 3145728" >> /etc/sysctl.conf 9 echo "net.ipv4.tcp_rmem = 4096 4096 16777216" >> /etc/sysctl.conf 10 echo "net.ipv4.tcp_wmem = 4096 4096 16777216" >> /etc/sysctl.conf 11 12 echo "net.ipv4.tcp_tw_recycle = 1" >> /etc/sysctl.conf 13 echo "net.core.somaxconn = 262144" >> /etc/sysctl.conf 14 echo "net.ipv4.tcp_max_syn_backlog = 8192" >> /etc/sysctl.conf 15 echo "net.core.netdev_max_backlog = 65536" >> /etc/sysctl.conf 16 17 echo "net.ipv4.tcp_keepalive_time = 1800" >> /etc/sysctl.conf 18 echo "net.ipv4.tcp_keepalive_probes = 3" >> /etc/sysctl.conf 19 echo "net.ipv4.tcp_keepalive_intvl = 15" >> /etc/sysctl.conf 20 21 sysctl -p
以上是关于linux优化的主要内容,如果未能解决你的问题,请参考以下文章
使用 C++ 反转句子中的每个单词需要对我的代码片段进行代码优化
Android 逆向整体加固脱壳 ( DEX 优化流程分析 | DexPrepare.cpp 中 dvmOptimizeDexFile() 方法分析 | /bin/dexopt 源码分析 )(代码片段