###### tags: `Linux`, `SRE`
# SRE 讀書會 Round 4 #09 - 線上讀書會共筆
## 活動資訊
* Date: [2020/08/13] (四) 20:00 - 21:30
* [導讀進度表](https://docs.google.com/spreadsheets/d/1Lgti3mILkvwxyzklX1vvLraaGD-7ePK9rkmlulfOknE/edit#gid=0)
* [導讀 Guideline](https://study-area.sre.tw/GuideLine/)
* Github: [study-area-docs](https://github.com/cross-community/study-area-docs)
---
# 現場共筆
## 27 | 案例篇:為什麼我的磁盤I/O延遲很高?
翻譯 : 日誌=log
> ``` top > c > 1```
> 按下 c, cmd 會全部跑出來。
> 跑 java process 可以看到更多訊息
---
Q1 : Log Level 的定義是 Info 看到比較多,還是 Debug 看到比較多? - Rick
A1 :
黃智嘉下午8:04
debug level 會包含 info
- Langs
- [Java ( log4j )](https://zh.wikipedia.org/wiki/Log4j)
- [C#, DotNET](https://marcus116.blogspot.com/2019/03/netcore-aspnet-core-logging-intro-part2.html)
- [Node.JS](https://stackify.com/node-js-logging/) error, warn, info, verbose, debug
- [PHP](https://medium.com/@luis.barros.nobrega/php-log-levels-and-logging-tips-e56cf21083cf)
- System:
- [Linux Kernel](https://www.oreilly.com/library/view/linux-kernel-in/0596100795/re06.html)
- [Linux](https://www.thegeekdiary.com/centos-rhel-67-how-to-increase-system-log-message-verbosity-rsyslogd/)
* 每一個開發人員出身的資訊背景(e.g. ``Java (log4j) ; C#, DotNET ; Linux``),會對Info,Log的定義不一樣,溝通時要提問者與回答者資訊同步程度。
[ref : 溝通與表達的差異](https://rickhw.github.io/2020/08/01/Management/Expression-and-Communication/?fbclid=IwAR3dvzspffhUHC2pKtrQttZN3RioI0-DdXLYeVnEjkVqvInshmldcFAsumM)
---
Q2 : 有人會用ubuntu當production嗎
A2 :
> 我會用上一版的LTS 不會用最新版而已
> [name=Yen YungFu]
>
---
## 28 | 案例篇:一個SQL查詢要15秒,這是怎麼回事?
Q1 : 公司沒有DBA的情況,哪位角色應該解決SQL很慢的問題(RD,SRE,SP)?
A1 : DBA優先,SRE第二,RD第三(要資深有5.6年經驗),不建議推坑資淺人員。
Q2 : 要不要用myisam
A2 : 不需要ACID 跟資料可以掉的話 還是可以用
## 29 | 案例篇:Redis響應嚴重延遲,如何解決?

```
# 設定的格式為 save <seconds> <changes>,意思是當過 X 秒後且有 Y 個鍵值改變即備份資料。
# Default Setting
save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error yes
```
[https://tachingchen.com/tw/blog/redis-data-persistence/](https://tachingchen.com/tw/blog/redis-data-persistence/)
---
# 參考資料