Redo Log Buffer Throttling for User-Priority Database Writes
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In database servers, when in-memory log buffers cannot write to disk fast enough, the redo log becomes full, blocking savepoints and hindering performance by slowing down user operations due to pending log entries.
Innovation Solution
Implement a system that detects when the redo log is full and prioritizes user operations over mass operations by delaying the execution of mass operations until the log buffer is available, using a throttle flag to manage log buffer switching and log entry writing.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If log buffers write to disk continuously, then data consistency is maintained, but user operations are blocked when the redo log is full
Solution Approach 1:
The patent divides the log buffer management into multiple segments (log buffers in a ring list) and introduces a throttle mechanism that segments operations into user operations and mass operations. When the redo log is full, only user operations are processed while mass operations are delayed, preventing complete blocking while maintaining data consistency through controlled segmentation of operation types.
Solution Approach 2:
The patent changes the parameter of operation priority by introducing a throttle mass modification flag that dynamically adjusts which operations are processed. When the redo log buffer is full, the flag switches to prioritize user operations over mass operations, changing the operational parameters from equal treatment to differentiated priority based on operation type.
2Productivity
If mass operations are executed immediately, then system throughput is maximized, but user operations experience lag when the redo log is full
Solution Approach 1:
The patent introduces dynamic adjustment of operation execution based on redo log buffer status. The throttle mass modification flag dynamically switches between allowing mass operations and delaying them, creating a flexible system that adapts to current buffer conditions rather than following a fixed execution order, thereby balancing throughput and user responsiveness.
Solution Approach 2:
The patent implements a feedback mechanism where the system continuously monitors the redo log buffer fullness and adjusts mass operation execution accordingly. When the buffer is full, the feedback loop delays mass operations; when space is available, normal execution resumes, creating a self-regulating system that prevents user operation lag while maintaining overall throughput.
3Quantity of substance
If the redo log buffer size is increased, then more log entries can be stored, but memory usage increases and other operations are hindered
Solution Approach 1:
The patent segments the log buffer into multiple smaller buffers arranged in a ring list structure rather than using a single large buffer. This segmentation provides multiple write targets for log entries while maintaining manageable memory allocation for each individual buffer, reducing the complexity of managing a single large buffer while increasing overall capacity.
Solution Approach 2:
The patent pre-allocates multiple log buffers in a ring list structure before operations occur, preparing multiple write targets in advance. This preliminary arrangement allows the system to switch between buffers efficiently without dynamic allocation complexity during operation execution, increasing capacity while maintaining manageable memory structure.
Data Source
AI summary
Some embodiments provide a non-transitory machine-readable medium that stores a program to write a redo log for operations performed to modify data within a database. The program sets a throttle mass modification flag when a ring list of log buffers is full and unable to write an additional log entry at this point in time. When the throttle mass modification flag is set, the writing of the redo log for mass operations is blocked or delayed, thereby reducing the delay experienced when writing user operations into the redo log. This can improve the user experience.


