当前位置:网站首页>Summary of performance knowledge points
Summary of performance knowledge points
2022-07-06 18:38:00 【vip_ by】
One 、 Performance test basis 【 On 】
1、 Four application areas of performance testing
Capability verification : Pass the test , Prove the capability of the system to the delivery party ;
Bottleneck analysis : In the process of verifying ability , Find the performance problems of the system , Analyze and locate the problem
performance tuning : Optimize the problems found , Achieve the ability
Capacity planning : Test the scenario of possible sharp increase in business volume in the future , Plan ahead
2、 How to investigate performance test requirements
Familiar with the business process of the project 、 Clarify the hardware configuration information 、 How threads are handled 、 Number of concurrent users 、 Clear expectations
3、 What are the common performance test scenarios ?
The benchmark : Press to measure a reference value , Compare with later tuning
Concurrent test : Simulate a large number of users , Request at the same time
The load test : Keep exerting pressure , Find the performance bottleneck
Stability test : Choose the pressure on the bottleneck 80% Do stability pressure test , Run for a while , Check whether the system has memory overflow
4、 What needs to be checked for performance test admittance ?
Configuration check : The server 、 middleware 、 Database and other configuration information
Resource check : Whether the resources meet the performance test
Version checking : Formal environment and test environment server 、 middleware 、 Whether the versions of the database are consistent
Two 、 Performance test basis 【 Next 】
1、 What are the common application layer performance indicators ?
VU: Number of concurrent users
RPS: Requests per second
TPS:throughput: The number of requests that completed the response per second
HPS:hit persecond Browser level requests per second
QPS:query persecond The number of queries sent requests to the server per second
RT:response time response time
error: Error rate
2、TPS and RPS What's the connection ?
RPS It is the entrance of performance ,tps It is the exit of performance ,rps Is the requested capability index ,tps It is an indicator of the ability to handle requests .
Through constant adjustment RPS To test the biggest TPS; Before the bottleneck ,RPS increase ,TPS Also increases ; After bottleneck ,RPS increase ,TPS Unchanged or even decreased
3、 What are the common types of performance tests ?
The benchmark 、 Concurrent test 、 The load test 、 Pressure test
4、 How to judge TPS Inflection point ?
When RPS When it continues to increase ,TPS Unchanged or even decreased , Response time is getting longer , namely tps Inflection point
3、 ... and 、 The deployment environment 【 On 】( Refer to the picture )
1、ubuntu What if the installation speed is slow ?
Change to domestic mirror source
2、ubuntu Modify static ip
First step 、 Get the network card name first , Input ifconfig
The second step : Modify the network card configuration file sudo vim
/etc/network/interfaces
The third step : modify DNS To configure
Fourth parts : Restart network service
3、 If you need to use xshell Connect to server , It needs to be installed in advance ssh, And release the port as 22 The firewall of
4、ubuntu To configure jdk Environment variables are divided into the following steps :
First step :vim/etc/profile
The second step :export JAVA_HOME=/home/zhufc/jdk1.8.0_241export
CLASSPATH=..${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
The third step :source/etc/profile
5、tomcat Thread pool in tomcat Install under directory conf In the catalog server.xml File directory configuration
6、tomcat Of jvm stay tomcat Of bin Next catalina.sh Directory configuration


Four 、 The deployment environment 【 Next 】
One 、 Briefly docker The three-tier concept of
1. Mirror image image:
It is the running template of an environment , The image can instantiate the running system
2. Containers Container:
The instantiation of image , Every container is a minimalist linux System , Each container is isolated from the outside , But keep an interactive window ( Port mapping ),
External services access containers through mapping ports , As long as there's enough memory , A mirror image can theoretically be instantiated n Multiple containers , Containers can be repackaged into new images
3. Warehouse Repository:
Space for storing images , You can download the image to the local , You can upload the image to the remote warehouse
ps: Warehouse - Mirror image - Containers
Warehouse Download Image - Image generation container - The container is packaged as a mirror - Upload the image to the warehouse
Containers are isolated linux System
Images can generate countless containers
The containers are isolated from each other , Use ports to connect with each other
Two 、ubuntu How to install docker?
apt-get install docker.io
3、 ... and 、docker How to pull the image file ?
docker pull ${ Mirror address }
Four 、 How to instantiate a container for an image file ?
docker run -d -p { Port mapping }:{ Default port } Image name :tag label
example :docker run -d -p 4406:3306 registry.cn-hangzhou.aliyuncs.com/zhufc/mysql:v2
5、 ... and 、 How to enter the container for application deployment ?
1.docker ps View the container that has been started
2.docker exec -it {CONTAINER ID} bash Into the container
6、 ... and 、 What is the function of container mapping port ?
There is no need to expose the internal real address on the public network , Thus concealing the internal network address , Reduce security risks .
Some specific ports can be prevented from being occupied by conversion , Easy to remember
7、 ... and 、docker How to view logs ?
docker logs -f -t --tail 100 { Container name }
-f : Trace log output
-t : Display time stamp
--tail : List only the latest N Container log
8、 ... and 、 Deploy one according to the following image tomcat Application container
docker pull registry.cn-hangzhou.aliyuncs.com/zhufc/xiaoyaoji:web
docker run -d -p 8081:8080 registry.cn-hangzhou.aliyuncs.com/zhufc/xiaoyaoji:web Map port number 8081
docker pull registry.cn-hangzhou.aliyuncs.com/zhufc/mysql5:v1
docker run -d -p 4406:3306 registry.cn-hangzhou.aliyuncs.com/zhufc/mysql5:v1 8081
tomcat And mysql relation :
1、 Get into tomcat
2、 Switch to /usr/local/tomcat/apache-tomcat-7.0.78/webapps/api/WEB-INF/classes
3、 edit config.properties file ---vim config.properties
4、 modify jdbc.url
5、 modify jdbc.username
6、 modify jdbc.password
7、 Restart after saving tomcat ----docker restart ${CONTAINER ID}
边栏推荐
- Test 1234
- None of the strongest kings in the monitoring industry!
- 简单易用的PDF转SVG程序
- 2022 Summer Project Training (I)
- SQL injection Foundation
- [Sun Yat sen University] information sharing of postgraduate entrance examination and re examination
- Collection of penetration test information -- use with nmap and other tools
- Maixll dock camera usage
- bonecp使用数据源
- D binding function
猜你喜欢

從交互模型中蒸餾知識!中科大&美團提出VIRT,兼具雙塔模型的效率和交互模型的性能,在文本匹配上實現性能和效率的平衡!...

Splay

Windows connects redis installed on Linux

CSRF vulnerability analysis

从交互模型中蒸馏知识!中科大&美团提出VIRT,兼具双塔模型的效率和交互模型的性能,在文本匹配上实现性能和效率的平衡!...

Grafana 9.0 is officially released! It's the strongest!

Ms-tct: INRIA & SBU proposed a multi-scale time transformer for motion detection. The effect is SOTA! Open source! (CVPR2022)...

2022-2024年CIFAR Azrieli全球学者名单公布,18位青年学者加入6个研究项目

10、 Process management

287. 寻找重复数
随机推荐
STM32+HC05串口蓝牙设计简易的蓝牙音箱
Cocos2d Lua smaller and smaller sample memory game
Use cpolar to build a business website (1)
Interpreting cloud native technology
2022 Summer Project Training (I)
C#/VB.NET 给PDF文档添加文本/图像水印
Example of implementing web server with stm32+enc28j60+uip protocol stack
SQL优化问题的简述
C language exchanges two numbers through pointers
echart简单组件封装
[sword finger offer] 60 Points of N dice
Afnetworking framework_ Upload file or image server
Cobra 快速入门 - 专为命令行程序而生
2022-2024年CIFAR Azrieli全球学者名单公布,18位青年学者加入6个研究项目
Comparative examples of C language pointers *p++, * (p++), * ++p, * (++p), (*p) + +, +(*p)
UDP协议:因性善而简单,难免碰到“城会玩”
Penetration test information collection - CDN bypass
Coco2017 dataset usage (brief introduction)
简单易用的PDF转SVG程序
徐翔妻子应莹回应“股评”:自己写的!