Skip to main content
Back to blog
performance 21 April 2020 3 min read

Spike Test

How to implement spike testing in performance testing using LoadRunner and Apache JMeter to simulate extreme load increments and evaluate system recovery.

M

Mark

Performance Testing Expert

Performance testing requires careful scenario design matching specific criteria. While load, stress, and soak tests are commonly performed, spike testing is an underutilized but valuable approach. A spike test simulates an extreme increment or decrement in load to evaluate recovery behavior and identify application weaknesses.

What is a Spike Test?

A spike test introduces a sudden, dramatic increase in load to observe:

  • How the system handles the sudden surge
  • Whether the system recovers to normal performance
  • What breaks under extreme conditions
  • How long recovery takes

LoadRunner Implementation

The approach uses two script groups:

  1. Baseline Group: 10 virtual users ramping up for constant 1-hour load
  2. Spike Group: 40 users delayed 30 minutes before simultaneous deployment

This creates a visible performance disruption in controller graphs, with the spike group overlaying the steady-state baseline.

LoadRunner Scenario Configuration

Group 1 (Baseline):
  - Virtual Users: 10
  - Ramp Up: Gradual over 5 minutes
  - Duration: 60 minutes
  - Ramp Down: 5 minutes

Group 2 (Spike):
  - Virtual Users: 40
  - Start Delay: 30 minutes
  - Ramp Up: Immediate (all at once)
  - Duration: 5 minutes
  - Ramp Down: Immediate

Apache JMeter Implementation

The Ultimate Thread Group plugin enables complex scenarios with precise control.

Configuration

Row 1 - Baseline Load:

  • Threads: 100
  • Initial Delay: 0
  • Startup Time: 300 seconds (gradual ramp)
  • Hold Load: 3600 seconds (1 hour)
  • Shutdown Time: 60 seconds

Row 2 - Spike Load:

  • Threads: 100
  • Initial Delay: 1800 seconds (30 minutes)
  • Startup Time: 0 (immediate)
  • Hold Load: 300 seconds (5 minutes)
  • Shutdown Time: 0 (immediate)

Ultimate Thread Group Settings

Ultimate Thread Group:
  Row 1: Start=100, Initial Delay=0, Startup=300, Hold=3600, Shutdown=60
  Row 2: Start=100, Initial Delay=1800, Startup=0, Hold=300, Shutdown=0

The combined threading visualization displays the spike halfway through when additional threads join the existing load.

Monitoring Considerations

Continuous infrastructure monitoring proves essential during spike tests:

  1. Establish baseline - The steady-state period before the spike provides baseline behavior for comparison
  2. Monitor during spike - Track resource utilization, response times, and error rates
  3. Verify recovery - Confirm the system returns to baseline performance
  4. Wait between spikes - If running multiple spikes, ensure full recovery before introducing additional load

Key Metrics to Monitor

  • CPU utilization
  • Memory usage
  • Response times
  • Error rates
  • Queue depths
  • Connection pool usage
  • Database performance

Best Practices

  1. Single spike first - Start with one spike to understand behavior before adding complexity
  2. Document recovery time - Measure how long it takes to return to normal
  3. Monitor all tiers - Watch web servers, application servers, and databases
  4. Compare to baseline - Always have a steady-state reference point
  5. Test in production-like environment - Results are only valid if the environment matches production

Further Reading

Tags:

#spike-testing #jmeter #loadrunner #performance-testing #load-testing

The cheat sheets, as printable PDFs

All 52 are free to read on the site — no signup. Want them as A4 PDFs you can actually print? The pack covers JMeter, k6, Gatling, Docker, Kubernetes and observability, and costs nothing but an email address.

Get the PDF pack

Delivered by email. Unsubscribe any time — see our privacy policy.

Stuck on this in your own test suite?

I take on fixed-price, fixed-turnaround performance work — script migrations, HAR-to-script conversion and written performance audits. No calls required.

Get in Touch