当前位置:网站首页>[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;
}
边栏推荐
- 整理混乱的头文件,我用include what you use
- Ruby tutorial
- 【C】 (written examination questions) pointer and array, pointer
- The most complete regular practical guide of the whole network. You're welcome to take it away
- Hand drawn video website
- [wave modeling 2] three dimensional wave modeling and wave generator modeling matlab simulation
- 创新引领方向 华为智慧生活全场景新品齐发
- Senior Test / development programmers write no bugs? Qualifications (shackles) don't be afraid of mistakes
- ROS command line tool
- 2022.07.03(LC_6108_解密消息)
猜你喜欢

Get to know ROS for the first time

Distributed base theory

“薪资倒挂”、“毕业生平替” 这些现象说明测试行业已经...

dotnet-exec 0.6.0 released

分布式BASE理论

【大型电商项目开发】性能压测-优化-中间件对性能的影响-40

Single step debugging of master data reading of SAP commerce cloud products
![[STM32] (I) overview and GPIO introduction](/img/6e/421238a892b557721e85c919a4eeb1.jpg)
[STM32] (I) overview and GPIO introduction

创新引领方向 华为智慧生活全场景新品齐发

Huawei employs millions of data governance experts! The 100 billion market behind it deserves attention
随机推荐
Kibana index, mapping, document operation
1189. Maximum number of "balloons"
skimage: imread & imsave & imshow
LeetCode周赛 + AcWing周赛(T4/T3)分析对比
Which financial products with stable income are good
NPM install error forced installation
SAP ui5 application development tutorial 107 - trial version of SAP ui5 overflow toolbar container control introduction
[microprocessor] VHDL development of microprocessor based on FPGA
资深测试/开发程序员写下无bug?资历(枷锁)不要惧怕错误......
Liangzai's first program life and annual summary in 2022
Digital DP template
Research Report on the overall scale, major producers, major regions, products and application segmentation of agricultural automatic steering system in the global market in 2022
抓包整理外篇——————状态栏[ 四]
[STM32] (I) overview and GPIO introduction
那些一门心思研究自动化测试的人,最后都怎样了?
Huawei employs data management experts with an annual salary of 2million! The 100 billion market behind it deserves attention
全栈开发提效神器——ApiFox(Postman + Swagger + Mock + JMeter)
[wave modeling 1] theoretical analysis and MATLAB simulation of wave modeling
Single step debugging of master data reading of SAP commerce cloud products
【海浪建模3】三维随机真实海浪建模以及海浪发电机建模matlab仿真