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. 云计算&大数据相关知识

    1.极客学院云计算&大数据总链接:http://wiki.jikexueyuan.com/list/cloud/ 一.NSQ相关参考资料: 1.极客学院NSQ指南:http://wiki.ji ...

  2. idea创建Javaweb项目

    1.Javaweb项目结构 1.1修改生成.class文件的位置为WEB-INF下的classes: 生成的.class文件位置: 1.2 设置第三方jar包添加位置:

  3. 微信小程序入门开发文档

    第一步:下载微信小程序开发者工具并安装,下载路径: https://mp.weixin.qq.com/debug/wxadoc/dev/devtools/download.html 进到下载界面后,根 ...

  4. JavaScript 中 call,apply 和 bind

    call and apply   改变函数内部this的指向(即函数执行时所在的作用域),然后在所指定的作用域中,调用该函数. function test() {} test() == test.ca ...

  5. MySQL慢查询分析工具pt-query-digest详解

    一.简介 pt-query-digest是用于分析mysql慢查询的一个工具,它可以分析binlog.General log.slowlog,也可以通过SHOWPROCESSLIST或者通过tcpdu ...

  6. python+selenium第一个脚本

    #coding=utf-8from selenium import webdriverfrom selenium.webdriver.common.keys import Keysimport tim ...

  7. selnium截屏操作

    这个算是难找的.C# ITakeScreenShot 接口来实现截图.不是ScreenShot这个坑弄了很长时间啊. var folderLocation = Environment.CurrentD ...

  8. Cordova各个插件使用介绍系列(八)—$cordovaCamera筛选手机图库图片并显示

    原文档请看http://www.ncloud.hk/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/ionic%E5%9B%BE%E7%89%87%E4%B8%8A%E4%B ...

  9. Ubuntu18.04中使用中文输入法

    如何在ubuntu18.04中设置使用中文输入法 ubuntu 在最新的版本中已经可以不用用户自己单独去下载中文输入法使用了,本次使用为 ubuntu18.04LTS版本(登陆是界面选择的是ubunt ...

  10. PHP : url中出现乱码问题

    例子: 在html中,将数据传到url中 当我点击“提交回复”后,跳转页面中将显示: 我们获取这个参数: 但是由于传过来的参数是中文,url会进行自动的解析成二进制的代码,那我们后台接受到的数据是解析 ...