Repository navigation
Description
Channel already keeps some rudimentary statistics about class loading (classLoadingCount and so on), which can give insight into slow initial builds. But there are many cases where we suspect that a performance or reliability problem is ultimately due to excessive traffic on the channel, yet cannot prove this except via the crude tool of a network traffic analyzer, and have no visibility into which features (plugins) are responsible and whether the traffic is really necessary.
Propose that we add some more statistics (counts, mean, median, standard deviation) maintained per Channel for each of the three types of Request/Response.
- For ProxyInputStream/ProxyOutputStream, record number of pipes opened and closed in each direction, and bytes sent on them. Ideally we would like to get some information about what code opened the stream, though I am not sure how to aggregate this well, since stack traces are too variable.
- For RPCRequest, record the implementation class name of the proxied object, perhaps the method name/signature being called, the number of calls, their duration, the byte size of the request, the byte size of the response.
- For UserRequest, record the implementation class name of the Callable (or delegate of a FileCallableWrapper), number of calls, duration, byte sizes of request and response.
These statistics could be reported in various places:
- Slave system information page.
- support-core bundles. (Of course aggregate data across channels should be recorded, so it is still available after slave disconnections.)
- metrics data.
Originally reported by
jglick, imported from: Request/response statistics
- assignee:
jglick
- status: Resolved
- priority: Major
- component(s): core, remoting
- label(s): diagnostics, performance, remoting
- resolution: Fixed
- resolved: 2018-02-17T09:38:25+00:00
- votes: 2
- watchers: 4
- imported: 2025-11-24
Raw content of original issue
Channel already keeps some rudimentary statistics about class loading (classLoadingCount and so on), which can give insight into slow initial builds. But there are many cases where we suspect that a performance or reliability problem is ultimately due to excessive traffic on the channel, yet cannot prove this except via the crude tool of a network traffic analyzer, and have no visibility into which features (plugins) are responsible and whether the traffic is really necessary.
Propose that we add some more statistics (counts, mean, median, standard deviation) maintained per Channel for each of the three types of Request/Response.
- For ProxyInputStream/ProxyOutputStream, record number of pipes opened and closed in each direction, and bytes sent on them. Ideally we would like to get some information about what code opened the stream, though I am not sure how to aggregate this well, since stack traces are too variable.
- For RPCRequest, record the implementation class name of the proxied object, perhaps the method name/signature being called, the number of calls, their duration, the byte size of the request, the byte size of the response.
- For UserRequest, record the implementation class name of the Callable (or delegate of a FileCallableWrapper), number of calls, duration, byte sizes of request and response.
These statistics could be reported in various places:
- Slave system information page.
- support-core bundles. (Of course aggregate data across channels should be recorded, so it is still available after slave disconnections.)
- metrics data.
Activity
jenkins-infra-bot commentedon Feb 19, 2015
Remote links associated with this issue:
jenkins-infra-bot commentedon Feb 1, 2016
Raw content of original comment:
Wireshark plugin or other detailed diagnostics would be good too.
jenkins-infra-bot commentedon Feb 22, 2017
Raw content of original comment:
+1 for the Wireshark plugin, but we cannot easily do it with Encrypted protocols like JNLP4. BTW we still can extract some data
jenkins-infra-bot commentedon Oct 10, 2017
Raw content of original comment:
Implemented raw event gathering infrastructure; initially the information is only available as a logger.
jenkins-infra-bot commentedon Dec 5, 2017
Raw content of original comment:
Might also be useful to introduce a utility in jenkins-test-harness which would allow you to assert that a given (little-W) workflow run on an agent transfers at most a given number of packets, at most a given total size, includes only the specified packet types, etc. For example, proof of the effectiveness of
JENKINS-38381could include a test that no packets are being transmitted during the course of a long-running sh step.jenkins-infra-bot commentedon Dec 18, 2017
Raw content of original comment:
Have a proposed integration in support-core which seems interesting enough to justify the API. The listener could certainly tally more detailed information, and/or present the results more compellingly, but I wanted to keep the scope small for now; other people may want to refine it now that the plumbing is in place.
jenkins-infra-bot commentedon Feb 6, 2018
Raw content of original comment:
Code changed in jenkins
User: Jesse Glick
Path:
core/src/main/java/hudson/FilePath.java
core/src/main/java/hudson/slaves/SlaveComputer.java
pom.xml
test/src/test/java/hudson/bugs/JnlpAccessWithSecuredHudsonTest.java
test/src/test/java/jenkins/security/Security218Test.java
test/src/test/java/jenkins/security/s2m/DefaultFilePathFilterTest.java
http://jenkins-ci.org/commit/jenkins/f4b78921e87c0a265c633674bc3ca3ec0458c19a
Log:
JENKINS-27035Gathering command read/write events (#3071)jenkins-infra-bot commentedon Feb 6, 2018
Raw content of original comment:
Merged towards 2.106
I will update the changelog entries
jenkins-infra-bot commentedon Feb 17, 2018
Raw content of original comment:
It has been released in Remoting 3.17 and Jenkins 2.106
jenkins-infra-bot commentedon Mar 14, 2018
Raw content of original comment:
Code changed in jenkins
User: Owen Wood
Path:
Jenkinsfile
pom.xml
src/main/java/com/cloudbees/jenkins/support/impl/SlaveCommandStatistics.java
src/test/java/com/cloudbees/jenkins/support/impl/SlaveCommandStatisticsTest.java
http://jenkins-ci.org/commit/support-core-plugin/299ed0983c66c315ff99f6c8917599f16d9577c8
Log:
Merge pull request #128 from jglick/CommandListener-
JENKINS-27035JENKINS-27035Tallying command read/write eventsCompare: jenkinsci/support-core-plugin@5eb8193...299ed09
jenkins-infra-bot commentedon Mar 14, 2018
Raw content of original comment:
Released in support-core:2.46
jenkins-infra-bot commentedon Nov 24, 2025
[Original
epicfrom Jira: JENKINS-46154]