Course outline

Linux performance / Basic: measurement and resource signals / Lesson 7

Measurement windows and counter rates

Interpret rates, gauges, and distributions within a defined workload window.

About 25 min read20 worked examples20 practice exercisesContent reviewed
On this page

Lesson goals

  • Calculate a counter rate and recognize resets.
  • Compare measurements with equivalent workloads and windows.
  • Calculate continuous counter rates and distinguish them from gauge changes.
  • Design equivalent windows that preserve distributions and missing outcomes.

Choose a measurement window

A performance number has meaning only with its workload and observation window. A short burst can disappear in a long average, while a very short sample may overstate a transient. Record start and end times, request volume, and workload conditions. Compare equivalent windows before concluding that a change improved the system. Use a disposable test workload so collection does not disturb an important service.

Calculate a counter rate

A cumulative counter records a total since a particular start or reset. To estimate events per second, subtract the earlier value from the later value and divide by elapsed seconds. If the process restarted or the counter reset, a simple subtraction may be invalid. Confirm the counter identity and time interval, and do not compare totals from processes with different lifetimes as if they were rates.

text Calculate a synthetic rate
earlier = 1200 events
later = 1500 events
elapsed = 60 seconds
rate = (1500 - 1200) / 60 = 5 events/second

This assumes one counter without a reset during the minute.

Interpret a gauge

A gauge represents a value at a point in time, such as an observed queue depth. Subtracting two gauge readings describes a change in the observed value, not the number of requests served. Sampling only once can miss a brief queue spike. Collect a sequence over a bounded interval and relate it to request latency and arrival rate before deciding whether the queue caused user impact.

text A gauge change
queue at 10:00 = 4 requests
queue at 10:01 = 7 requests
observed change = +3 requests

The difference is a change in observed depth, not the number of completed requests.

Respect the distribution

An average can conceal a small group of very slow requests. A percentile describes a position in a specified population over a stated window; it is not the maximum and cannot generally be averaged across groups to obtain the combined percentile. Record which requests were included and how missing measurements were handled. Compare the same population and window after a change.

Make a bounded decision

Before tuning, write a hypothesis that connects a measured resource to a user-visible symptom. Change one factor in a representative lab test and compare both the metric and the outcome. If a metric improves but the user operation remains slow, revisit the hypothesis rather than declaring success. Preserve the baseline, configuration, and measurement limitations so another person can repeat the comparison.

Define the window, object, and workload

A rate or latency value is meaningful only for a named population and interval. Record the start and end timestamps, elapsed duration, object identity, workload, and metric definition. A process counter and a host counter can both be valid while answering different questions. Use monotonic elapsed time for durations when available; wall-clock adjustment can make a timestamp difference misleading. A before-and-after comparison needs the same boundary and unit on each side.

Choose a resolution appropriate to the question. A one-hour average can hide a one-minute stall; a single one-second spike may not represent steady operation. Keep raw samples and label warm-up, steady state, and recovery separately. If an incident starts between samples, report the uncertainty rather than inventing its exact onset. The examples below use synthetic records only; they do not sample or change the host.

Calculate only continuous counter deltas

A cumulative counter is a total since its own start or reset. For two samples of the same object and uninterrupted counter lifetime, subtract the earlier value and divide by elapsed seconds. State the event and units: a delta of 300 requests over 60 seconds is 5 requests/s. A larger final total is not proof of continuity; a process could restart, reset its counter, and subsequently exceed the earlier value. Record process start or boot identity and reset evidence with samples.

A missing middle sample permits an average over valid endpoints only if continuity is established, but it cannot reveal the separate rates within the gap. Counter wraparound requires the documented width and semantics; do not invent a correction from a negative value alone. A device replacement changes the object even if its display name is reused. When identity, time, or reset status is unknown, report the interval rate as unknown and collect a new bounded interval.

Read gauge changes without inventing completions

A gauge describes a quantity at a sample time, such as queue depth or current memory. Subtracting two depths gives net change, not the number of arrivals or completions between them. A queue falling from 9 to 3 could mean six completions with no arrivals, or sixteen completions with ten arrivals, among other possibilities. To calculate throughput, collect a separate completion counter or events over the same interval.

Sampling frequency matters for gauges. A queue can spike and drain between minute samples, making both endpoints appear low. A sampled maximum is only the maximum observed at those times, not necessarily the true maximum. Record missing values as missing, not zero, and retain units and scope. Correlate queue age, arrival rate, completions, and latency over matched windows before concluding that the queue caused user impact.

Keep counts and boundaries with summaries

A mean can dilute a short or rare stall. Percentiles describe positions in a specified population and window, not a complete distribution or necessarily the maximum. State the calculation convention and sample count; one extreme observation can determine a high percentile in a small sample. Do not average per-window percentiles to obtain a combined percentile when counts and distributions differ. Merge compatible raw observations or compatible histogram counts, then compute the requested statistic.

Outcome inclusion is part of the population. A completed-only latency chart can improve while timeouts increase, because timed-out requests may be absent. Record attempts, successes, failures, timeout thresholds, and missing measurements alongside the latency summary. Compare the same start and end events and offered demand across windows. A smoother graph is not evidence that the service met its deadline if slow work was excluded.

Use a bounded prediction and repeatable comparison

A useful hypothesis connects a user-visible symptom to a measured mechanism and predicts a signal in the same interval. If a candidate change reduces a resource counter but client latency remains unchanged, the diagnostic metric improved but the stated user objective did not. Recheck scope, workload, and alternative bottlenecks rather than declaring success from the counter alone. Keep both positive and negative observations and state what remains unmeasured.

Use a disposable workload with matched input mix, concurrency, outcome rules, and collection settings. Change one factor, define a stop condition and rollback, and repeat enough windows to see variability. Instrumentation itself has overhead; a collector enabled in only one trial can confound the result. The synthetic cases below do not execute a benchmark or alter production settings, and an unavailable metric remains unknown rather than a zero.

20 worked examples

1. Counter delta

Problem: Analyze the synthetic window record and calculate or infer the supported result and its limits. Record: before: 200 events after: 500 events elapsed: 60 s reset: none

  1. The same counter increased by 300 events during 60 seconds.
  2. Dividing 300 by 60 yields 5 events/s for this interval.
text Counter delta
before: 200 events
after: 500 events
elapsed: 60 s
reset: none

Hypothetical data for analysis, not a host measurement. A continuous counter rate is its delta divided by elapsed time. The same counter increased by 300 events during 60 seconds.

Expected result: Dividing 300 by 60 yields 5 events/s for this interval.

Why this result follows: A continuous counter rate is its delta divided by elapsed time. The same counter increased by 300 events during 60 seconds.

2. Restart invalidates delta

Problem: Analyze the synthetic window record and calculate or infer the supported result and its limits. Record: before: 800 after: 30 process: restarted

  1. The process lifetime changed and the counter decreased.
  2. Do not report the negative difference as an event rate across the restart.
text Restart invalidates delta
before: 800
after: 30
process: restarted

Hypothetical data for analysis, not a host measurement. A restart can reset a cumulative counterโ€™s origin. The process lifetime changed and the counter decreased.

Expected result: Do not report the negative difference as an event rate across the restart.

Why this result follows: A restart can reset a cumulative counterโ€™s origin. The process lifetime changed and the counter decreased.

3. Positive after reset

Problem: Analyze the synthetic window record and calculate or infer the supported result and its limits. Record: before: 100 after: 150 process: restarted

  1. The later value is larger, but the process restarted between samples.
  2. The apparent delta of 50 is not a valid continuous count.
text Positive after reset
before: 100
after: 150
process: restarted

Hypothetical data for analysis, not a host measurement. A reset counter can accumulate past its previous value. The later value is larger, but the process restarted between samples.

Expected result: The apparent delta of 50 is not a valid continuous count.

Why this result follows: A reset counter can accumulate past its previous value. The later value is larger, but the process restarted between samples.

4. Gauge net change

Problem: Analyze the synthetic window record and calculate or infer the supported result and its limits. Record: queue depth start: 9 queue depth end: 3 arrivals and completions: unknown

  1. The observed queue depth decreased by six. A gauge measures a state, not all events between samples. The observed queue depth decreased by six.
  2. That net change does not establish exactly six completions.
text Gauge net change
queue depth start: 9
queue depth end: 3
arrivals and completions: unknown

Hypothetical data for analysis, not a host measurement. A gauge measures a state, not all events between samples. The observed queue depth decreased by six.

Expected result: That net change does not establish exactly six completions.

Why this result follows: A gauge measures a state, not all events between samples. The observed queue depth decreased by six.

5. Queue with arrivals

Problem: Analyze the synthetic window record and calculate or infer the supported result and its limits. Record: queue start: 9 arrivals: 10 completions: 16

  1. Starting with nine and adding ten gives nineteen jobs before completions.
  2. After sixteen completions the ending depth is three, despite more than six jobs completing.
text Queue with arrivals
queue start: 9
arrivals: 10
completions: 16

Hypothetical data for analysis, not a host measurement. Net queue change equals arrivals minus departures under the stated boundary. Starting with nine and adding ten gives nineteen jobs before completions.

Expected result: After sixteen completions the ending depth is three, despite more than six jobs completing.

Why this result follows: Net queue change equals arrivals minus departures under the stated boundary. Starting with nine and adding ten gives nineteen jobs before completions.

6. Missed gauge spike

Problem: Analyze the synthetic window record and calculate or infer the supported result and its limits. Record: queue at 10:00: 2 queue at 10:01: 2 intermediate samples: absent

  1. The endpoints match, but no intermediate queue values are known.
  2. Do not conclude that depth remained at two throughout the minute.
text Missed gauge spike
queue at 10:00: 2
queue at 10:01: 2
intermediate samples: absent

Hypothetical data for analysis, not a host measurement. A gauge can rise and fall between sparse samples. The endpoints match, but no intermediate queue values are known.

Expected result: Do not conclude that depth remained at two throughout the minute.

Why this result follows: A gauge can rise and fall between sparse samples. The endpoints match, but no intermediate queue values are known.

7. Missing middle counter

Problem: Analyze the synthetic window record and calculate or infer the supported result and its limits. Record: counter 10:00: 100 counter 10:01: missing counter 10:02: 340 continuous: yes

  1. The valid endpoints differ by 240 over 120 seconds.
  2. The two-minute average is 2/s, but each one-minute rate remains unknown.
text Missing middle counter
counter 10:00: 100
counter 10:01: missing
counter 10:02: 340
continuous: yes

Hypothetical data for analysis, not a host measurement. Endpoint deltas do not reveal the distribution inside a missing interval. The valid endpoints differ by 240 over 120 seconds.

Expected result: The two-minute average is 2/s, but each one-minute rate remains unknown.

Why this result follows: Endpoint deltas do not reveal the distribution inside a missing interval. The valid endpoints differ by 240 over 120 seconds.

8. Different object

Problem: Analyze the synthetic window record and calculate or infer the supported result and its limits. Record: sample A: device one, 100 sample B: device two, 300 elapsed: 10 s

  1. The samples identify different devices. A counter delta requires the same measured object at both endpoints. The samples identify different devices.
  2. Their numerical difference is not a rate for either device.
text Different object
sample A: device one, 100
sample B: device two, 300
elapsed: 10 s

Hypothetical data for analysis, not a host measurement. A counter delta requires the same measured object at both endpoints. The samples identify different devices.

Expected result: Their numerical difference is not a rate for either device.

Why this result follows: A counter delta requires the same measured object at both endpoints. The samples identify different devices.

9. Weighted average

Problem: Analyze the synthetic window record and calculate or infer the supported result and its limits. Record: window A: 90 requests, mean 10 ms window B: 10 requests, mean 100 ms

  1. The total duration is 90ร—10 + 10ร—100 = 1900 ms across 100 requests.
  2. The combined mean is 19 ms, not the unweighted mean of 55 ms.
text Weighted average
window A: 90 requests, mean 10 ms
window B: 10 requests, mean 100 ms

Hypothetical data for analysis, not a host measurement. Combining means requires weighting by their population counts. The total duration is 90ร—10 + 10ร—100 = 1900 ms across 100 requests.

Expected result: The combined mean is 19 ms, not the unweighted mean of 55 ms.

Why this result follows: Combining means requires weighting by their population counts. The total duration is 90ร—10 + 10ร—100 = 1900 ms across 100 requests.

10. Brief stall diluted

Problem: Analyze the synthetic window record and calculate or infer the supported result and its limits. Record: 59 samples: 10 ms each 1 sample: 610 ms equal sample weights: yes

  1. The total is 1200 ms across 60 samples.
  2. The mean is 20 ms even though one observed sample is 610 ms.
text Brief stall diluted
59 samples: 10 ms each
1 sample: 610 ms
equal sample weights: yes

Hypothetical data for analysis, not a host measurement. Aggregation can hide a short extreme by distributing it across many observations.

Expected result: The mean is 20 ms even though one observed sample is 610 ms.

Why this result follows: Aggregation can hide a short extreme by distributing it across many observations.

11. Nearest-rank percentile

Problem: Analyze the synthetic window record and calculate or infer the supported result and its limits. Record: sorted values: 1,2,3,4,5,6,7,8,9,100 ms method: nearest rank p90

  1. Rank ceil(0.9 ร— 10) is 9.
  2. The ninth value is 9 ms; the 100 ms maximum remains separate evidence.
text Nearest-rank percentile
sorted values: 1,2,3,4,5,6,7,8,9,100 ms
method: nearest rank p90

Hypothetical data for analysis, not a host measurement. A percentile depends on the stated population and rank convention. Rank ceil(0.9 ร— 10) is 9.

Expected result: The ninth value is 9 ms; the 100 ms maximum remains separate evidence.

Why this result follows: A percentile depends on the stated population and rank convention. Rank ceil(0.9 ร— 10) is 9.

12. Unequal percentile populations

Problem: Analyze the synthetic window record and calculate or infer the supported result and its limits. Record: host A: 99 requests at 1 ms host B: 1 request at 100 ms method: nearest-rank p99

  1. The merged sorted population has 99 ones followed by 100.
  2. Rank 99 is 1 ms; an average of host percentiles is not this computation.
text Unequal percentile populations
host A: 99 requests at 1 ms
host B: 1 request at 100 ms
method: nearest-rank p99

Hypothetical data for analysis, not a host measurement. Combined percentiles require combined compatible observations or histogram counts. The merged sorted population has 99 ones followed by 100.

Expected result: Rank 99 is 1 ms; an average of host percentiles is not this computation.

Why this result follows: Combined percentiles require combined compatible observations or histogram counts. The merged sorted population has 99 ones followed by 100.

13. Timeout exclusion

Problem: Analyze the synthetic window record and calculate or infer the supported result and its limits. Record: completed p99: improves timeouts: 5 to 20 offered demand: unchanged

  1. The completed-only percentile improves while timeout count quadruples.
  2. Overall quality cannot be accepted without including the missing outcome population.
text Timeout exclusion
completed p99: improves
timeouts: 5 to 20
offered demand: unchanged

Hypothetical data for analysis, not a host measurement. Excluding censored slow requests can improve a completion-only summary. The completed-only percentile improves while timeout count quadruples.

Expected result: Overall quality cannot be accepted without including the missing outcome population.

Why this result follows: Excluding censored slow requests can improve a completion-only summary. The completed-only percentile improves while timeout count quadruples.

14. Unaligned windows

Problem: Analyze the synthetic window record and calculate or infer the supported result and its limits. Record: user slowdown: 10:00โ€“10:01 resource average: 09:00โ€“10:00

  1. The resource window ends when the slowdown begins.
  2. Collect an aligned 10:00โ€“10:01 observation before correlating them.
text Unaligned windows
user slowdown: 10:00โ€“10:01
resource average: 09:00โ€“10:00

Hypothetical data for analysis, not a host measurement. Causal comparisons require matching time boundaries. The resource window ends when the slowdown begins.

Expected result: Collect an aligned 10:00โ€“10:01 observation before correlating them.

Why this result follows: Causal comparisons require matching time boundaries. The resource window ends when the slowdown begins.

15. Warm-up mismatch

Problem: Analyze the synthetic window record and calculate or infer the supported result and its limits. Record: baseline: warm steady state candidate: initial startup metric: latency

  1. The windows cover different workload phases.
  2. Compare matched startup or matched steady windows before attributing the difference.
text Warm-up mismatch
baseline: warm steady state
candidate: initial startup
metric: latency

Hypothetical data for analysis, not a host measurement. Initialization and cache warmth can change latency independently of the candidate. The windows cover different workload phases.

Expected result: Compare matched startup or matched steady windows before attributing the difference.

Why this result follows: Initialization and cache warmth can change latency independently of the candidate. The windows cover different workload phases.

16. Metric improved only

Problem: Analyze the synthetic window record and calculate or infer the supported result and its limits. Record: resource counter rate: decreases client latency: unchanged objective: lower client latency

  1. The diagnostic resource metric improved, but the user objective did not.
  2. Revisit the mechanism and inspect other stages before declaring success.
text Metric improved only
resource counter rate: decreases
client latency: unchanged
objective: lower client latency

Hypothetical data for analysis, not a host measurement. An intermediate metric is not equivalent to the end-to-end outcome. The diagnostic resource metric improved, but the user objective did not.

Expected result: Revisit the mechanism and inspect other stages before declaring success.

Why this result follows: An intermediate metric is not equivalent to the end-to-end outcome. The diagnostic resource metric improved, but the user objective did not.

17. Collector difference

Problem: Analyze the synthetic window record and calculate or infer the supported result and its limits. Record: baseline collector: off candidate collector: on CPU: changed

  1. Instrumentation differs across the trials.
  2. Match collection or quantify overhead before assigning the CPU change to the candidate.
text Collector difference
baseline collector: off
candidate collector: on
CPU: changed

Hypothetical data for analysis, not a host measurement. Measurement tools can consume resources and alter the workload. Instrumentation differs across the trials.

Expected result: Match collection or quantify overhead before assigning the CPU change to the candidate.

Why this result follows: Measurement tools can consume resources and alter the workload. Instrumentation differs across the trials.

18. Zero versus missing

Problem: Analyze the synthetic window record and calculate or infer the supported result and its limits. Record: sample: unavailable dashboard: 0

  1. The displayed zero is a substitution, not a valid observation.
  2. Preserve the gap and inspect collection before concluding no events occurred.
text Zero versus missing
sample: unavailable
dashboard: 0

Hypothetical data for analysis, not a host measurement. Missing data does not measure a zero value. The displayed zero is a substitution, not a valid observation.

Expected result: Preserve the gap and inspect collection before concluding no events occurred.

Why this result follows: Missing data does not measure a zero value. The displayed zero is a substitution, not a valid observation.

19. Sampled maximum

Problem: Analyze the synthetic window record and calculate or infer the supported result and its limits. Record: queue samples: 2 at 10:00, 4 at 10:01 between samples: unknown

  1. Four is the highest value observed at the two sample times.
  2. It is not proof that the queue never exceeded four between samples.
text Sampled maximum
queue samples: 2 at 10:00, 4 at 10:01
between samples: unknown

Hypothetical data for analysis, not a host measurement. Sampling can miss intermediate peaks. Four is the highest value observed at the two sample times.

Expected result: It is not proof that the queue never exceeded four between samples.

Why this result follows: Sampling can miss intermediate peaks. Four is the highest value observed at the two sample times.

20. Stop threshold

Problem: Analyze the synthetic window record and calculate or infer the supported result and its limits. Record: stop condition: errors above 2% observed: 3% lab experiment: running

  1. The observed error rate exceeds the predeclared limit.
  2. Stop the disposable test and follow its documented rollback.
text Stop threshold
stop condition: errors above 2%
observed: 3%
lab experiment: running

Hypothetical data for analysis, not a host measurement. A stop condition bounds experiment impact before further measurement. The observed error rate exceeds the predeclared limit.

Expected result: Stop the disposable test and follow its documented rollback.

Why this result follows: A stop condition bounds experiment impact before further measurement. The observed error rate exceeds the predeclared limit.

Common errors and fixes

Subtracting a counter after restart

Why it happens
The counter start changed between readings.
How to fix it
Identify the reset and measure a new continuous interval.
Prevent it next time
Keep process identity and start time with measurements.

Treating queue depth change as throughput

Why it happens
A gauge is not a cumulative count of completed requests.
How to fix it
Use a suitable completion counter and a known interval.
Prevent it next time
Document each metric type and unit.

Hiding slow requests in an average

Why it happens
The mean does not describe the full request distribution.
How to fix it
Inspect the distribution and the same request population.
Prevent it next time
Define a suitable latency objective and comparison window.

20 practice exercises

1. A counter rises from 200 to 320 over 30 seconds without a reset. What is its rate?

Show hint

Subtract, then divide by elapsed seconds and check continuity.

Show worked solution

The increase is 120 events. Divide by 30 seconds to obtain four events per second.

The delta is 320 minus 200, or 120 events; divided by 30 seconds it is 4 events/s. This assumes the same counter without a reset during the interval.

Check your solution

  • Calculate the 120-event delta.
  • Report 4 events/s with no reset.

2. Queue depth falls from 9 to 3. Were exactly six requests served?

Show hint

Distinguish net depth change from completion count.

Show worked solution

Not necessarily. Arrivals and completions can occur between observations; the difference describes only the depth change. Use a separate completion counter.

The drop from 9 to 3 is a net change of minus 6 only. Arrivals and completions may both occur between samples; a separate completion counter is needed for the count.

Check your solution

  • Calculate the net depth change of minus 6.
  • Do not infer six completions without a separate count.

3. A continuous counter rises from 250 to 550 over 30 seconds. Calculate the rate and state its units.

Show hint

Identify the metric type, identity, interval, and population described by the evidence.

Show worked solution

The delta is 300 events; dividing by 30 seconds yields 10 events/s. This assumes the same counter identity and no reset throughout the interval. Record the observation context and identity before testing the result in an authorized lab.

Check your solution

  • Calculate a delta of 300 events.
  • Report 10 events/s with the continuity assumption.

4. A counter rises from 100 to 150, but the process restarted between samples. Can 50 be used as a continuous delta?

Show hint

Identify the metric type, identity, interval, and population described by the evidence.

Show worked solution

No. A reset can occur at restart and the new total can later exceed the old value. Measure a new interval within one process lifetime or report the cross-restart rate unknown.

Check your solution

  • Identify the restart boundary.
  • Do not treat the positive difference as a continuous count.

5. A queue depth falls from 9 to 3. Must exactly six jobs have completed between samples?

Show hint

Identify the metric type, identity, interval, and population described by the evidence.

Show worked solution

No. The net change is minus six, but arrivals and completions can both occur between samples. Use a separate completion counter to determine how many jobs completed. Record the observation context and identity before testing the result in an authorized lab.

Check your solution

  • Calculate net depth change of minus six.
  • Do not equate net change with completion count.

6. A queue starts at 9, receives 10 arrivals, and completes 16 jobs. Calculate its ending depth.

Show hint

Identify the metric type, identity, interval, and population described by the evidence.

Show worked solution

Starting depth plus arrivals minus completions is 9 + 10 โˆ’ 16 = 3 jobs. This example shows that a six-job net decrease can include sixteen completions. Record the observation context and identity before testing the result in an authorized lab.

Check your solution

  • Calculate ending depth 3.
  • Identify 16 completions despite a net decrease of 6.

7. Queue samples one minute apart both show 2. Can a short peak between them be ruled out?

Show hint

Identify the metric type, identity, interval, and population described by the evidence.

Show worked solution

No. The gauge could rise and drain between samples without appearing at either endpoint. Collect a resolution suited to the question and report the sampled rather than assumed maximum. Record the observation context and identity before testing the result in an authorized lab.

Check your solution

  • Identify the unobserved interval.
  • Do not claim depth stayed at 2.

8. A counter changes from 100 to 340 over two minutes, with the middle sample missing. What can be calculated?

Show hint

Identify the metric type, identity, interval, and population described by the evidence.

Show worked solution

If the same counter is continuous, the 240-event delta over 120 seconds gives 2 events/s on average. The individual minute rates and event distribution within the gap remain unknown. Record the observation context and identity before testing the result in an authorized lab.

Check your solution

  • Calculate the two-minute average 2/s under continuity.
  • Do not invent the two individual minute rates.

9. One sample is from device A and another from device B. Why is their numeric difference not device throughput?

Show hint

Identify the metric type, identity, interval, and population described by the evidence.

Show worked solution

The endpoints describe different measured objects, so subtraction is not a continuous counter delta for either device. Collect two samples of the same device lifetime over a known interval. Record the observation context and identity before testing the result in an authorized lab.

Check your solution

  • Identify the object mismatch.
  • Request same-device endpoints and elapsed time.

10. A window has 90 requests averaging 10 ms and another has 10 averaging 100 ms. Compute the combined mean.

Show hint

Identify the metric type, identity, interval, and population described by the evidence.

Show worked solution

The combined duration is 90ร—10 + 10ร—100 = 1900 ms across 100 requests, giving 19 ms. Weighting by counts is necessary; the unweighted average of the two means is 55 ms.

Check your solution

  • Calculate combined duration 1900 ms.
  • Calculate weighted mean 19 ms.

11. Fifty-nine samples are 10 ms and one is 610 ms. Calculate the mean and explain what it hides.

Show hint

Identify the metric type, identity, interval, and population described by the evidence.

Show worked solution

The total is 59ร—10 + 610 = 1200 ms, and the mean across 60 samples is 20 ms. The mean alone hides the single observed 610 ms stall. Record the observation context and identity before testing the result in an authorized lab.

Check your solution

  • Calculate mean 20 ms.
  • Retain the 610 ms extreme observation.

12. For ten sorted values 1 through 10 ms, calculate p90 using nearest rank.

Show hint

Identify the metric type, identity, interval, and population described by the evidence.

Show worked solution

Nearest rank is ceil(0.9 ร— 10) = 9, so the ninth value is 9 ms. Include the sample count and method because percentile conventions can differ. Record the observation context and identity before testing the result in an authorized lab.

Check your solution

  • Calculate rank 9 and value 9 ms.
  • State the ten-sample nearest-rank method.

13. Why can averaging p99 values from hosts with different request counts misstate global p99?

Show hint

Identify the metric type, identity, interval, and population described by the evidence.

Show worked solution

Each p99 is already a summary and does not retain the full distribution or weight of its host. Combine compatible raw observations or histogram counts, then calculate the percentile for the merged population.

Check your solution

  • Identify different host counts and distributions.
  • Calculate from combined compatible data instead of averaging p99.

14. Completed-request p99 improves while timeouts increase from 5 to 20. What must accompany the chart?

Show hint

Identify the metric type, identity, interval, and population described by the evidence.

Show worked solution

Report the timeout counts and thresholds, offered demand, and population definition. The completed-only percentile may exclude slow requests that timed out, so overall quality cannot be inferred from it alone.

Check your solution

  • Record 5 versus 20 timeouts.
  • Compare the complete outcome population and offered demand.

15. User latency spikes at 10:00โ€“10:01, while a resource average covers 09:00โ€“10:00. What is the problem?

Show hint

Identify the metric type, identity, interval, and population described by the evidence.

Show worked solution

The windows do not cover the same interval, so the resource average cannot directly explain the spike. Gather aligned measurements for the affected workload and minute. Record the observation context and identity before testing the result in an authorized lab.

Check your solution

  • Identify the nonoverlapping intervals.
  • Request resource evidence for the incident minute.

16. A baseline is measured cold and a candidate after warm-up. Why is the comparison confounded?

Show hint

Identify the metric type, identity, interval, and population described by the evidence.

Show worked solution

Cache and initialization phase differ along with the candidate, so either could affect latency. Repeat matched cold or matched steady windows with the same input mix and collection settings. Record the observation context and identity before testing the result in an authorized lab.

Check your solution

  • Identify the phase and cache mismatch.
  • Repeat equivalent windows for both versions.

17. A resource counter improves after a change, but client latency stays unchanged. Has the user objective been met?

Show hint

Identify the metric type, identity, interval, and population described by the evidence.

Show worked solution

Not if the stated objective was lower client latency. Record the metric improvement, verify matching scope and workload, and investigate other stages or reconsider the hypothesis. Record the observation context and identity before testing the result in an authorized lab.

Check your solution

  • Record the resource improvement separately.
  • Do not claim the client-latency objective improved.

18. A collector runs only in the candidate trial. How can its overhead affect the comparison?

Show hint

Identify the metric type, identity, interval, and population described by the evidence.

Show worked solution

The collector can consume CPU or I/O and change the observed workload, making instrumentation another differing factor. Repeat with matched collection or quantify the overhead in a bounded lab. Record the observation context and identity before testing the result in an authorized lab.

Check your solution

  • Identify asymmetric instrumentation.
  • Match collection or measure its overhead.

19. A monitoring sample is unavailable, but a chart shows zero. What should an analyst record?

Show hint

Identify the metric type, identity, interval, and population described by the evidence.

Show worked solution

Record a missing sample and investigate collector errors or scope. Zero would assert a valid measurement of no events, which the unavailable sample does not support. Record the observation context and identity before testing the result in an authorized lab.

Check your solution

  • Mark the observation as missing.
  • Do not interpret it as a measured zero.

20. A lab test has a stop condition of errors above 2%, and the observed rate reaches 3%. What next?

Show hint

Identify the metric type, identity, interval, and population described by the evidence.

Show worked solution

Stop the bounded test and follow the documented rollback because the observed rate exceeds the threshold. Preserve its raw results and investigate before repeating the experiment. Record the observation context and identity before testing the result in an authorized lab.

Check your solution

  • Compare 3% with the 2% threshold.
  • Stop and use the documented rollback.

Key takeaways

  • Identify metric type and window before interpreting a number.
  • Compare the metric with user outcomes under equivalent load.
  • Counter deltas require the same object, lifetime, and interval.
  • Queue-depth change is net state, not a completion count.
  • Do not replace missing measurements with zero or average percentiles as a merged percentile.

Official references