This repository was archived by the owner on Jan 22, 2025. It is now read-only.
This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Writing to Log Blocks Other Operations #10368
Closed
Description
Problem
Writing to the log blocks other validator operations.
In Discord, I asked "Q: Does writing to the log file block any other threads/procedures within the validator?" and Leo replied "Logging does block. interesting. it's a synchronous write to a fd."
When the log level is low (info or debug), the amount of data written to the logs might interfere with block production on a busy validator.
Proposed Solution
Move the logger to an asynchronous thread.
If that is not possible, review the amount of data written to the logs and the log level for each. A busy validator should be able to run a log level of 'error' or 'warn' without a performance hit.