Asynchronous Logging Thread for Application Performance
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Critical software applications face performance issues due to the high cost of input/output mechanisms, which hinder logging and thus the detection and correction of malfunctions, especially in parallel processing environments where response times are constrained.
Innovation Solution
A logging method that involves executing application and logging threads over a cluster of information processing devices, using asynchronous communication interfaces like ZeroMQ to transmit and publish logging information efficiently, minimizing the impact on processing time and allowing for synchronization to prevent data loss.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If logging is implemented in critical software applications, then malfunction detection capability is improved, but processing time and application performance deteriorate
Solution Approach 1:
The logging function is segmented into a separate dedicated thread that operates independently from the main application threads. This segmentation allows logging operations to be performed without blocking the critical application logic, thereby maintaining processing time while enabling malfunction detection through separate logging thread execution.
Solution Approach 2:
A logging thread acts as an intermediary between application threads and the logging output mechanism. Application threads transmit logging information to the logging thread, which then handles the costly I/O operations. This intermediary approach isolates the performance impact of logging from the critical application paths.
2Productivity
If parallel programming techniques are used to handle large quantities of calculations, then processing capacity is improved, but logging complexity increases
Solution Approach 1:
The logging thread is designed as a universal component that can serve multiple application threads simultaneously. It provides a common logging interface and handles logging for all parallel threads through a unified mechanism, thereby managing logging complexity centrally while supporting parallel processing capacity.
Solution Approach 2:
The logging thread serves as a mediator that centralizes logging operations for all parallel application threads. Instead of each thread implementing its own logging logic, the intermediary logging thread manages all logging requests, simplifying the overall logging architecture despite the complexity of parallel processing.
3Loss of information
If input/output mechanisms are used for logging, then information export capability is improved, but processing overhead increases
Solution Approach 1:
The expensive I/O operations are extracted from the critical application threads and performed exclusively by the dedicated logging thread. This extraction isolates the processing overhead of information export to a non-critical path, allowing efficient logging without impacting the main application performance.
Solution Approach 2:
Logging information is prepared and transmitted to the logging thread in advance of the actual I/O operations. The application threads perform preliminary actions of generating and sending log data, while the logging thread handles the costly export operations, thereby separating information preparation from information export overhead.
Data Source
AI summary
Some embodiments are directed to a logging within a software application executed over an assembly of information processing devices. More particularly, some embodiments relate to a method allowing process logging in the case of a software application operating with several processes and/or threads.
