当前位置:网站首页>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}
边栏推荐
- 使用cpolar建立一个商业网站(1)
- 2022 Summer Project Training (II)
- Self supervised heterogeneous graph neural network with CO comparative learning
- 十、进程管理
- Wchars, coding, standards and portability - wchars, encodings, standards and portability
- C语言高校实验室预约登记系统
- Celery best practices
- Blue Bridge Cup real question: one question with clear code, master three codes
- 使用block实现两个页面之间的传统价值观
- 随着MapReduce job实现去加重,多种输出文件夹
猜你喜欢
[the 300th weekly match of leetcode]
Distiller les connaissances du modèle interactif! L'Université de technologie de Chine & meituan propose Virt, qui a à la fois l'efficacité du modèle à deux tours et la performance du modèle interacti
【LeetCode第 300 场周赛】
2022-2024年CIFAR Azrieli全球学者名单公布,18位青年学者加入6个研究项目
UDP协议:因性善而简单,难免碰到“城会玩”
Xu Xiang's wife Ying Ying responded to the "stock review": she wrote it!
Hongke shares | plate by plate ar application in Beijing Winter Olympics
十、进程管理
Ms-tct: INRIA & SBU proposed a multi-scale time transformer for motion detection. The effect is SOTA! Open source! (CVPR2022)...
C language exchanges two numbers through pointers
随机推荐
Cobra 快速入门 - 专为命令行程序而生
Top command details
使用cpolar建立一个商业网站(1)
SQL injection - access injection, access offset injection
Penetration test information collection - CDN bypass
Collection of penetration test information -- use with nmap and other tools
Excel usage record
Stm32+hc05 serial port Bluetooth design simple Bluetooth speaker
Maixll dock camera usage
Huawei 0 foundation - image sorting
CSRF vulnerability analysis
图之广度优先遍历
TOP命令详解
Docker安装Redis
2022-2024年CIFAR Azrieli全球学者名单公布,18位青年学者加入6个研究项目
Cocos2d Lua 越来越小样本 内存游戏
首先看K一个难看的数字
UDP protocol: simple because of good nature, it is inevitable to encounter "city can play"
测试123
Jerry is the custom background specified by the currently used dial enable [chapter]