1、使用 PHP-FPM SOCKET的形式通讯

2、配置
  • PHP-FPM配置
[root@bogon php-fpm.d]# ls -al
总用量
drwxr-xr-x. root root 8月 : .
drwxr-xr-x. root root 8月 : ..
-rw-r--r--. root root 8月 : www.conf
[root@bogon php-fpm.d]# pwd
/etc/php-fpm.d
[root@bogon php-fpm.d]# vi www.conf pm = static ; The number of child processes to be created when pm is set to 'static' and the
; maximum number of child processes to be created when pm is set to 'dynamic'.
; This value sets the limit on the number of simultaneous requests that will be
; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
; CGI.
; Note: Used when pm is set to either 'static' or 'dynamic'
; Note: This value is mandatory.
pm.max_children = ; The number of child processes created on startup.
; Note: Used only when pm is set to 'dynamic'
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) /
pm.start_servers = ; The desired minimum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
pm.min_spare_servers = ; The desired maximum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
pm.max_spare_servers =
; The number of requests each child process should execute before respawning.
; This can be useful to work around memory leaks in 3rd party libraries. For
; endless request processing specify ''. Equivalent to PHP_FCGI_MAX_REQUESTS.
; Default Value:
pm.max_requests = ; Set open file descriptor rlimit.
; Default Value: system defined value
rlimit_files =
  • Nginx 配置

  

[root@bogon nginx]# pwd
/usr/local/openresty/
[root@bogon openresty]# cat nginx/conf/nginx.conf
user root;
worker_processes 4; #error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info; #pid logs/nginx.pid; events {
worker_connections 2048;
}

  

  • Linux 设置
[root@bogon php-fpm.d]# cat /etc/rc.local
#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot. touch /var/lock/subsys/local
ulimit -HSn 65535 [root@bogon php-fpm.d]# source /etc/rc.local
[root@bogon php-fpm.d]#

  3、Siege 压力测试结果

[root@workspace ~]# siege -c 100 -r 10 http://10.2.1.123 -i -b
Transactions: 2550 hits
Availability: 100.00 %
Elapsed time: 43.20 secs
Data transferred: 162.12 MB
Response time: 3.62 secs
Transaction rate: 59.03 trans/sec
Throughput: 3.75 MB/sec
Concurrency: 213.65
Successful transactions: 2550
Failed transactions: 0
Longest transaction: 18.46
Shortest transaction: 0.04
[root@workspace ~]#

  

PHP siege 压测 QPS大小的更多相关文章

  1. CentOS 相关软件安装 与 Siege压测

    1.登录linux机器 a.打开mac的钥匙串 b.ssl root@ip c.输入密码 常用命令: cat /proc/version  查看系统版本 cat /etc/issue control ...

  2. 压测工具siege和wrk

    siege压测工具 安装: wget http://download.joedog.org/siege/siege-3.0.8.tar.gz cd siege-3.0.8 ./configure ma ...

  3. 利器: 用Siege做Web服务器压测

    用「Web压测」关键词检索,能找到好多进行压测的工具,比如ab.Http_load.Webbench.Siege这些,不过今天并不是要对这些工具做对比,毕竟我们只是想得到一个结果.本文主要介绍Sieg ...

  4. web服务器压测工具siege、ab

    web服务器压测工具也挺多,这里只介绍我用过的这两种--siege(for linux).ab(for windows). 一.siege 1.简介: Siege是一款开源的压力测试工具,设计用于评估 ...

  5. 压测中的QPS与TPS区别

    原文来自:https://www.cnblogs.com/fkkk/p/11957566.html QPS(每秒查询率)=并发数/平均响应时间 TPS(每秒处理事务数)=请求数/时间(秒) TPS的过 ...

  6. ab压力测试工具-批量压测脚本

    ab(Apache benchmark)是一款常用的压力测试工具.简单易用,ab的命令行一次只能支持一次测试.如果想要批量执行不同的测试方式,并自动对指标进行分析,那么单靠手工一条一条命令运行ab,估 ...

  7. 全链路压测平台(Quake)在美团中的实践

    背景 在美团的价值观中,以“客户为中心”被放在一个非常重要的位置,所以我们对服务出现故障越来越不能容忍.特别是目前公司业务正在高速增长阶段,每一次故障对公司来说都是一笔非常不小的损失.而整个IT基础设 ...

  8. 05:Sysbench压测-innodb_deadlock_detect参数对性能的影响

    目录 sysbench压测-innodb_deadlock_detect参数对性能的影响 一.OLTP测试前准备 二.进行OLTP测试 三.测试结果解读: 四.关于测试后的结论: 五.关于测试后的性能 ...

  9. 高德全链路压测平台TestPG的架构与实践

    导读 2018年十一当天,高德DAU突破一个亿,不断增长的日活带来喜悦的同时,也给支撑高德业务的技术人带来了挑战.如何保障系统的稳定性,如何保证系统能持续的为用户提供可靠的服务?是所有高德技术人面临的 ...

随机推荐

  1. BNU 27847——Cellphone Typing——————【字典树】

    Cellphone Typing Time Limit: 5000ms Memory Limit: 131072KB This problem will be judged on UVA. Origi ...

  2. 使用InstallShield打包VS程序

    使用InstallShield打包VS程序 InstallShield是微软自己的一个打包工具,这个打包工具,有其优势也有其弊端.其优势,可以很好且方便地将.NET平台的控件以及程序所需要的dll打包 ...

  3. 将Spring源码转换为工程 + 导入Eclipse时缺失jar包

    将源码转换为工程: 比如查看Spring事务部分的源码. 打开cmd窗口,切换到Spring-tx文件夹下,执行命令 “gradle cleanidea eclipse” . 缺失jar包: 第一步: ...

  4. php赋值运算符

    = 赋值 += $x+=3相当于$x = $x+3; -= *= /+ %= .=

  5. Struts2_HelloWorld_7_1

    大致了解应用的运行过程: 由请求路径开始,浏览器端通过URL向tomcat发送http请求(如:http://localhost:8080/Struts2_0100_Introduction/hell ...

  6. jupyter notebook 报错 ImportError: No module named matplotlib

    解决办法: 打开Anaconda Prompt  列出conda环境: conda info --envs 结果显示: # conda environments: # tensorflow * D:\ ...

  7. outlook添加邮箱账户时,测试成功,下一步显示请求失败

    今天在给公司同事添加邮箱账户时,全部设置正常,测试也成功了,但是点击下一步时,出现了请求失败的提示.     1.  看到这个提示,我首先重启了一下outlook,发现进去添加还是不行  2.重启了电 ...

  8. 关于ASP.NET页面事件的知识点

    ASP是动态服务器页面(ActiveServerPage)的英文缩写,是微软公司开发的代替CGI脚本程序的一种应用,它可以与数据库和其它程序进行交互,是一种简单.方便的编程工具.那么关于ASP.NET ...

  9. 初识QT中的qDebug()

    首先在头文件中包含 #include<QDebug> 当开发者需要为一个装置.文件.字符串或者控制台,写出调试和跟踪信息时,该类被使用. 在需要使用的地方插入: qDebug(][]); ...

  10. NYOJ 士兵杀敌(1~5)

    士兵杀敌(1): http://acm.nyist.net/JudgeOnline/problem.php?pid=108 分析:前缀和 #include <bits/stdc++.h> ...