performance benchmark fundamentals.ppt - total...

28
Performance Benchmark Fundamentals Fundamentals © 2008 TIBCO Software Inc. All Rights Reserved.

Upload: dodat

Post on 27-Apr-2018

238 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Performance Benchmark FundamentalsFundamentals

© 2008 TIBCO Software Inc. All Rights Reserved.

Page 2: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Topics

Benchmark Basics

Latency Measurementsate cy easu e e ts

Resource Consumption Measurements

Experimental Variables (Parameters)Experimental Variables (Parameters)

Test Harness Limitations

Measurements with Multiple Components

Measurements with Complex Components

Interpreting Benchmarks

Summary

© 2008 TIBCO Software Inc. All Rights Reserved..

2

Page 3: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Benchmark Basics

Benchmarks reflect the test environmentYou need to understand the environment in order to understand the benchmark

Measurements may reflect environment and test h li it ti t il t dharness limitations, not necessarily system-under-test limitations

The benchmark environment may not reflect yourThe benchmark environment may not reflect your usage environment

© 2008 TIBCO Software Inc. All Rights Reserved..

3

Page 4: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Typical Benchmark Experiment

Control the input rate

Wait for the system to stabilizea t o t e syste to stab e

Measure the output rate

Repeat for different input ratesRepeat for different input rates

 

© 2008 TIBCO Software Inc. All Rights Reserved..

4

Page 5: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Typical Performance Curve

 

© 2008 TIBCO Software Inc. All Rights Reserved..

5

Page 6: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Document the Basic Experimental Design

Components involved

Interfaces usedte aces used

Placement on machines  Test Harness Machine System Machine

<<component>>Component Under Test

<<component>>Test Harness

Interface

a) Simple Request-Response Experimental Setup

System MachineInput Test Harness Machine Output Test Harness Machine

<<component>>Component Under Test

<<component>>Output Test

Harness

<<component>>Input Test Harness Input

InterfaceOutput

Interface

© 2008 TIBCO Software Inc. All Rights Reserved..

6

b) Simple Straight-Through Processing Test Setup

Page 7: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Document the Experimental Details

© 2008 TIBCO Software Inc. All Rights Reserved..

7

Page 8: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Experimental Data

 Experimental ParamtersMessage Size ( 5Worker Threads 10

Test Data

Input Message Rate Input Data

Output Message Rate

Output Data Rate Latency

CPU Utilization (% of RAM

Disk Access Rate (access

Disk Bandwidth Utilization

Network Bandwidth Utilization

(messages/ second)

pRate (KB/ second)

(messages/ second)

(KB/second)

y(milliseconds)

(available CPU)

Utilization (MBytes)

(es/ second)

(MB/ second)

(KBytes/ second)

Available CPU

1 5 1 5 2 0% 150 3 0 10 100%2 10 2 10 2 0% 150 6 0 20 100%5 25 5 25 3 0% 150 15 0 50 100%

10 50 10 50 3 1% 151 30 0 100 100%20 100 20 100 4 1% 151 60 0 200 100%50 250 50 250 4 3% 153 150 1 500 100%

100 500 100 500 5 5% 155 300 2 1,000 100%200 1,000 200 1,000 5 10% 160 600 3 2,000 100%500 2 500 500 2 500 6 25% 175 1 500 8 5 000 100%500 2,500 500 2,500 6 25% 175 1,500 8 5,000 100%

1,000 5,000 1,000 5,000 6 50% 200 3,000 15 10,000 100%2,000 10,000 1,250 6,250 10 100% 250 3,750 19 16,250 100%5,000 25,000 800 4,000 38 100% 400 2,400 12 29,000 100%

10,000 50,000 500 2,500 120 100% 650 1,500 8 52,500 100%20,000 100,000 350 1,750 343 100% 1,150 1,050 5 101,750 100%

© 2008 TIBCO Software Inc. All Rights Reserved..

8

, , , , , ,25,000 125,000 1 5 150,000 100% 1,400 3 0 125,005 100%

Page 9: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Basic Benchmark Results

 

10 00010 000

System Output vs Input ‐ 5KB Messages, 10 Threads

1,000

10,000

1,000

10,000

es/secon

d)

es/secon

d)

Output Message Rate

100100

ata Rate (b

yte

Rate (m

essage

Output Message Rate (messages/ second)

Output Data Rate (KB/second)

1

10

1

10

Outpu

t Da

Outpu

t R Operating Capacity

1 10 100

1,00

0

10,000

100,00

0

Input Message Rate (messages/second)

© 2008 TIBCO Software Inc. All Rights Reserved..

9

Page 10: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Potentially Misleading Experiments

Overload Tests (drain-the-bathtub)Inputs provided at an extremely high rateMeasure time required to generate all resulting outputs

• outputs/time = rate (most likely in overload range!)

Low-End Performance TestsData points well below operating capacityp p g p yYield no insight as to what the operating capacity is

• Cannot be used to compare two designs

© 2008 TIBCO Software Inc. All Rights Reserved..

10

Page 11: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Latency Measurements

Usually change markedly at operating capacityGood idea to show basic capacity graph as well

 

1,000,00010,000

System Latency vs. Input ‐ 5 KB Messages, 10 Threads

10,000

100,0001,000

second

s)

s/second

)

Output Message Rate (messages/ second)

10

100

1,000

10

100

Latency (m

illis

t Rate (m

essages

Latency (milliseconds)

Operating Capacity

1

10

1

1 10 100

1,00

0

10,000

00,000

Outpu

t

© 2008 TIBCO Software Inc. All Rights Reserved..

11

1 10Input Message Rate (messages/second)

Page 12: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

CPU Utilization – CPU Not Limiting Performance

CPU utilization peaks after operating capacity is reached

 

100%10,000

CPU Utilization ‐ 5 KB Messages, 10 Threads

10%1,000

tion

es/secon

d)

Output Message Rate (messages/ second)

0%

1%

10

100

CPU Utiliza

t Rate (m

essage CPU Utilization  (% of 

available CPU)

Available CPU

OperatingCapacity

0%1

1 10 100

000

000

000

Outpu

t Operating Capacity

© 2008 TIBCO Software Inc. All Rights Reserved..

12

1

1,0

10,0

100,0

Input Message Rate (messages/second)

Page 13: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

CPU Utilization – CPU Limiting Performance

CPU Utilization Peaks At Operating Capacity 

CPUUtili ation 5 KB Messages 10 Threads

100%10,000

CPU Utilization ‐ 5 KB Messages, 10 Threads

10%

100

1,000

Utilization

messages/second

)

Output Message Rate (messages/second)

1%

10

CPU U

Outpu

t Rate (m Output Message Rate (messages/second)

CPU Utilization  (% of available CPU)

Available CPU

Operating Capacity

0%1

1 10 100

1,00

0

10,000

100,00

0

( / d)

© 2008 TIBCO Software Inc. All Rights Reserved..

13

Input Message Rate (messages/second)

Page 14: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Network Bandwidth – Network Not Limiting Performance

Network peaks after operating capacity is reachedMay not peak at all

 Network Bandwidth Utilization ‐ 5 KB Messages, 10 

Threads

10 000

100,000

1,000,000

1,000

10,000

ges/second

)

100

1,000

10,000

100

Bytes/second

)

Outpu

t Rate (m

essag

Output Message Rate (messages/ second)

Network Bandwidth Utilization (KBytes/ second)

Available NIC Bandwidth  (KBytes/ 

1

10

100

1

10

Data Rate (KBO second)

Operating Capacity

© 2008 TIBCO Software Inc. All Rights Reserved..

14

1 10 100

1,00

0

10,000

100,00

0

Input Message Rate (messages/second)

Page 15: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Network Bandwidth – Network Limiting Performance

Network peaks at operating capacity 

Network Bandwidth Utilization ‐ 100 KB Messages, 10 Threads

1,000,0001,000

)

10 000

100,000

100

ate (K

econ

d)

e (m

essages/second

)

Output Message Rate (messages/  second)

1,000

10,000

10

Data Ra

Bytes/se

utpu

t Message

 Rate

Network Bandwidth Utilization  (KBytes/ second)

Available NIC Bandwidth  (KBytes/ second)

OperatingCapacity

1001

1 10 100 1,000 10,000

O

Operating Capacity

© 2008 TIBCO Software Inc. All Rights Reserved..

15

Input Message Rate (messages/second)

Page 16: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Disk Utilization is Complex to Evaluate

Two different limitations:Disk access rate - # of accesses/second

• Comes into play when data blocks are small to modest in size

Data transfer rate - # of bytes/second• Comes into play when large data blocks are being written/accessedp y g g

Application’s use of disk is also a factorRead vs. WriteSynchronous vs. Asynchronous

• Critical writes should always be synchronous

© 2008 TIBCO Software Inc. All Rights Reserved..

16

Page 17: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Key Disk Performance-Related Questions

Is the disk part of the machine using it, or is it in a separate storage subsystem?

If it is in a storage subsystem, does the subsystem have a fault tolerant buffer?

Is the disk a single physical disk, or a RAID array? If it is a raid array, how many spindles are in the array and what RAID configuration is being used?array, and what RAID configuration is being used?

What is the rotational speed of each disk?

Wh t i th k ti f th di k h d?What is the average seek time of the disk head?

What is average data transfer rate for the disk?

© 2008 TIBCO Software Inc. All Rights Reserved..

17

What is the size of the buffer cache for the disk?

Page 18: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Disk Formulas (assuming no fault-tolerant buffer)

  11nalLatencyavgRotatio30/2)60/(

1sec

RPMRPM diskSpeeddiskSpeednalLatencyavgRotatio =

×=

 

sec/sec

bytes

bytes

tetransferRaemessageSiz

erTimedataTransf =

 

( ) erTimedataTransfnalLatencyavgRotatioeavgSeekTimateavgAccessR

++=

max1

sec

© 2008 TIBCO Software Inc. All Rights Reserved..

18

Page 19: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Impact of Disk on Performance

 Disk Access Rate ‐ 5 KB Messages, 10 Threads

10,00010,000

nd)

1,0001,000

accesses/secon

d)

e (m

essages/seco

Output Message Rate (messages/ second)

10

100

10

100

Disk Access Rate (a

Outpu

t Rate

Disk Access Rate (accesses/ second)

Available Disk Access Rate

11

1 10 100

000

000

000

D Unconstrained OperatingCapacity

Constrained OperatingCapacity

© 2008 TIBCO Software Inc. All Rights Reserved..

19

1

1,0

10,0

100,0

Input Message Rate (messages/second)

Page 20: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Memory Utilization – Memory Not a Limiting Factor

Memory utilization peaks after operating capacity reached

May not hit limit at all 

Memory Utilization ‐ 5 KB Messages, 10 Threads

1 000

10,000

1 000

10,000

second

)

100

1,000

100

1,000

put R

ate (m

essages/s

Output Message Rate (messages/ second)

RAM Utilization  (MBytes)

1

10

1

10

Out Physical Memory Availability (MBytes)

Unconstrained OperatingCapacity

© 2008 TIBCO Software Inc. All Rights Reserved..

20

11

1 10 100

1,00

0

10,000

100,00

0

Input Message Rate (messages/second)

Page 21: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Experimental Variables (Parameters)

The variables that are important depend upon the nature of the components and the nature of the t ttests

Typical parameters:The number of threads in each system componentThe sizes of buffersConstraints on the number of activities that can occur inConstraints on the number of activities that can occur in parallelThe number of allowed connections (there may be ( ydifferent numbers for different connection types)The number of concurrent sessions

© 2008 TIBCO Software Inc. All Rights Reserved..

21

Don’t forget the test harness parameters!

Page 22: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Test Harness Limitations

Ifyou reach an apparent capacity limit

andyou can’t identify system resources that have reached limits

then eithera) there is a system design characteristic that limits its ) y gability to utilize the available resources

e.g. insufficient threads

ororb) The test harness is incapable of driving the system to its

full capacity

© 2008 TIBCO Software Inc. All Rights Reserved..

22

p y

Make sure you know what the real limitation is!

Page 23: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Multi-Component Tests

Comparing different designs can be tricky  System Under Test

a) Direct Socket Interaction

<<component>>Test Harness

<<component>>Component Under TestDirect

SocketInterface

System Under Test

)

<<component>>Component

<<component>>Test Harness

<<component>>Messaging

b) Messaging Interaction

Under TestMessagingComponentMessaging

InterfaceMessaging

Interface

System Under Test

<<component>>

<<component>>Component Under Test

<<component>>MessagingComponent

<<component>>Test Harness

MessagingInterface

MessagingInterface

© 2008 TIBCO Software Inc. All Rights Reserved..

23 c) Messaging Interaction with Load Distribution

componentComponent Under Test

Interface Interface

Page 24: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Comparing Designs with Different Communications

Adding a messaging component introduces latency

If the test harness has a fixed number of threads, t e test a ess as a ed u be o t eads,each waiting for a reply, the addition of latency will reduce the number of requests/second that the harness is capable of deliveringharness is capable of delivering

An apparent reduction in throughput will result

A meaningful comparison requires that the testA meaningful comparison requires that the test harness be able to fully load both designs

© 2008 TIBCO Software Inc. All Rights Reserved..

24

Page 25: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Comparing Designs with and without Load Distribution

Load distribution requires a distribution mechanism

e.g. JMS queue

Load distribution mechanism will both add latency ( i ti ) d dditi l(see previous section) and consume additional resources

A LB configuration with only one worker willA LB configuration with only one worker will consume more resources than the non-LB solution

You won’t see the LB benefits until you add aYou won t see the LB benefits until you add a second worker

You may need to place different components on

© 2008 TIBCO Software Inc. All Rights Reserved..

25

different machines as well

Page 26: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Complex Components

Typically perform more than one taskDifferent tasks consume varying levels of resource

iPe.g. iProcess

Testing strategy (simplistic)1. Identify simplest (lightest-weight) tasks and generate y p ( g g ) g

baseline performance for these tasks• E.g. start a trivial workflow, execute a trivial task• These measurements basically measure raw overhead• Adding real work will always degrade performance

2. Vary parameters for baseline tests• i.e. input size, threads, etc.

3. Measure performance for individual non-trivial tasksV t i t b li• Vary parameters, compare against baseline

• Gives you incremental cost for the non-trivial task

4. Explore scenarios in which tasks interact• Data for individual tasks no longer predicts overall performance

© 2008 TIBCO Software Inc. All Rights Reserved..

26

• Pragmatics will limit the number of scenarios that can be explored – make them representative of real usage

Page 27: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Interpreting Benchmarks as Guides to Your Design

Contention for resourcesWhat else is competing for the resources in your design?

Variable resource availabilityDifficult to use networks to capacity in production environments

• Benchmark may be predictive up to 30% of resource availability, inaccurate at hi h l lhigher levels

Extrapolation of resultsBenchmark environment may be differenty

• Can you accurately extrapolate?Windows->Linux?Intel->RISC?Laptop->Server?

When in doubt, do your own benchmarkThis is why it is important to understand how the benchmark was performed

© 2008 TIBCO Software Inc. All Rights Reserved..

27

was performed

Page 28: Performance Benchmark Fundamentals.ppt - Total …total-architecture.com/indexFiles/Performance/Performance Benchma… · Performance Benchmark Fundamentals ... A meaningful comparison

Summary

Always document the test design in sufficient detail to allow others to accurately reproduce your results.Always range demand until the operating capacity of the system

d h b h d (i f h i i iunder test has been reached (i.e. further increases in input rate do not result in proportional increases in output rate)Always document measured or estimated resource availability and consumptionand consumptionOnce an apparent operational limit has been reached, investigate to determine whether a true resource constraint has been reached. Consider adding resources (i.e. adding memory, changing to a higher network bandwidth)changing to a higher network bandwidth).If an apparent operational limit has been reached without exhausting available resources:

Consider whether tuning the system under test might furtherConsider whether tuning the system under test might further increase the operational capacity.Consider whether the design or configuration of the test harness might be the true limiting factor in the experiment.

© 2008 TIBCO Software Inc. All Rights Reserved..

28