页面“Debian服务器初始化”与“什么是TPS 什么是QPS 什么是并发量 什么是PV 什么是UV”之间的差异

来自linux中国网wiki
(页面间的差异)
跳到导航 跳到搜索
 
 
第1行: 第1行:
  
[[Salt-ssh批量初始化机器]]
+
=PV (page view)=  
= os init=
+
页面浏览量。指的是:网站被用户访问的总页面数量,统计页面刷新的次数,每一次页面刷新,就算做一次PV流量。是网站优化的重要指标,体现网站的用户体验,内容价值等因素。
== change sources ==
 
===10源===
 
<pre>
 
  
deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
+
=UV (unique visitor)独立访客=
deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
+
指访问某个站点或点击某条新闻的不同IP地址的人数,独立IP只记录第一次进入网站的具有独立IP的访问者,在同一天内再次访问该网站则不计数。
deb http://mirrors.aliyun.com/debian-security buster/updates main
 
deb-src http://mirrors.aliyun.com/debian-security buster/updates main
 
deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
 
deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
 
deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
 
deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
 
  
</pre>
+
=IP(internet  protocol, 互联网协议)指网络之间的互联协议=
===9 源===
+
  在网站SEO中,通常被用作表示用户的数量。
<pre>
 
 
 
echo 'deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib
 
deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib
 
deb http://mirrors.aliyun.com/debian-security stretch/updates main
 
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main
 
deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
 
deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
 
deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
 
deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib ' >sources.list
 
</pre>
 
 
 
== ssh config==
 
<pre>
 
echo "ssh-rsa AAAAB3NzaC you_prk_key root@ops
 
" >> /root/.ssh/authorized_keys
 
 
 
sed -i "s/#PubkeyAuthentication yes/PubkeyAuthentication yes/g" /etc/ssh/sshd_config
 
  
sed -i "s/^PasswordAuthentication yes/PasswordAuthentication no/g" /etc/ssh/sshd_config
 
  
systemctl restart sshd
 
#service  sshd restart
 
  
</pre>
+
=每秒的新建链接数(CPS)=
==常用软件==
+
=TPS:Transactions Per Second(每秒传输的事物处理个数)=
<pre>
+
<pre>即服务器每秒处理的事务数。TPS包括一条消息入和一条消息出,加上一次用户数据库访问。(业务TPS = CAPS × 每个呼叫平均TPS)
useradd -d /data/evan  -s /bin/bash -m  evan
 
数m表示如果该目录不存在,则创建该目录
 
  
 +
TPS是软件测试结果的测量单位。一个事务是指一个客户机向服务器发送请求然后服务器做出反应的过程。客户机在发送请求时开始计时,收到服务器响应后结束计时,以此来计算使用的时间和完成的事务个数。
  
apt install net-tools  rsync wget  firewalld  vim  build-essential dnsutils screen  curl sudo lsb-release  iotop software-properties-common  -y  #dig dnsutils
+
一般的,评价系统性能均以每秒钟完成的技术交易的数量来衡量。系统整体处理能力取决于处理能力最低模块的TPS值。</pre>
  
#全面的开发工具
+
   
sudo apt install git golang build-essential gcc g++ gdb libboost-dev make automake autogen autoconf cscope global cmake cmake-gui astyle clang-format clang llvm lldb libsqlite3-dev sqlite3 bison flex ruby-dev linux-headers-`uname -r`
 
  
 +
=QPS:每秒查询率 QPS(Query Per Second)=
 +
<pre>QPS是对一个特定的查询服务器在规定时间内所处理流量多少的衡量标准,在因特网上,作为域名系统服务器的机器的性能经常用每秒查询率来衡量。
  
#ps
+
对应fetches/sec,即每秒的响应请求数,也即是最大吞吐能力。
apt install procps
+
计算关系:
 +
QPS = 并发量 / 平均响应时间
 +
并发量 = QPS * 平均响应时间
  
  
安装Fail2Ban
+
并发量:系统能同时处理的请求数
</pre>
 
  
[https://www.debian.cn/archives/2880 Debian 安装 fail2ban 方式SSH爆破攻击]
+
  RT:响应时间,处理一次请求所需要的平均处理时间
  
 +
计算关系:
  
[[Debian配置iptables]]
+
 QPS = 并发量 / 平均响应时间
  
=时间同步=
+
并发量 = QPS * 平均响应时间
<pre>
 
UTC时区切换到CST 时区
 
  
#用这个啦
 
# 设置亚洲时区
 
timedatectl set-timezone Asia/Shanghai
 
# 启用NTP同步 #关闭是 false
 
timedatectl set-ntp yes
 
  
  
echo "export TZ='Asia/Shanghai'"  >> /etc/profile 
 
cat /etc/profile |grep TZ 
 
source /etc/profile
 
date -R
 
date
 
Sat Aug 19 17:03:17 CST 2017
 
</pre>
 
  
=security=
+
每秒的新建链接数(CPS)
==firewalld==
 
  
详情可见 [[Centos7 firewalld防火墙基础]]
+
连接数是 最大并发连接数,
 +
包括 活跃连接数和非活跃连接数。
  
[https://computingforgeeks.com/how-to-install-and-configure-firewalld-on-debian/ How To Install and Configure Firewalld on Debian 10]
 
  
[https://ywnz.com/linuxaq/5495.html 在Debian 10(Buster)上安装和配置Firewalld]
 
  
=参考=
 
  
[https://blog.51cto.com/wzlinux/2043586 Ubuntu 新装服务器部署流程]
 
  
[https://www.howtoing.com/install-java-in-debian-and-ubuntu 如何在Debian和Ubuntu系统中安装Java 9]
+
</pre>
  
[http://www.ruanyifeng.com/blog/2014/03/server_setup.html Linux服务器的初步配置流程]
+
=see also=
  
[http://spenserj.com/blog/2013/07/15/securing-a-linux-server/ Securing a Linux Server]
 
  
[http://blog.51cto.com/feihan21/1060365 Linux服务器初始化配置脚本]
+
[https://blog.csdn.net/Dallin0408/article/details/78853884 QPS 和并发:如何衡量服务器端性能good]
  
[https://blog.imdst.com/linux-fu-wu-qi-chu-shi-hua-an-quan-jia-gu/ Linux服务器初始化调优及安全加固]
+
[https://blog.csdn.net/shipfei_csdn/article/details/103225517 性能指标:QPS、TPS、系统吞吐量理解]
  
[https://linux.cn/article-5067-1.html 如何使用 fail2ban 防御 SSH 服务器的暴力破解攻击]
+
https://blog.csdn.net/cainiao_user/article/details/77146049
  
[https://blog.csdn.net/developerinit/article/details/73065229?utm_source=blogxgwz7 Debian的一些常用命令]
+
[https://blog.csdn.net/stitch77/article/details/51691925 并发连接数、请求数、并发用户数]
  
 +
[https://blog.csdn.net/hel12he/article/details/77561718 Web开发中,什么级别才算是高并发]
  
[https://www.cnblogs.com/yoyotl/p/8151409.html Debian 8 设置时区和时间配置]
+
[[category:ops]]
[[category:ops]]  [[category:debian]]
 

2020年2月28日 (五) 07:21的版本

PV (page view)

页面浏览量。指的是:网站被用户访问的总页面数量,统计页面刷新的次数,每一次页面刷新,就算做一次PV流量。是网站优化的重要指标,体现网站的用户体验,内容价值等因素。

UV (unique visitor)独立访客

指访问某个站点或点击某条新闻的不同IP地址的人数,独立IP只记录第一次进入网站的具有独立IP的访问者,在同一天内再次访问该网站则不计数。

IP(internet protocol, 互联网协议)指网络之间的互联协议

在网站SEO中,通常被用作表示用户的数量。


每秒的新建链接数(CPS)

TPS:Transactions Per Second(每秒传输的事物处理个数)

即服务器每秒处理的事务数。TPS包括一条消息入和一条消息出,加上一次用户数据库访问。(业务TPS = CAPS × 每个呼叫平均TPS)

TPS是软件测试结果的测量单位。一个事务是指一个客户机向服务器发送请求然后服务器做出反应的过程。客户机在发送请求时开始计时,收到服务器响应后结束计时,以此来计算使用的时间和完成的事务个数。

一般的,评价系统性能均以每秒钟完成的技术交易的数量来衡量。系统整体处理能力取决于处理能力最低模块的TPS值。


QPS:每秒查询率 QPS(Query Per Second)

QPS是对一个特定的查询服务器在规定时间内所处理流量多少的衡量标准,在因特网上,作为域名系统服务器的机器的性能经常用每秒查询率来衡量。

对应fetches/sec,即每秒的响应请求数,也即是最大吞吐能力。
计算关系: 
QPS = 并发量 / 平均响应时间 
并发量 = QPS * 平均响应时间


并发量:系统能同时处理的请求数

  RT:响应时间,处理一次请求所需要的平均处理时间

计算关系:

 QPS = 并发量 / 平均响应时间

 并发量 = QPS * 平均响应时间




每秒的新建链接数(CPS)

连接数是 最大并发连接数,
包括 活跃连接数和非活跃连接数。





see also

QPS 和并发:如何衡量服务器端性能good

性能指标:QPS、TPS、系统吞吐量理解

https://blog.csdn.net/cainiao_user/article/details/77146049

并发连接数、请求数、并发用户数

Web开发中,什么级别才算是高并发