当前位置:网站首页>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}
 

 

原网站

版权声明
本文为[vip_ by]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202131259587461.html