当前位置:网站首页>[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;
}
边栏推荐
- Huawei employs millions of data governance experts! The 100 billion market behind it deserves attention
- (script) one click deployment of any version of redis - the way to build a dream
- “薪资倒挂”、“毕业生平替” 这些现象说明测试行业已经...
- “薪資倒掛”、“畢業生平替” 這些現象說明測試行業已經...
- Reasons and solutions of redis cache penetration and avalanche
- Identifiers and keywords
- Ruby tutorial
- Kibana index, mapping, document operation
- Basic operations of database and table ----- delete index
- pycharm专业版下载安装教程
猜你喜欢
User login function: simple but difficult
The performance of major mainstream programming languages is PK, and the results are unexpected
Expose testing outsourcing companies. You may have heard such a voice about outsourcing
Basic concept and usage of redis
Call Huawei order service to verify the purchase token interface and return connection reset
What you learned in the eleventh week
“薪資倒掛”、“畢業生平替” 這些現象說明測試行業已經...
Complete knapsack problem (template)
Huawei employs data management experts with an annual salary of 2million! The 100 billion market behind it deserves attention
创新引领方向 华为智慧生活全场景新品齐发
随机推荐
The most complete regular practical guide of the whole network. You're welcome to take it away
Daily practice (18): stack containing min function
小程序直播 + 电商,想做新零售电商就用它吧!
潘多拉 IOT 开发板学习(RT-Thread)—— 实验4 蜂鸣器+马达实验【按键外部中断】(学习笔记)
Safety learning week4
LeetCode周赛 + AcWing周赛(T4/T3)分析对比
Getting started with Paxos
leetcode518,377
Talking about JVM 4: class loading mechanism
Basic operations of database and table ----- delete index
Multilingual Wikipedia website source code development part II
Applet live + e-commerce, if you want to be a new retail e-commerce, use it!
Arbitrum:二维费用
【微处理器】基于FPGA的微处理器VHDL开发
Summary of the function and usage of const, volatile and restrict
1189. Maximum number of "balloons"
抓包整理外篇——————状态栏[ 四]
Hologres query management and timeout processing
College degree, what about 33 year old Baoma? I still sell and test, and my monthly income is 13K+
Learning of basic amplification circuit