[JIRA] (JENKINS-56376) remoting kakfa plugin creates too many threads and takes too much cpu time

6 views
Skip to first unread message

federicon@al.com.au (JIRA)

unread,
Mar 3, 2019, 8:52:03 PM3/3/19
to jenkinsc...@googlegroups.com
Federico Naum created an issue
 
Jenkins / Bug JENKINS-56376
remoting kakfa plugin creates too many threads and takes too much cpu time
Issue Type: Bug Bug
Assignee: Pham Vu Tuan
Components: remoting-kafka-plugin
Created: 2019-03-04 01:51
Environment: Jenkins-2.165
remoting-kafka-1.1.3
Priority: Major Major
Reporter: Federico Naum

Only discovered when I moved to the production environment that the server and client side of this plugin are taking too much user CPU time. I think it is because the large number of threads (hopefully unnecessary) it spawns. Also, it might be consuming unnecessary memory.

In the agent side, even when there are no jobs assigned it consumes a full cpu, and create about 30-40 threads. A naive thought is telling me that we should open as many threads as the number of executors the agent is configured with.

On the server side, when I have about 8-10 kafka agent nodes it takes ~7 cpus (of my 8 cores), with kafka Channel reader threads that are opened for the agents.
In addition to the 54 threads that are created for the kafka-producer-network thread
In my test Jenkins instance, I observed the creation of 900+ threads

I tested with the inside the docker container that is provided with the plugin and also observed it creates a high number of threads.

I'll upload some screenshots.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

federicon@al.com.au (JIRA)

unread,
Mar 4, 2019, 12:18:02 AM3/4/19
to jenkinsc...@googlegroups.com
Federico Naum commented on Bug JENKINS-56376
 
Re: remoting kakfa plugin creates too many threads and takes too much cpu time

Won't be able to upload the screenshots until Wed. (some issue with the firewall) I 'll see If I can get around it.
But just installing the monitoring plugin and then ordering by cpu time you'll those Channel reader threads chewing all the juice

federicon@al.com.au (JIRA)

unread,
Mar 10, 2019, 8:26:02 PM3/10/19
to jenkinsc...@googlegroups.com

federicon@al.com.au (JIRA)

unread,
Mar 10, 2019, 8:27:02 PM3/10/19
to jenkinsc...@googlegroups.com

federicon@al.com.au (JIRA)

unread,
Mar 10, 2019, 11:21:02 PM3/10/19
to jenkinsc...@googlegroups.com
Federico Naum updated an issue
Change By: Federico Naum
Attachment: ChannelReaderThreads_prouction_instance.png

federicon@al.com.au (JIRA)

unread,
Mar 10, 2019, 11:22:02 PM3/10/19
to jenkinsc...@googlegroups.com
Federico Naum updated an issue
Change By: Federico Naum
Attachment: HighCPUUsage_production_instance.png

federicon@al.com.au (JIRA)

unread,
Mar 10, 2019, 11:22:02 PM3/10/19
to jenkinsc...@googlegroups.com
Federico Naum updated an issue
Change By: Federico Naum
Attachment: ChannelReaderThreads_test_instance.png

federicon@al.com.au (JIRA)

unread,
Mar 10, 2019, 11:22:02 PM3/10/19
to jenkinsc...@googlegroups.com
Federico Naum updated an issue
Change By: Federico Naum
Attachment: HighCPUUsage_test_instance.png

federicon@al.com.au (JIRA)

unread,
Mar 10, 2019, 11:24:02 PM3/10/19
to jenkinsc...@googlegroups.com
Federico Naum updated an issue
Change By: Federico Naum
Attachment: ProducerThreads_test_instance_900_threads.png

phamvutuan10@gmail.com (JIRA)

unread,
Mar 20, 2019, 9:59:02 AM3/20/19
to jenkinsc...@googlegroups.com
Pham Vu Tuan started work on Bug JENKINS-56376
 
Change By: Pham Vu Tuan
Status: Open In Progress

federicon@al.com.au (JIRA)

unread,
Jul 11, 2019, 8:10:04 AM7/11/19
to jenkinsc...@googlegroups.com
 
Re: remoting kakfa plugin creates too many threads and takes too much cpu time

Hi Pham Vu Tuan was there any progress with this? or should be moved to On Hold?

phamvutuan10@gmail.com (JIRA)

unread,
Jul 11, 2019, 11:11:02 AM7/11/19
to jenkinsc...@googlegroups.com

Hi Federico Naum, sorry for the delay, I haven't found a suitable time slot to work on this yet, this can be considered "On Hold" at this moment. Sorry for any convinience caused, I will inform you as soon as this get fixed.

federicon@al.com.au (JIRA)

unread,
Jul 11, 2019, 7:40:01 PM7/11/19
to jenkinsc...@googlegroups.com

mayur.kumar@lloydsbanking.com (JIRA)

unread,
Mar 30, 2020, 7:53:02 AM3/30/20
to jenkinsc...@googlegroups.com

Hi Pham Vu Tuan,

 

We have a disconnection issue over TCP and were looking at this plugin as a potential solution to the issue. Are there any plans on for fixing this issue, or is there anyone currently working on it?

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages