当前位置:网站首页>[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 stats
see 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;
}
边栏推荐
- [circuit design] optocoupler use and circuit design summary
- 【FPGA教程案例10】基于Verilog的复数乘法器设计与实现
- leetcode494,474
- Huawei employs data management experts with an annual salary of 2million! The 100 billion market behind it deserves attention
- 2022.07.03 (LC 6109 number of people who know secrets)
- 实战模拟│JWT 登录认证
- 大专学历,33岁宝妈又怎样?我照样销售转测试,月入13k+
- Operator explanation
- FEG founder rox:smartdefi will be the benchmark of the entire decentralized financial market
- const、volatile和restrict的作用和用法总结
猜你喜欢
Take you ten days to easily complete the go micro service series (IX. link tracking)
ORB(Oriented FAST and Rotated BRIEF)
大专学历,33岁宝妈又怎样?我照样销售转测试,月入13k+
Take you ten days to easily complete the go micro service series (IX. link tracking)
小程序直播 + 电商,想做新零售电商就用它吧!
Huawei employs data management experts with an annual salary of 2million! The 100 billion market behind it deserves attention
两个数相互替换
There is a new Post-00 exam king in the testing department. I really can't do it in my old age. I have
Relationship between classes and objects
[wave modeling 2] three dimensional wave modeling and wave generator modeling matlab simulation
随机推荐
There is a new Post-00 exam king in the testing department. I really can't do it in my old age. I have
lambda expressions
(script) one click deployment of any version of redis - the way to build a dream
【C】 (written examination questions) pointer and array, pointer
SAP UI5 应用开发教程之一百零七 - SAP UI5 OverflowToolbar 容器控件介绍的试读版
||Interview questions you will encounter
Kibana index, mapping, document operation
Deux nombres se remplacent
I was beaten by the interviewer because I didn't understand the sorting
npm install报错 强制安装
潘多拉 IOT 开发板学习(RT-Thread)—— 实验4 蜂鸣器+马达实验【按键外部中断】(学习笔记)
Applet live + e-commerce, if you want to be a new retail e-commerce, use it!
How to use words to describe breaking change in Spartacus UI of SAP e-commerce cloud
SAP UI5 应用开发教程之一百零六 - 如何提高 SAP UI5 应用路由 url 的可读性试读版
Mongodb series learning notes tutorial summary
创新引领方向 华为智慧生活全场景新品齐发
Huawei employs millions of data governance experts! The 100 billion market behind it deserves attention
Hand drawn video website
[selenium automation] common notes
ORB(Oriented FAST and Rotated BRIEF)