Zen and the Art of Perfmon Title: Microsoft PowerPoint - Zen and the Art of Perfmon Author: dklee...

download Zen and the Art of Perfmon Title: Microsoft PowerPoint - Zen and the Art of Perfmon Author: dklee Created

of 16

  • date post

    19-Oct-2020
  • Category

    Documents

  • view

    0
  • download

    0

Embed Size (px)

Transcript of Zen and the Art of Perfmon Title: Microsoft PowerPoint - Zen and the Art of Perfmon Author: dklee...

  • SQLBits 2019

    Copyright Heraflux Technologies. Do not  redistribute or copy as your own. 1

    © Heraflux Technologies®  2

    0

    10

    20

    30

    40

    50

    60

    00 :0 0

    00 :3 0

    01 :0 0

    01 :3 0

    02 :0 0

    02 :3 0

    03 :0 0

    03 :3 0

    04 :0 0

    04 :3 0

    05 :0 0

    05 :3 0

    06 :0 0

    06 :3 0

    07 :0 0

    07 :3 0

    08 :0 0

    08 :3 0

    09 :0 0

    09 :3 0

    10 :0 0

    10 :3 0

    11 :0 0

    11 :3 0

    12 :0 0

    12 :3 0

    13 :0 0

    13 :3 0

    14 :0 0

    14 :3 0

    15 :0 0

    15 :3 0

    16 :0 0

    16 :3 0

    17 :0 0

    17 :3 0

    18 :0 0

    18 :3 0

    19 :0 0

    19 :3 0

    20 :0 0

    20 :3 0

    21 :0 0

    21 :3 0

    22 :0 0

    22 :3 0

    23 :0 0

    23 :3 0

    % C

    PU C

    on su

    m pt

    io n

    Time of Day (Avg)

    CPU by Core ‐ Five Minute Avg

    CPU00 CPU01 CPU02 CPU03 CPU04 CPU05 CPU06 CPU07

    1

    2

  • SQLBits 2019

    Copyright Heraflux Technologies. Do not  redistribute or copy as your own. 2

    © Heraflux Technologies®  3

    @kleegeek davidklee.net heraflux.com davidaklee

    Specialties / Focus Areas / Passions: • Performance Tuning  • Business Continuity • Virtualization & Cloud • Infrastructure Architecture • Health & Efficiency • Capacity Management Founder & Technical Exorcist

     Completely subjective… … until youmake it objective. No more arguments. Numbers drive the discussion.

    © Heraflux Technologies®  4

    3

    4

  • SQLBits 2019

    Copyright Heraflux Technologies. Do not  redistribute or copy as your own. 3

    © Heraflux Technologies®  5

    VM  H os t

    VM  H os t

    Shared Storage

    VM

    VM

    VM

    VM

    VM

    VM

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    DB

    Highest CPU consuming instance Memory pressure  Storage throughput consumption

    © Heraflux Technologies®  6

    5

    6

  • SQLBits 2019

    Copyright Heraflux Technologies. Do not  redistribute or copy as your own. 4

     Impact of “noisy neighbors”  CPU scheduling impact  Storage latency spike not originating in that server

     Impact of system backups on the system  Correlated (seemingly) random events

    © Heraflux Technologies®  7

    © Heraflux Technologies®  8

    7

    8

  • SQLBits 2019

    Copyright Heraflux Technologies. Do not  redistribute or copy as your own. 5

     Third‐Party Tools  Perfmon built‐in to Windows Meaning, not just numbers  Show before and after Granularity 

    © Heraflux Technologies®  9

     “I have 32 CPUs!”  6% CPU consumption average?

    © Heraflux Technologies®  10

    9

    10

  • SQLBits 2019

    Copyright Heraflux Technologies. Do not  redistribute or copy as your own. 6

    © Heraflux Technologies®  11

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100

    0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

    % C

    PU C

    on su

    m pt

    io n

    Hour of Day (Avg)

    CPU AVG (1H)

    AvgCPUConsumption

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100

    00 :0 0

    00 :4 0

    01 :2 0

    02 :0 0

    02 :4 0

    03 :2 0

    04 :0 0

    04 :4 0

    05 :2 0

    06 :0 0

    06 :4 0

    07 :2 0

    08 :0 0

    08 :4 0

    09 :2 0

    10 :0 0

    10 :4 0

    11 :2 0

    12 :0 0

    12 :4 0

    13 :2 0

    14 :0 0

    14 :4 0

    15 :2 0

    16 :0 0

    16 :4 0

    17 :2 0

    18 :0 0

    18 :4 0

    19 :2 0

    20 :0 0

    20 :4 0

    21 :2 0

    22 :0 0

    22 :4 0

    23 :2 0

    % C

    PU C

    on su

    m pt

    io n

    Time of Day (Avg)

    CPU ‐ Five Minute Avg

    SystemCPUConsumption UserCPUConsumption

    © Heraflux Technologies®  12

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100

    00 :0 0

    00 :4 0

    01 :2 0

    02 :0 0

    02 :4 0

    03 :2 0

    04 :0 0

    04 :4 0

    05 :2 0

    06 :0 0

    06 :4 0

    07 :2 0

    08 :0 0

    08 :4 0

    09 :2 0

    10 :0 0

    10 :4 0

    11 :2 0

    12 :0 0

    12 :4 0

    13 :2 0

    14 :0 0

    14 :4 0

    15 :2 0

    16 :0 0

    16 :4 0

    17 :2 0

    18 :0 0

    18 :4 0

    19 :2 0

    20 :0 0

    20 :4 0

    21 :2 0

    22 :0 0

    22 :4 0

    23 :2 0

    % C

    PU C

    on su

    m pt

    io n

    Time of Day (Avg)

    CPU ‐ Five Minute Avg (BEFORE)

    SystemCPUConsumption UserCPUConsumption

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100

    00 :0 0

    00 :4 0

    01 :2 0

    02 :0 0

    02 :4 0

    03 :2 0

    04 :0 0

    04 :4 0

    05 :2 0

    06 :0 0

    06 :4 0

    07 :2 0

    08 :0 0

    08 :4 0

    09 :2 0

    10 :0 0

    10 :4 0

    11 :2 0

    12 :0 0

    12 :4 0

    13 :2 0

    14 :0 0

    14 :4 0

    15 :2 0

    16 :3 0

    17 :1 0

    17 :5 0

    18 :3 0

    19 :1 0

    19 :5 0

    20 :3 0

    21 :1 0

    21 :5 0

    22 :3 0

    23 :1 0

    23 :5 0

    % C

    PU C

    on su

    m pt

    io n

    Time of Day (Avg)

    CPU ‐ Five Minute Avg (AFTER)

    SystemCPUConsumption UserCPUConsumption

    11

    12

  • SQLBits 2019

    Copyright Heraflux Technologies. Do not  redistribute or copy as your own. 7

     Collect raw data first  Perfmon how‐to guide  Download at hfxte.ch/perfmon  No contact info required

     30‐second collection interval

    © Heraflux Technologies®  13

    hfxte.ch/perfmon

    © Heraflux Technologies®  14

    13

    14

  • SQLBits 2019

    Copyright Heraflux Technologies. Do not  redistribute or copy as your own. 8

    © Heraflux Technologies®  15

    Counter Set Counter Explanation Processor % Privileged Time Windows OS layer CPU consumption

    % User Time Application CPU consumption % Processor Time % Privileged Time + % User Time

    Process % Processor Time CPU consumption by process EXE Processor Information % of Maximum Frequency  5000 x proc count is CPU scheduling pressure

    Processor Queue Length > 5 x proc count is CPU scheduling pressure

    © Heraflux Technologies®  16

    Counter Set Counter Explanation Memory Available MBytes Windows OS layer CPU consumption

    Lazy Writes / sec Memory flushed out to disk Memory Grants Pending Processes waiting for memory Page Faults / sec Thought it was in RAM, but it was not Page Reads / sec Memory successfully used to cache blocks of data Page Writes / sec Memory successfully written to Pages / sec Memory paged out of RAM to disk

    SQL Server: Buffer  Manager

    Page Life Expectancy Average of lifetime of pages in buffer pool Buffer Cache Hit Ratio % of pages found in BP without going to disk

    Paging File % Usage When available RAM not enough

    15

    16

  • SQLBits 2019

    Copyright Heraflux Technologies. Do not  redistribute or copy as your own. 9

    © Heraflux Technologies®  17

    Counter Set Counter Explanation Network Interface Bytes Received / sec Inbound data traffic rates (convert to MB/s)

    Bytes Sent / sec Outbound data traffic rates (convert to MB/s) Packets Outbound Discarded Thrown away blocks even though no errors occurred Packets Outbound Errors Failed transmits