---
# System prepended metadata

title: 馬偕選課優化效能

---

## 馬偕選課網站優化
### 處理項目
1. 使用jmeter錄製選課腳本
3. 壓測採用併發線程模擬實際選課狀況
4. 藉由測試結果調整(SQL語法、主機配置)
5. 測試結果 

### 使用jmeter進行選課系統壓力測試
![image](https://lh3.googleusercontent.com/u/0/drive-viewer/AK7aPaB2PYBj3UkW-dvjBZaTbhunbNf0vJisVm3mXvtT8tBmDyStwd37OFnEgVNL2mfplgCcyWyHzJPbJ9YZJ732DDFDw5MunQ=w1920-h955)

---
### 2023-11-15測試
### DB測試期間CPU狀態
![image](https://lh3.googleusercontent.com/u/0/drive-viewer/AK7aPaD-c3zvfnC2wCELVXIW13Sxl4KONTQDktT03MxGNffAaEp0b6n-Awe82OXuYcZbBpVEzsiOug78NEFj0XDJE3siC3TWmw=w1920-h955)

### WEB測試期間CPU狀態
![image](https://lh3.googleusercontent.com/u/0/drive-viewer/AK7aPaAJaTrMRRTyeU7tEkjfLsKahNT5vGMimTP5U_Q-Hcf6poks-WAILiWqbHtRvYf5NQIBADBoQq27z_81sIDgLSjenW-h7Q=w1920-h954)


---
### 2023-11-16測試 >> 學校已更改CPU設定
#### DB測試期間CPU狀態
![image](https://lh3.googleusercontent.com/u/0/drive-viewer/AK7aPaDPqXjsj34MH6wdN1pZyPM_2MIbtj6_Lt76oqkwAKk2vLGL-tJgccTf081GM1ACXCUUcHXnABzONQ0IROrvKU6obp6XqQ=w1920-h955)
#### WEB測試期間CPU狀態
![image](https://lh3.googleusercontent.com/u/0/drive-viewer/AK7aPaBm3ZrEEH-Y18TWr14xcOCrQp34qfWk9TiZAp-1F14Z0Z3TzBHuFd5q9OYRMJWEwSdHBGQ2yxOwd_nknt9zoOciU29f=w1920-h955)


---
## 壓力測試資料
| | | | | | | | | | | | | | | |
|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|
|設定|測試日期|說明|取樣數|錯誤率%|處理量/sec|平均值(毫秒)|中間值(毫秒)|90% Line(毫秒)|95% Line(毫秒)|99% Line(毫秒)|最小值(毫秒)|最大值(毫秒)|每秒仟位元組|Sent KB/sec|
|120秒內500線程|2023/11/15|修正前|757|0.00%|4.90838|80117|93454|122887|125844|129860|375|133892|2.63|1.99|
|120秒內500線程|2023/11/16|調整後|2105|0.05%|16.90003|23607|25512|34742|37167|40273|282|43881|8.33|7.25|
|120秒內1000線程|2023/11/15|修正前|3107|70.07%|14.90096|45315|9643|144774|165892|183310|151|189154|35.66|1.74|
|120秒內1000線程|2023/11/16|調整後|5183|56.03%|37.43725|20681|9602|41300|43785|48523|311|59276|74.43|6.86|
|120秒內1500線程|2023/11/15|修正前|6554|84.97%|28.12043|31714|9635|121268|148087|204321|348|216772|78.24|1.64|
|120秒內1500線程|2023/11/16|調整後|9815|75.63%|71.34083|15629|9597|37106|41325|47635|283|56562|178.92|7.1|



---
## 負載測試資料
| | | | | | | | | | | | | | |
|-|-|-|-|-|-|-|-|-|-|-|-|-|-|
|設定|測試日期|說明|錯誤率%|處理量/sec|平均值(毫秒)|中間值(毫秒)|90% Line(毫秒)|95% Line(毫秒)|99% Line(毫秒)|最小值(毫秒)|最大值(毫秒)|每秒仟位元組|Sent KB/sec|
|60秒內100請求|2023/11/15|修正前|0.00%|74.22374|1071|464|2915|4579|5977|70|7871|124.63|60.71|
|60秒內100請求|2023/11/16|調整後|0.00%|90.93665|824|539|1713|2206|2568|87|9751|152.97|74.37|
|60秒內100請求|2023/11/16(分流)|調整後|0.00%|105.99266|574|76|2587|2913|4240|17|6908|154.21|91.22|
|60秒內150請求|2023/11/15|修正前|0.00%|47.58799|2653|850|7761|10508|22815|46|27533|79.97|38.92|
|60秒內150請求|2023/11/16|調整後|0.00%|75.42321|1434|858|2949|3608|8519|43|22591|126.6|61.69|
|60秒內150請求|2023/11/16(分流)|調整後|0.00%|99.71874|852|94|3396|4460|4992|16|10213|140.35|85.82|
|60秒內200請求|2023/11/15|修正前|0.00%|51.22295|3188|487|13678|17299|23980|35|34341|86.06|41.89|
|60秒內200請求|2023/11/16|調整後|0.00%|75.64932|2019|1206|4087|4766|8593|56|38832|127.11|61.87|
|60秒內200請求|2023/11/16(分流)|調整後|0.00%|157.56621|887|121|4138|5712|6501|17|8222|230.34|135.61|
|60秒內300請求|2023/11/15|修正前|0.00%|41.84386|5846|915|24046|38830|50804|30|66533|59.87|33.16|
|60秒內300請求|2023/11/16|調整後|0.00%|43.74595|3577|2093|7913|9951|14254|28|101860|73.51|35.78|
|60秒內300請求|2023/11/16(分流)|調整後|0.00%|112.16889|1736|110|8191|9563|13900|16|17102|161.41|96.54|
|60秒內800請求|2023/11/15|修正前|13.53%|33.84524|15761|4015|59579|92221|104438|34|113456|59.06|22.96|
|60秒內800請求|2023/11/16|調整後|1.39%|37.83733|8806|4209|14219|19707|111439|80|269296|63.18|30.43|
|60秒內800請求|2023/11/16(分流)|調整後|0.00%|167.58786|2575|187|11222|15516|18854|16|37558|236.7|144.23|
|60秒內1000請求|2023/11/15|修正前|30.22%|47.40724|13714|8978|56753|75209|88012|38|97638|95.4|25.93|
|60秒內1000請求|2023/11/16|調整後|22.64%|71.73568|7456|4540|9650|13701|58867|26|110031|130.48|44|
|60秒內1000請求|2023/11/16(分流)|調整後|0.00%|178.6205|2829|182|10479|15710|32706|16|39655|253.48|153.73|


