Jonas
Jonas

Reputation: 61

High CPU usage of jenkins without running a job

The problem is this: I have observed, that the CPU usage is 100% while running a build. The builds duration is ca. 2 hours. If the build ends the usage of jenkins is still 80-85%. After this I restart the jenkins service. The CPU usage was 5%. I started the same build and its duration was 38 minutes. While running the build, the usage was 100%, but for this task it is okay if the duration is 38minutes. For 7 clock this morning the CPU usage is 80% again. I don't start a build at this time. If I build the project its duration is 2h already. In this projects are 3 jobs. The duration of the others are 20-25 minutes.

Maybe someone can find the Problem. Tell me, if some information are necessary.

Jenkins version: 1.590 Server: Windows 7 , 32bit

Upvotes: 5

Views: 7079

Answers (2)

funny_head
funny_head

Reputation: 101

In my case, it was the 'Asynchronous resource disposer' plugin/feature used by Jenkins to cleanup resources. The Asynchronous resource disposer was not able cleanup the workspace leaving behind heap of directories similar to 'JOB_NAME_ws-cleanup_1599802799143'. When I stopped the Disposer to track the orphan workspaces(which were around 20) the CPU usage came back to normal. You will find this option under, 'Manage Jenkins' -> 'There are resources Jenkins was not able to dispose automatically. Click Manage' -> Stop tracking. Off-course, the permanent solution was to fix Workspace Cleanup Plugin to successfully delete the workspaces. Ref- Why is Jenkins suddenly unable to delete a workspace

Upvotes: 2

Jonas
Jonas

Reputation: 61

I've solve the problem. The problem was my antivirus program. I uninstalled it and the usage is the whole day 0-1%.

Upvotes: 1

Related Questions