Skip to content

[JENKINS-52165] Use push rather than pull for durable task logging #615

Description

@jenkins-infra-bot

Retroactively filing an issue originally treated as part of JENKINS-38381">JENKINS-38381, since it is independently mergeable and has some independent benefits even when using existing (per-step, master-based) log storage.

Historically, when running durable tasks (sh and kin), running output was handled by having the master send a callable to the agent at intervals, initially short (¼s) but growing exponentially up to some maximum (15s) if the process seems to be idle, and resetting to short again if and when fresh output is detected.

Not only is there up to a 15s delay in displaying new output, this is wasteful of master and network resources when the process is idle for a long time; and sending a UserRequest and corresponding response involves a fair amount of Java serialization.

By contrast, non-durable processes (such as those created by Launcher in a freestyle build) use RemoteOutputStream to send content from the agent to master as soon as it is available, minimizing network traffic; Remoting is also able to optimize this kind of traffic by sending low-overhead Chunk packets of tailored sizes.

Durable tasks should switch from the policy of pulling log output to having the agent push log output. The content cannot be detected immediately, since we are effectively tailing a log file, but it can be detected quickly after the log file is updated with minimal overhead.


Originally reported by jglick, imported from: Use push rather than pull for durable task logging
  • assignee: jglick
  • status: Reopened
  • priority: Major
  • component(s): durable-task-plugin, workflow-durable-task-step-plugin
  • label(s): performance, remoting
  • resolution: Unresolved
  • votes: 5
  • watchers: 12
  • imported: 2025-12-09
Raw content of original issue

Retroactively filing an issue originally treated as part of JENKINS-38381, since it is independently mergeable and has some independent benefits even when using existing (per-step, master-based) log storage.

Historically, when running durable tasks (sh and kin), running output was handled by having the master send a callable to the agent at intervals, initially short (¼s) but growing exponentially up to some maximum (15s) if the process seems to be idle, and resetting to short again if and when fresh output is detected.

Not only is there up to a 15s delay in displaying new output, this is wasteful of master and network resources when the process is idle for a long time; and sending a UserRequest and corresponding response involves a fair amount of Java serialization.

By contrast, non-durable processes (such as those created by Launcher in a freestyle build) use RemoteOutputStream to send content from the agent to master as soon as it is available, minimizing network traffic; Remoting is also able to optimize this kind of traffic by sending low-overhead Chunk packets of tailored sizes.

Durable tasks should switch from the policy of pulling log output to having the agent push log output. The content cannot be detected immediately, since we are effectively tailing a log file, but it can be detected quickly after the log file is updated with minimal overhead.

Activity

  1. jenkins-infra-bot commented on Jun 25, 2018

    @jenkins-infra-bot
    Author
  2. jenkins-infra-bot commented on Jun 25, 2018

    @jenkins-infra-bot
    Author
    jglick:

    This change supersedes the code affected by JENKINS-37575">JENKINS-37575.

  3. jenkins-infra-bot commented on Sep 25, 2018

    @jenkins-infra-bot
    Author
    dnusbaum:
    • Original comment link
    • Raw content of original comment:

      Released in Durable Task version 1.26 and Pipeline Nodes and Processes 2.22.

    Released in Durable Task version 1.26 and Pipeline Nodes and Processes 2.22.

  4. jenkins-infra-bot commented on Oct 24, 2018

    @jenkins-infra-bot
    Author
    jglick:
    • Original comment link
    • Raw content of original comment:

      Disabling this mode in workflow-durable-task-step 2.25 until some reported issues can be tracked down and fixed.

    Disabling this mode in workflow-durable-task-step 2.25 until some reported issues can be tracked down and fixed.

  5. jenkins-infra-bot commented on Mar 18, 2022

    @jenkins-infra-bot
    Author
    basil:
    • Original comment link
    • Raw content of original comment:

      The experimental (newer) push mode reliably hangs when running on Java 17 in the context of the workflow-durable-task-step-plugin test suite (see JENKINS-68080). The default (older) pull mode passes on Java 17 in the same test suite.

    The experimental (newer) push mode reliably hangs when running on Java 17 in the context of the workflow-durable-task-step-plugin test suite (see JENKINS-68080">JENKINS-68080). The default (older) pull mode passes on Java 17 in the same test suite.

  6. jenkins-infra-bot commented on Dec 9, 2025

    @jenkins-infra-bot
    Author

    [Original depends_on from Jira: JENKINS-71509]

  7. jenkins-infra-bot commented on Dec 9, 2025

    @jenkins-infra-bot
    Author

    [Original blocks from Jira: JENKINS-38381]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions