Logging Tool Serializes Formatting Instructions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional event loggers incur significant CPU utilization due to inefficient formatting of data elements and formatting instructions, which is wasteful as most recorded events are never reviewed, especially when using functions like printf(), and this inefficiency is exacerbated by the need to store logs in memory for improved system performance.

Innovation Solution

A logging tool that serializes formatting instructions and associated data arguments directly to a buffer without formatting, allowing for efficient recording and later deserialization into a human-readable format, reducing CPU usage and optimizing memory storage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If conventional print functions (e.g., printf) are used to format and record events, then the logging functionality is achieved, but CPU utilization increases significantly (up to 15%) due to parsing and formatting operations

Engineering Contradiction:
Improvelogging functionalityVSAvoidCPU utilization
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts the formatting instructions and data elements from the conventional printf function call and passes them directly to the event logger, separating the formatting operation from the logging operation. This allows the logging system to process only essential data without the overhead of text formatting, thereby reducing CPU utilization while maintaining logging functionality.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

Instead of the traditional approach where data is formatted into a string and then logged, the patent inverts the process by logging the raw data elements and formatting instructions separately, and only formatting them when necessary for display or analysis. This reversal eliminates unnecessary formatting operations during the logging phase, significantly reducing CPU usage.

Inventive Principle:
Principle #13The other way round (Inversion)

2Ease of operation

If data elements are formatted into strings before logging, then the logging process is simplified, but system performance deteriorates due to the computational overhead of formatting operations

Engineering Contradiction:
Improvelogging process simplicityVSAvoidsystem performance
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent segments the logging process into distinct components: data element collection, formatting instruction processing, and optional formatting output. By dividing the process this way, the system can log data efficiently in raw form while maintaining the option to format for display, thus simplifying the core logging operation while preserving formatting capability when needed.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary layer between data collection and final output that handles formatting instructions separately. This intermediary processes formatting requirements only when necessary, allowing the main logging pipeline to operate efficiently on raw data while still producing formatted output when required, thereby maintaining both simplicity and performance.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Speed

If formatted strings are stored in memory buffers, then logging speed is improved compared to disk recording, but memory usage increases and CPU cycles are wasted on formatting operations that may never be reviewed

Engineering Contradiction:
Improvelogging speedVSAvoidwasted CPU cycles
Core Design Contradiction:
SpeedVSLoss of energy

Solution Approach 1:

The patent performs preliminary actions by collecting and validating data elements and formatting instructions during the logging phase without executing the formatting operation. The raw data is prepared and stored in memory buffers in an optimized structure that enables fast logging, while formatting is deferred until actually needed for display or analysis, preventing wasted CPU cycles on unreviewed logs.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent changes the parameter state of logged data from formatted strings to structured raw data elements with associated formatting instructions. This parameter change allows the system to store data in a more efficient format that enables faster logging operations while reducing memory bandwidth consumption, and only applies formatting transformations when actually needed, thereby reducing wasted CPU cycles.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS9952959B2Variadic argument serialization of process events
Publication Date: 2018.04.24 RED HAT INC
  • US9952959B2 patent drawing
  • US9952959B2 patent drawing
  • US9952959B2 patent drawing

AI summary

A logging tool running on a computing device serializes system and application events. The logging tool analyzes a logging stream from a process to identify if the logging stream includes a formatting instruction. The logging tool identifies at least one argument associated with the formatting instruction, and serializes the formatting instruction and the at least one argument by recording, to a buffer, the formatting instruction and the at least one argument without formatting the logging stream.