当前位置:网站首页>[development of large e-commerce projects] performance pressure test - Optimization - impact of middleware on performance -40
[development of large e-commerce projects] performance pressure test - Optimization - impact of middleware on performance -40
2022-07-05 01:01:00 【Random stone light】
One : test nginx Impact on performance
1. open jmeter To test

- Change the number of threads to 50, And tick forever , Keep it testing , Unless it's stopped manually
2. to nginx Send a request
For the server 80 Port send request , And add the following summary figure 
- Use
docker statssee docker Container usage
Conclusion :nginx It needs to be forwarded frequently to other services , Therefore, it consumes many threads , Small memory ,cpu Large space
Two : Monitoring indicators
1、 Middleware metrics

- The number of threads currently running cannot exceed the set maximum . In general, when the system performance is good , Line Minimum number of passes setting 50 And maximum settings 200 More appropriate .
- Currently running JDBC The number of connections cannot exceed the set maximum . In general, when the system performance is good , JDBC Minimum setting 50 And maximum settings 200 More appropriate .
- GC Frequency cannot be frequent , especially FULL GC More often , In general, when the system performance is good , JVM The minimum heap size and the maximum heap size are set respectively 1024M More appropriate .
2、 Database metrics

- SQL The less time it takes, the better , In general, microsecond level .
- The higher the hit rate, the better , In general, it can't be lower than 95%.
- The lower the number of lock waits, the better , The shorter the waiting time, the better .
3、 The joint test


- The more middleware , The greater the performance loss , Most of it is lost in network interaction ;
- Business :
Db(MySQL Optimize )
The rendering speed of the template ( cache )
Static resources
3、 ... and : Optimize throughput
1.nginx To achieve dynamic and static separation
1) In the future, all static resources will be placed in nginx Inside
2) The rules :/static/*** All requests are made by nginx Go straight back to
3) Moving static resources ( Transfer static resources directly to the server )
- Enter into HTML Under the path
cd /mydata/nginx/html - stay HTML Under the new static
mkdir static - Enter into static Folder , And will product Static resources for index Copy in ( Delete the static resources of this project )
- stay img,src,herf Add to label /static/ route

2. Modify the server nginx Configuration of
1) Enter into cd /mydata/nginx/conf/conf.d Under the path
2) modify gulimail.conf file vi gulimail.conf
location /static/ {
root /usr/share/nginx/html;
}
边栏推荐
- ||Interview questions you will encounter
- Insert sort of sort
- [error reporting] "typeerror: cannot read properties of undefined (reading 'split')“
- 【FPGA教程案例10】基于Verilog的复数乘法器设计与实现
- Complete knapsack problem (template)
- 【C】 (written examination questions) pointer and array, pointer
- [FPGA tutorial case 9] design and implementation of clock manager based on vivado core
- Identifiers and keywords
- TS quick start - functions
- skimage: imread & imsave & imshow
猜你喜欢

FEG founder rox:smartdefi will be the benchmark of the entire decentralized financial market

ORB(Oriented FAST and Rotated BRIEF)

Insert sort of sort

107. SAP UI5 OverflowToolbar 容器控件以及 resize 事件处理的一些细节介绍

Single step debugging of master data reading of SAP commerce cloud products

多模输入事件分发机制详解

What you learned in the eleventh week

Call Huawei order service to verify the purchase token interface and return connection reset

The performance of major mainstream programming languages is PK, and the results are unexpected

【大型电商项目开发】性能压测-优化-中间件对性能的影响-40
随机推荐
MySQL uses the explain tool to view the execution plan
[microprocessor] VHDL development of microprocessor based on FPGA
Insert sort of sort
I was beaten by the interviewer because I didn't understand the sorting
2022.07.03 (LC 6109 number of people who know secrets)
潘多拉 IOT 开发板学习(RT-Thread)—— 实验4 蜂鸣器+马达实验【按键外部中断】(学习笔记)
dotnet-exec 0.6.0 released
Basic operation of database and table ----- the concept of index
GDB common commands
Several simplified forms of lambda expression
Talking about JVM 4: class loading mechanism
Paxos 入门
Detailed explanation of multi-mode input event distribution mechanism
6. Scala operator
Getting started with Paxos
SAP UI5 应用开发教程之一百零六 - 如何提高 SAP UI5 应用路由 url 的可读性试读版
Implementation steps of master detail detail layout mode of SAP ui5 application
const、volatile和restrict的作用和用法总结
[FPGA tutorial case 9] design and implementation of clock manager based on vivado core
BGP comprehensive experiment