HackMD
  • New!
    New!  “Bookmark” and save your note
    Find a note that's worth keeping or want reading it later? “Bookmark” it to your personal reading list.
    Got it
    • New!  “Bookmark” and save your note
      New!  “Bookmark” and save your note
      Find a note that's worth keeping or want reading it later? “Bookmark” it to your personal reading list.
      Got it
      • Options
      • Versions and GitHub Sync
      • Transfer ownership
      • Delete this note
      • Template
      • Insert from template
      • Export
      • Dropbox
      • Google Drive
      • Gist
      • Import
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
      • Download
      • Markdown
      • HTML
      • Raw HTML
      • ODF (Beta)
      • Sharing Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • More (Comment, Invitee)
      • Publishing
        Everyone on the web can find and read all notes of this public team.
        After the note is published, everyone on the web can find and read this note.
        See all published notes on profile page.
      • Commenting Enable
        Disabled Forbidden Owners Signed-in users Everyone
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Invitee
      • No invitee
    Menu Sharing Help
    Menu
    Options
    Versions and GitHub Sync Transfer ownership Delete this note
    Export
    Dropbox Google Drive Gist
    Import
    Dropbox Google Drive Gist Clipboard
    Download
    Markdown HTML Raw HTML ODF (Beta)
    Back
    Sharing
    Sharing Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    Note Permission
    Read
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    Write
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    More (Comment, Invitee)
    Publishing
    Everyone on the web can find and read all notes of this public team.
    After the note is published, everyone on the web can find and read this note.
    See all published notes on profile page.
    More (Comment, Invitee)
    Commenting Enable
    Disabled Forbidden Owners Signed-in users Everyone
    Permission
    Owners
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Invitee
    No invitee
       owned this note    owned this note      
    Published Linked with
    Like BookmarkBookmarked
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    ###### tags: `Linux`, `SRE` # SRE 讀書會 Round 4 #17 - 線上讀書會共筆 ## 活動資訊 * Date: [2020/12/10] (四) 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) --- # 現場共筆 ## 52 | 案例篇:服務吞吐量下降很厲害,怎麼分析? - 義格 worker_cpu_affinity * [Tuning NGINX for Performance](https://www.nginx.com/blog/tuning-nginx/) ## 53 | 套路篇:系統監控的綜合思路 - FreddyFan - 監控數據: 定義SLO,SLI,SLA,需要去定義相關內容 - Java vs PHP: cpu使用率會不同 * 可視覺化: * 公司組織架構有差: 例如有監控team,但是ap系統有自己的監控指標,所以不被導入,無法統一監管 - 可參考: 網站可靠性工程工作手冊。 - 本章節為系統層的監控。 - [监控RED方法](https://www.jianshu.com/p/20f3428535e3) ## 54 | 套路篇:應用監控的一般思路 - 義格 - 1. 指標: 請求率,錯誤率,回應時間 - 2. 日誌: 分析當下服務狀態,分級,分類 - 3. 服務之間互動狀況: 依APM進行使用 java melody可以看 Q1 : 系統監控與應用監控有什麼差別? A1 : 不同組織與不同知識背景會有不同看法 ## 55 | 套路篇:分析性能問題的一般步驟 - Jeri Chen - 應用程序的監控 - 指標監控: - 主要是對一定時間段內的性能指標進行測量,然後再通過時間序列的方式,進行處理、存儲和告警。 - 日誌監控: - 則可以提供更詳細的上下文信息,通常通過ELK 技術棧,來進行收集、索引和圖形化展示。 系統資源瓶頸: (是最為常見的性能問題) *可以通過USE法,即使用率、飽和度以及錯誤數這三類指標來衡量 - 硬件資源: - CPU、內存、磁盤和文件系統以及網絡等 - 軟件資源: - 文件描述符數、連接跟踪數、套接字緩衝區大小等 * 四大模塊核心 - cpu - top、vmstat、pidstat、strace 以及perf 等 tools - memery - free、vmstat 等 tools - disk,file system - iostat - network 應用程序瓶頸: - 資源瓶頸 - CPU、內存、磁盤和文件系統I/O、網絡以及內核資源等各類軟硬件資源出現了瓶頸,從g.4而導致應用程序的運行受限。 - 依賴服務瓶頸 - 直接或者間接調用的服務出現了性能問題,從而導致應用程序的響應變慢,或者錯誤率升高。 - 應用程式瓶頸 - 多線程處理不當、死鎖、業務算法的複雜度過高等等。 * ACQUIA(專門給Drupal使用): https://www.acquia.com/ > 55 | 套路篇:分析性能問題的一般步驟- Jeri Chen > 講者有提到監控畫面(ACQUIA)為公司內部,要記得剪掉相關內容。 ## 56 | 套路篇:優化性能問題的一般方法 - John * 網路慢的成本比硬碟高 * 陌生系統先看依賴性,是否有需要? - 不需要依賴K8s,不依賴雲端,盡量一台PC可以起來 * open soucre fork是否有需要回饋社群: - 要注意在公司的創作著作權應該屬於公司,貢獻回去會有法律問題 * 重造輪子 v.s. 使用工具: * 優點: 可以練功,未必要在自己的prod使用 * sre角色: 大多為使用方,所以會認為不用重造輪子 - 討論此問題,不同出發點觀察此問題 --- # 參考資料 * [社群FB活動貼文 : Round 4 #17](https://www.facebook.com/groups/sre.taiwan/permalink/1891804660985429/)

    Import from clipboard

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lost their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template is not available.
    All
    • All
    • Team
    No template found.

    Create a template

    Delete template

    Do you really want to delete this template?

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in via Google

    New to HackMD? Sign up

    Help

    Documents

    Tutorials
    YAML Metadata
    Slide Example
    Book Example

    Contacts

    Talk to us
    Report an issue
    Send us email

    Cheatsheet

    Example Syntax
    Header # Header
    • Unordered List
    - Unordered List
    1. Ordered List
    1. Ordered List
    • Todo List
    - [ ] Todo List
    Blockquote
    > Blockquote
    Bold font **Bold font**
    Italics font *Italics font*
    Strikethrough ~~Strikethrough~~
    19th 19^th^
    H2O H~2~O
    Inserted text ++Inserted text++
    Marked text ==Marked text==
    Link [link text](https:// "title")
    Image ![image alt](https:// "title")
    Code `Code`
    var i = 0;
    ```javascript
    var i = 0;
    ```
    :smile: :smile:
    Externals {%youtube youtube_id %}
    LaTeX $L^aT_eX$

    This is a alert area.

    :::info
    This is a alert area.
    :::

    Versions

    Versions and GitHub Sync

    Sign in to link this note to GitHub Learn more
    This note is not linked with GitHub Learn more
     
    Add badge Pull Push GitHub Link Settings

    Version named by    

    More Less
    • Edit
    • Delete

    Note content is identical to the latest version.
    Compare with
      Choose a version
      No search result
      Version not found

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub

        Please sign in to GitHub and install the HackMD app on your GitHub repo. Learn more

         Sign in to GitHub

        HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully