`
wecoo
  • 浏览: 85956 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

性测试关键参数设置

 
阅读更多
修改系统使用端口范围:
vi /etc/sysctl.conf 
net.ipv4.tcp_syncookies = 0 把1改成0将防攻击关闭                   
net.ipv4.ip_local_port_range=1024       65000 允许开打1024~65535之前的所有
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_max_tw_buckets = 180000
net.core.somaxconn = 2048
net.ipv4.tcp_max_syn_backlog = 1024


端口
使用sysctl -w 生效
使用sysctl -p 查看

修改系统最大打开文件数
vim /etc/security/limits.conf
* soft nofile 60000
* soft nproc 60000
* hard nofile 65535
* hard nproc 65535


vim ~/.bash_profile 或 vim /etc/profile
加入:ulimit -u 65000

查看是否修改成功:
ulimit -a 



修改数据库参数:
vi /etc/my.cnf



查看进程可用数:netstat -np | grep 127.0.0.1:9000 |wc -l
        数据库  netstat -na |grep 3306|wc -l
  系统所有进程  netstat -na |wc -l

当前目中哪些文中含有XXX:grep -r 'DISTINCT' .


查看内存情况:vmstat 1 100

查看IO情况:iostat -dx 5      5代表5秒

查看目录下文件大小或某个文件大小:du -sh   du -sh  XXX

数据库中查看锁表之类的内容:SHOW PROCESSLIST;
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics