1. 程式人生 > >MEMORY TUNING: KEY PERFORMANCE INDICATORS

MEMORY TUNING: KEY PERFORMANCE INDICATORS

在這裡插入圖片描述

When you are tuning the application’s memory & Garbage Collection settings, you should take well-informed decisions based on the key performance indicators. But there are overwhelming amount of metrics reported; which one to choose and which one to leave? This article intends to explain the right KPIs and right tools to source them.

What are the right KPIs?

  1. Throughput
  2. Latency
  3. Footprint

Throughput

Throughput is the amount of productive work done by your application in a given time period. This brings the question what is productive work? what is non-productive work?

Productive Work: This is basically the amount of time your application spends in processing your customer’s transactions.

Non-Productive Work: This is basically the amount of time your application spend in house-keeping work, primarily Garbage collection.

Let’s say your application runs for 60 minutes. In this 60 minutes let’s say 2 minutes is spent on GC activities.

It means application has spent 3.33% on GC activities (i.e. 2 / 60 * 100)

It means application throughput is 96.67% (i.e. 100 – 3.33).

Now the question is: What is the acceptable throughput %? It depends on the application and business demands. Typically one should target for more than 95% throughput.

Latency

This is the amount of time taken by one single Garbage collection event to run. This indicator should be studied from 3 fronts.

  1. Average GC time: What is the average amount of time spent on GC?
  2. Maximum GC time: What is the maximum amount of time spent on a single GC event? Your application may have service level agreements such as “no transaction can run beyond 10 seconds”. In such cases, your maximum GC pause time can’t be running for 10 seconds. Because during GC pauses, entire JVM freezes – no customer transactions will be processed. So it’s important to understand the maximum GC pause time.
  3. GC Time Distribution: You should also understand how many GC events are completing with in what time range (i.e. within 0 – 1 second, 200 GC events are completed, between 1 – 2 second 10 GC events are completed …)

Footprint

Footprint is basically the amount CPU consumed. Based on your GC algorithm, based on your memory settings, CPU consumption will vary. Some GC algorithms will consume more CPU (like Parallel, CMS), whereas other algorithms such as Serial will consume less CPU.

According to memory tuning Gurus, you can pick only 2 of them at a time.

  • If you want good throughput and latency, then footprint will degrade.
  • If you want good throughput and footprint, then latency will degrade.
  • If you want good latency and footprint, then throughput will degrade.

Right Tools

Throughput and Latency can be obtained from analyzing Garbage collection Logs. Upload your application’s Garbage Collection log file in http://gceasy.io/ tool. This tool can parse Garbage Collection logs and generates Throughput and Latency indicators for you. Below is the screen shot from the http://gceasy.io/ tool showing the throughput and latency:
在這裡插入圖片描述

             Fig: KPI section from GCEasy.io report

Footprint (i.e. CPU consumption) can be obtained from the monitoring tools – Nagios, NewRelic, AppDynamics,…

其它

想一下:三元悖論、CAP、GC: KEY PERFORMANCE INDICATORS 是不是否很像?

  • 三元悖論
    三元悖論(Mundellian Trilemma),也稱三難選擇(The Impossible Trinity),它是由美國經濟學家保羅·克魯格曼(一說蒙代爾)就開放經濟下的政策選擇問題所提出的,其含義是:在開放經濟條件下,本國貨幣政策的獨立性(Monetary policy),固定匯率(Exchange rate),資本的自由進出(Capital mobility)不能同時實現,最多隻能同時滿足兩個目標,而放棄另外一個目標來實現調控的目的。
    在這裡插入圖片描述
  • CAP原則又稱CAP定理,指的是在一個分散式系統中,Consistency(一致性)、 Availability(可用性)、Partition tolerance(分割槽容錯性),三者不可兼得
  • GC: KEY PERFORMANCE INDICATORS

個人微信公眾號:
這裡寫圖片描述

相關推薦

MEMORY TUNING: KEY PERFORMANCE INDICATORS

When you are tuning the application’s memory & Garbage Collection settings, you should take well-informed decisions based on t

16 Key Experience Indicators: Your UX needle

Key Experience Indicators (KEIs) provide a quantitative score of a specific, important, and actionable phenomenon related to using a product or service.Mea

Microsoft.SQL.Server2012.Performance.Tuning.Cookbook學習筆記(一)

str perm phi prev pid brush -c rpc enabled 一、Creating a trace or workload 註意點: In the Trace Properties dialog box, there is a checkbox op

Network subsystem Of Linux Performance and Tuning Guidelines

network subsystem linux網絡子系統本文出自 “庭前夜末空看雪” 博客,請務必保留此出處http://12550795.blog.51cto.com/12540795/1946086Network subsystem Of Linux Performance and Tuning Guid

Spark Performance Tuning (性能調優)

() man inter ber index data- key 兩種 跟蹤 在集群上的 Spark Streaming application 中獲得最佳性能需要一些調整.本節介紹了可調整的多個 parameters (參數)和 configurations (配置)提高

Performance Tuning

mysql- www. mar nosql tutorials chm tab cas -c MySQL Related Performance Tuning. https://www.askapache.com/mysql/mysql-performance-tunin

GlusterFS PERFORMANCE TUNING

眾所周知,glusterfs對小檔案而言,就是個雞肋,特別是在一個目錄下有過W的小檔案圖片時,ls簡單就是個坑,下面我對線上的glusterfs引數做一些優化調整,調整的命令: gluster volume set VOLNAME OPTION PARAMETER 引數如下: cluster.data-

微信小程式:warning:Now you can provide attr "wx:key" for a "wx:for" to improve performance.

今天樓主在學習微信小程式開發的時候,在使用wx:for這個標籤遍歷陣列的時候發現了這個警告(不消除警告也可以正常執行,但是看著不爽),經過網上的查詢得到了解決辦法,現在分享給大家: 官方解釋:   wx:key 如果列表中專案的位置會動態改變或者有新的專案新增到列表中,

【跟我學oracle18c】第四十九天:Database 2 Day + Performance Tuning Guide: 2.1使用自動工作負載儲存庫收集資料庫統計資訊(AWR,ASH)

2.1 Gathering Database Statistics Using the Automatic Workload Repository 資料庫統計資訊提供關於資料庫上的負載型別以及資料庫使用的內部和外部資源的資訊。要使用ADDM準確診斷資料庫的效能問題,必須提供統計資訊。

微信小程式:warning:Now you can provide attr "wx:key" for a "wx:for" to improve performance.

今天樓主在學習微信小程式開發的時候,在使用wx:for這個標籤遍歷陣列的時候發現了這個警告(不消除警告也可以正常執行,但是看著不爽),經過網上的查詢得到了解決辦法,現在分享給大家: 官方解釋: wx:key 如果列表中專案的位置會動態改變或者有新的專案新增到列表中,

Want to Improve Your Memory? Science Tells Us the Key (and It Can Actually Be Fun)

Want to Improve Your Memory? Science Tells Us the Key (and It Can Actually Be Fun)Do you remember where you were when you had your first kiss?It’s funny, t

Amazon EC2 Tuning Apache Memory

An Apache web server running on an Amazon EC2 Linux instance intermittently becomes unresponsive. Messages appear in the system log for the ins

Top 10 Performance Tuning Techniques for Amazon Redshift

Ian Meyers is a Solutions Architecture Senior Manager with AWS Zach Christopherson, an Amazon Redshift Database Engineer, contributed to this post

30 分鐘快快樂樂學 SQL Performance Tuning

• Primary Key 欄位的長度儘量小,能用 small integer 就不要用 integer。例如員工資料表,若能用員工編號當主鍵,就不要用身分證號碼。 • 一般欄位亦同。若該資料表要存放的資料不會超過 3 萬筆,用 small integer 即可,不必用 integer。 • 文字欄位若長度

小程式提示報Now you can provide attr "wx:key" for a "wx:for" to improve performance.

如果小程式裡面你發現自己哪裡都沒寫錯,卻提示以下內容,Now you can provide attr "wx:key" for a "wx:for" to improve performance.解決方法:在 wx:for='{{}}'和 wo:for-item='' 中間

Oracle Performance Tuning Overview 翻譯(Oracle效能優化概述 自己的中英文比對翻譯)

Automatic Workload Repository (AWR) collects, processes, and maintains performance statistics for problem detection and self-tuning purposes. See "Overview

HotRing: A Hotspot-Aware In-Memory Key-Value Store(FAST ’20)

  本文主要解決的是基於記憶體的K-V儲存引擎在實際應用中出現的熱點問題,設計了一個熱點可感知的KV儲存引擎,極大的提升了KV儲存引擎對於熱點資料訪問的承載能力。 Introduction   熱點問題,可以理解為在一個嚴重傾斜的工作負載下,頻繁的訪問和操作某一小部分資料。   如圖,是阿里的不同業

jmap命令(Java Memory Map)的使用

notes read 一個 net file 64位 pac mem tools jmap的使用能夠參考: 官方文檔 http://docs.oracle.com/javase/6/docs/technotes/tools/share/jmap.html 和這篇博客 h

使用performance monitor 查看 每一個cpu core的cpu time

images cor 使用 man 100% cnblogs tor for img 使用performance monitor 查看 每一個cpu core的cpu time: 打開performance monitor,添加 counter 如下

The Accidental DBA:Troubleshooting Performance

顯示 tin 管理員 ant cau adding cli multi ssms 最近重新翻看The Accidental DBA,將Troubleshooting Performance部分稍作整理,方便以後查閱。一、Baselines 網友提供的性能基線的含義:每天使