2

My Jenkins slaves are online. It's the response time showing in node list that puzzles me how the response time is calculated. Some response time is higher than 18000ms. some is normal around 50-60ms. I ping'ed from the slave server to jenkins master. The result is normal and never be like higher than 18000ms. I need to display the slave response time to our system users so that they can at least know their network status quo, network performance, now the bizzare ping result is far different lower than the response time showing in jenkins ndoe list.

  1. Can someone explain me how that response time is calculated ?
  2. Or can someone direct me to the source code jenkins slave response time is calculated, is it different from ping ?
Gabriel Wu
  • 1,938
  • 18
  • 30
  • 1
    It's called controller and agent now. [ResponseTimeMonitor](https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/node_monitors/ResponseTimeMonitor.java) – Ian W Apr 30 '22 at 10:45
  • In the source code it says "Monitors the round-trip response time to this agent.". Is it equivalent as "ping from agent to jenkins controller and controller to agent" ? – Gabriel Wu May 02 '22 at 23:23
  • Seems analogous; I cant answer for sure, but posting at [Jenkins Community](https://community.jenkins.io/latest), may get you an answer from one of the contributors. This being controller code, it reads controller to each agent and back. – Ian W May 03 '22 at 04:54
  • but the reality is the result from "ping" is much much lower than the result jenkins itself gets. @IanW – Gabriel Wu May 06 '22 at 06:32
  • Well, Jenkins has an application stack, so if you are measuring the response time, that should be the response time for the application call, not the raw ping value. Seems reasonable to me. – Ian W May 06 '22 at 06:41
  • @GabrielWu Please check the latest answer. – Prasad Tamgale May 13 '22 at 06:16

1 Answers1

2
  1. Can someone explain me how that response time is calculated ?
  2. Or can someone direct me to the source code jenkins slave response time is calculated, is it different from ping ?

The response time is different from a normal ping time.

  • Ping is the latency between two nodes for the data to travel.
  • Worker response time is the time to get a response to a command sent from the controller (earlier called master) to a worker (earlier called slave) which goes through the Jenkins remoting layer.
    Thus, it is a kind of ping through the remoting layer.

Why response time is shown high?

Jenkins has a set time period in which it checks for the response time with workers.
Now, if this time overlapped with the time when the worker is running intensive operations then the response to the commands might be delayed.
You can use the "Refresh status" button on http:///computer to calculate this time on-demand & check.

Prasad Tamgale
  • 325
  • 1
  • 12