generated from just-the-docs/just-the-docs-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
101 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ parent: Spring | |
|
||
- 位于spring-context的包下面 | ||
|
||
# 2. | ||
# 2. Class | ||
|
||
## 2.1. SchedulingTaskExecutor | ||
```mermaid | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,4 +34,5 @@ parent: Test | |
|
||
# 3. 文件配置 | ||
|
||
# 4. 线程组 | ||
# 4. 线程组 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
--- | ||
layout: default | ||
title: 淘宝前台系统性能分析于优化 | ||
parent: Test | ||
--- | ||
|
||
# 优化的目的 | ||
|
||
## 服务端 | ||
|
||
- 提升QPS | ||
- 降低Server RT | ||
- 降低硬件成本 | ||
|
||
## 用户端 | ||
|
||
- 降低时延 | ||
- 提升用户体验 | ||
- 提升转化率、留存率、交易量 | ||
|
||
# 瓶颈 | ||
|
||
## cpu | ||
|
||
- 字符拼接、查找、替换 | ||
- encode decode | ||
- zip压缩 | ||
- 序列化 反序列化 | ||
- 异常捕获 | ||
|
||
## IO | ||
|
||
- 序列化 反序列化 | ||
- 网络IO | ||
- DNS缓存 | ||
- CDN加速 | ||
|
||
## memory | ||
|
||
- GC | ||
|
||
## db | ||
|
||
- 慢查询 | ||
- 脱库 | ||
|
||
# 应对方式 | ||
|
||
## cpu | ||
|
||
- 字符拼接、查找、替换 | ||
|
||
合理使用StringBuilder,不使用StringBuffer。 | ||
|
||
- encode decode | ||
|
||
可以把一些加解密的流程拆出来,作为一个高级别的应用独立维护 | ||
|
||
- zip压缩 | ||
|
||
不放在核心服务中 | ||
|
||
- 序列化 反序列化 | ||
|
||
使用性能更好的序列化工具,如uProtoBuff | ||
|
||
- 异常捕获 | ||
|
||
较少异常捕获 | ||
|
||
## IO | ||
|
||
- 网络IO | ||
|
||
可以优化IO总量,比如把字段名缩写,IdCord->id;Number->No | ||
|
||
- DNS缓存 | ||
|
||
- CDN加速 | ||
|
||
## memory | ||
|
||
- GC | ||
选择合理的GC方案,设置合适的内存大小 | ||
|
||
## db | ||
|
||
- 慢查询 | ||
|
||
索引 | ||
|
||
- 脱库 | ||
|
||
limit 限制 | ||
|
||
|