关闭keep-live,提高链接回收

keeplive_timeout 0;

events{

worker_connections 1024;

}

more /proc/sys/net/core/somaxconn

[root@localhost ~]# echo 50000 > /proc/sys/net/core/somaxconn
[root@localhost ~]# more /proc/sys/net/core/somaxconn
[root@localhost conf]# cat /proc/sys/net/ipv4/tcp_tw_recycle
0
[root@localhost conf]# echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
[root@localhost conf]# cat /proc/sys/net/ipv4/tcp_tw_recycle
1
[root@localhost conf]# echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse
[root@localhost conf]# cat /proc/sys/net/ipv4/tcp_tw_reuse
1
[root@localhost conf]# cat /proc/sys/net/ipv4/tcp_syncookies
1
[root@localhost conf]# echo 0 > /proc/sys/net/ipv4/tcp_syncookies
[root@localhost conf]# cat /proc/sys/net/ipv4/tcp_syncookies
0
[root@localhost conf]# ulimit -n
1024
[root@localhost conf]# ulimit -n 50000
[root@localhost conf]# ulimit -n
50000
work_processes 1;
worker_rlimit_nofile 10000;

nginx单机1w并发设置的更多相关文章

  1. Nginx网络架构实战学习笔记(五):大访问量优化整体思路、ab压力测试及nginx性能统计模块、nginx单机1w并发优化

    文章目录 大访问量优化整体思路 ab压力测试及nginx性能统计模块 ab压力测试及nginx性能统计模块 ab压力测试 nginx性能统计模块 nginx单机1w并发优化 整装待发: socket ...

  2. nginx单机1w并发优化

    目录 ab工具 整体优化思路 具体的优化思路 编写脚本完成并发优化配置 性能统计工具 tips 总结 ab工具 ab -c 10000 -n 200000 http://localhost/index ...

  3. 关于nginx的1W并发的优化

    我们来看一下图,下面的这张图清晰的表明了nginx优化的一些方法: nginx要响应请求的话,必须要: 1.要建立socket连接 2.是要读本地的文件 所以这就是我们的一个优化的方向: 所以参考照上 ...

  4. 21-nginx单机1W并发优化

    一:优化思路 (1)建立socket连接 (2)打开文件,并沿socket返回.二:优化  (1) 修改nginx.conf 进程数量 默认是1024 改成20140 worker_rlimit_no ...

  5. nginx利用limit模块设置IP并发防CC攻击

    nginx利用limit模块设置IP并发防CC攻击 分类: 系统2013-01-21 09:02 759人阅读 评论(0) 收藏 举报 来源:http://blog.xencdn.net/nginx- ...

  6. 关于搭建一个高性能网站的服务器的架设思路以及nginx测试的并发

    对于高性能网站的架设,主要就是请求量大,那我们该如何进行支撑? 考虑到下面的几个方面: 1.要减少请求,那对于开发人员来说,网站的css文件进行合并,背景图片也要合并,一般都是请求一张比较大的图片,然 ...

  7. nginx令牌限制并发

    http{ limit_req_zone $binary_remote_addr zone=req_one:10m rate=100r/s; server { listen 8080; server_ ...

  8. Nginx突破高并发的性能优化 - 运维笔记

    在日常的运维工作中,经常会用到nginx服务,也时常会碰到nginx因高并发导致的性能瓶颈问题.今天这里简单梳理下nginx性能优化的配置(仅仅依据本人的实战经验而述,如有不妥,敬请指出~) 一.这里 ...

  9. 阿里云Linux CentOS8.1 64位服务器安装LNMP(Linux+Nginx+MySQL+PHP) 并发调试之php-fpm配置及其与Nginx的通信

    一.php-fpm的配置 1. php-fpm的配置,首先要关注进程数量. php-fpm的进程管理方式有三种:static.dynamic.ondemand. static方式,开启固定数量(pm. ...

随机推荐

  1. leetcode刷题记录--js

    leetcode刷题记录 两数之和 给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标. 你可以假设每种输入只会对应一个答案.但 ...

  2. js 简单模板引擎

    代码 <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" cont ...

  3. How To : Modify ASM SYS password using asmcmd 11g R2 and upper

    修改RAC 11gR2及以上版本的ASM的SYS的密码方法 [grid]$ asmcmd ASMCMD> orapwusr --modify --password sys Enter passw ...

  4. Django 初学

    一.什么是web框架 框架,即framework  ['fremwɝk],特指为解决一个开放性问题而设计的具有一定约束性的支撑结构,使用框架可以帮你快速开发特定的系统,简单地说,就是你用别人搭建好的舞 ...

  5. linux环境图数据库neo4j安装

    自定义yum源 Neo4j Stable Yum Repo First, you'll want our key: cd /tmp wget http://debian.neo4j.org/neote ...

  6. 腾讯云,搭建LNMP环境

    LNMP代表的就是:Linux系统下Nginx+MySQL+PHP这种网站服务器架构. Linux是一类Unix计算机操作系统的统称,是目前最流行的免费操作系统.代表版本有:debian.centos ...

  7. PAT 1119 Pre- and Post-order Traversals

    Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can ...

  8. 【codeforces 792D】Paths in a Complete Binary Tree

    [题目链接]:http://codeforces.com/contest/792/problem/D [题意] 给你一棵满二叉树; 给你初始节点; 给你若干个往上走,左走,右走操作; 让你输出一系列操 ...

  9. MG loves string

    MG loves string Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others ...

  10. zoj 3693

    #include<stdio.h> #include<string.h>//进位问题如3.985    应该进位3.99 int main() {     int n,k,i; ...