Parallel Log Write Coordination for Database Throughput
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Database management systems and journaling file systems face performance bottlenecks due to the critical nature of log writes in transaction commit operations, which can be inefficient and lead to data corruption during system crashes.
Innovation Solution
Implementing a system that allows multiple log write processes to perform parallel writes to a single log file, utilizing a coordinator and worker processes to distribute the load across multiple CPUs, enabling pipelining and size regulation to optimize log write throughput.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If multiple log write processes perform parallel writes to a single log file, then log write throughput increases and CPU load is distributed, but log management complexity increases
Solution Approach 1:
The log write operation is segmented into multiple parallel processes, each handling a portion of the log data. The coordinator process divides the workload and assigns it to worker processes, enabling parallel writes to different segments of the log file while maintaining overall system coordination.
Solution Approach 2:
A coordinator process acts as an intermediary between the system and multiple worker processes. The coordinator manages the parallel write operations by distributing tasks to workers and consolidating results, thereby managing the complexity of parallel operations without exposing it to external systems.
2Productivity
If multiple processes write to a single log file, then CPU utilization improves, but ensuring chronological order and log format compatibility becomes more difficult
Solution Approach 1:
The coordinator process performs preliminary actions by pre-planning the write operations and assigning specific segments to worker processes. This ensures that all workers write to their designated portions simultaneously, maintaining chronological order and format consistency without requiring post-processing sorting.
Solution Approach 2:
Each worker process is assigned to write to a specific local segment of the log file with defined boundaries. This local quality approach ensures that each process writes to its designated area without interfering with others, maintaining overall log format consistency while enabling parallel operations.
3Reliability
If log writes are performed in the critical path of transaction commit, then data integrity is ensured, but system performance becomes bottlenecked
Solution Approach 1:
The log write operation is segmented into multiple parallel processes, each handling a portion of the log data. The coordinator process divides the workload and assigns it to worker processes, enabling parallel writes to different segments of the log file while maintaining overall system coordination.
Solution Approach 2:
Multiple worker processes continuously perform log writes in parallel, ensuring that the critical path operation continues without interruption. By distributing the workload across multiple processes working simultaneously, the system maintains data integrity while eliminating the single-process bottleneck.
Data Source
AI summary
Techniques are provided for managing cached data objects in a mixed workload environment. In an embodiment, a system, log data is stored in one or more buffers. In response to receiving a request to perform a logical write, a first process writes a first portion of the log data to a log file in persistent storage. While the first portion of the log data is being written to the log file, a second process writes a second portion of the log data in the one or more buffers to the log file in persistent storage. In another embodiment, a request to perform a second logical write may be received before the first logical write completes. While the first log data is being written to the log file, one or more processes write second log data for the second logical write to the log file.


