[GSoC] Add missing IO instrumentation for Server Logging (Observer Effect)#15
Open
shinsj4653 wants to merge 1 commit intoNikolayS:claude/cpu-asterisk-wait-events-01CyiYYMMcFMovuqPqLNcp8Tfrom
Conversation
Documents the "Observer Effect" occurring during heavy logging scenarios where uninstrumented write() calls to stderr or the syslogger pipe cause backends to appear as consuming CPU (wait_event IS NULL). - Added section 1.5 to track this missing instrumentation in elog.c (write_console and write_pipe_chunks). - Marked as resolved, as a PoC patch introducing WaitEventIO:LogFileWrite has been developed and submitted to the mentors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Added & Resolved: Logging Observer Effect (Uninstrumented I/O)
Hi @NikolayS,
Following up on your suggestion to investigate the "Observer Effect" during heavy logging, I noticed this specific gap wasn't documented in the current
WAIT_EVENTS_ANALYSIS.md.What I did:
log_statement='all',logging_collector=on), backend processes hit significant I/O bottlenecks onwrite()system calls. Due to the lack of instrumentation, this appeared aswait_event IS NULLinpg_stat_activity, disguising I/O waits as active CPU time.WaitEventIO:LogFileWriteevent and instrumented thewrite_pipe_chunksandwrite_consolefunctions inelog.c.1.5 Server Logging Operationssection to your analysis and marked it as resolved.I will send the actual
.patchfile and the proof screenshot (showing the newly addedLogFileWriteevent in action) to thegsoc-mentorsmailing list so you and Kirk can review the code.