Database Workload Capture and Replay for Testing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current testing approaches for database systems fail to accurately replicate the workload of production environments in test systems, leading to inadequate validation of changes before implementation in production, as they either stress the system minimally or are random and non-deterministic.
Innovation Solution
A method and apparatus that capture and replay the workload from a production database server to a test database server, allowing the test system to experience the same workload as the production system, using capture processes to record and replay workload units in a non-real-time, out-of-line manner, ensuring transactional consistency and preserving the integrity of the workload.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If test scripts are written to test commonly executed code paths, then functional testing and regression testing can be performed, but the testing system is stressed only to a very minimal extent and does not mimic production workload
Solution Approach 1:
The patent captures actual production workload and creates a copy to be replayed on the test system. This copying approach allows the test system to experience the same workload patterns as production without requiring human users to manually replicate those patterns, thereby achieving both accurate validation and appropriate system stress.
2Productivity
If human users are asked to use the test system as though it were a production system, then workload can be generated, but the approach is very random and non-deterministic and often fails to reproduce actual production load patterns
Solution Approach 1:
Instead of relying on human users to generate workload, the system captures actual production workload and copies it to the test environment. This eliminates the randomness and non-deterministic nature of manual testing while preserving the exact workload patterns from production.
Solution Approach 2:
The system performs preliminary capture of production workload before testing begins. This preliminary action stores the actual workload patterns that will later be replayed on the test system, ensuring that the testing phase uses authentic production-like workload rather than manually generated patterns.
3Reliability
If workload is captured and replayed in a non-real-time, out-of-line manner, then transactional consistency can be ensured, but the replay process requires additional processing time and infrastructure
Solution Approach 1:
The patent divides the workload capture and replay process into separate segments: capture phase, processing phase, and replay phase. This segmentation allows each phase to be optimized independently, with the processing phase preparing workload for replay while the replay phase focuses on maintaining transactional consistency through coordinated access to captured workload data.
Data Source
Figure 1
Figure 2
AI summary
A method and apparatus for capturing database system workload and replaying that workload in a database system is provided. According to one aspect, in order to subject a test database system to the same workload to which the production database system actually would be subjected, a database server in the production system captures and records workload that the database server receives from external entities. This captured workload is processed. Processes external to a database server in the test database system send the processed workload to that database server. As a result, the test database system is subjected to the same workload to which the production database system originally was subjected. The foregoing technique permits a database administrator to determine how the production database system will fare if the difference that is present in the test database system is introduced into the production database system.