Re: Any where from the Run object to find out how much CPU the job is consuming?

2021-03-30 Thread Basil Crow
On Tue, Mar 30, 2021 at 1:21 PM Michael Carter
 wrote:
>
> Which of course causes a lot of CPU usage on the master due to the frequent 
> lookups to the identical username/password.

I suppose you have already concluded that the high CPU usage is caused
by the abovementioned credential lookups. But in case you (or anyone
else) are still investigating other possible causes of high CPU usage,
I have had great success with generating flame graphs from Jenkins
controller Java processes using
https://github.com/jvm-profiling-tools/async-profiler. It's pretty
fascinating to look at the flame graph for a minute or so of execution
of even a healthy Jenkins controller: you get a sense of what your
workload typically looks like and therefore develop a baseline against
which to analyze pathological performance later on. It's even more
fascinating to look at the flame graph for Jenkins initialization,
especially on a busy controller.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAFwNDjqdKGBMbPoEugZaU6fq4txqDqJa4MZSdcv2oSdkx6%2Bx8Q%40mail.gmail.com.


Re: Any where from the Run object to find out how much CPU the job is consuming?

2021-03-30 Thread Jesse Glick
This is not really possible. There is
https://github.com/jenkinsci/workflow-cps-plugin/blob/f522e783e917bc0aa0513a29684285b710163905/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java#L357-L387
(which is *not* an API you may use from another plugin) but the `run`
timing measures only CPS VM thread usage, not aggregate time used by steps
invoked *from* that thread, and certainly not memory usage however one
might define that (a complex topic).

You might have better success detecting and warning about dumb idioms. Not
necessarily with a plugin.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1JOgdn_rz8OsCMVXqTLf2kxOjQ%3DoGxyXvBCat3txSRUQ%40mail.gmail.com.


Re: Any where from the Run object to find out how much CPU the job is consuming?

2021-03-30 Thread Michael Carter
Guess I should have added more context.  

I have users adding this type of code to their pipeline scripts.

loop {
  retry(10) {
 withCredetials {
 ... some code. that takes about 10ms. or less
 }
  }
}

Which of course causes a lot of CPU usage on the master due to the frequent 
lookups to the identical username/password.What I'm looking is there a 
way from inside Jenkins https://javadoc.jenkins-ci.org/hudson/model/Run.html to 
get at how much CPU/Memory the Pipeline Job is used during it's run?

I want to write a Jenkins Plugin (Like an Action Badge or something) to 
report on it to screen and save to an external audit DB.  But I first must 
get the resource usage from inside Jenkins somehow.

Hence the question can I get to it somehow from 
https://javadoc.jenkins-ci.org/hudson/model/Run.html or do I have to hook 
into the onStarted/onCompleted triggers with some sort of monitor?
On Tuesday, March 30, 2021 at 3:38:03 PM UTC-4 Jesse wrote:

> Run `jstack`? Not sure what this plugin is or how it relates to diagnosing 
> high CPU usage.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/f469a2b6-18d5-4351-bd4a-19b642479647n%40googlegroups.com.


Re: Any where from the Run object to find out how much CPU the job is consuming?

2021-03-30 Thread Jesse Glick
Run `jstack`? Not sure what this plugin is or how it relates to diagnosing
high CPU usage.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2jOwOCn9iMA0oO34jT%2BHZcehJWMD_41y%3D%2BGCpx24y09w%40mail.gmail.com.


Any where from the Run object to find out how much CPU the job is consuming?

2021-03-30 Thread Michael Carter
Basically the use case.

We've got a few jobs doing:

loop {
  retry(10) {
 withCredetials {
 ... some code. that takes about 10ms. or less
 }
  }
}

It's eating up 100% CPU on the master.   I suspect we have other(s)/cases 
of people doing things like this and I'm trying to add a way to detect the 
high CPU usage via my plugin.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/b79274ed-e0d3-4503-aa4d-a245e15def6en%40googlegroups.com.


Re: Maintainers/owners of github.com/jenkinsci/js-libs

2021-03-30 Thread Tom Fennelly
Hey Oleg.

Yes, let's put up for adoption anything that should be adopted and I
suppose we should delete/remove/deprecate/whatever the ones that are dead.

Based on yesterday's permissions PR
,
it seems like the list is very short:

   1. uithemes/uithemes-processor
   2. uithemes/uithemes-pom

I guess it needs to be established whether or not these plugins are in use
at all?

Regards,

Tom.




On Tue, 30 Mar 2021 at 11:13, Oleg Nenashev  wrote:

> Hi Tom,
>
> Thanks a lot for the update! And what about other components? If you are a
> sole maintainer, would you like to put them for adoption?
>
> Best wishes,
> Oleg
>
>
> On Mon, Mar 29, 2021, 12:49 Tom Fennelly  wrote:
>
>> Hi.
>>
>> I've not been working on anything related to
>> https://github.com/jenkinsci/js-libs for some time now (and not likely
>> to do so for the foreseeable future) so it makes sense to reassign
>> ownership/leadership to someone else.
>>
>> Regards,
>>
>> Tom.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CA%2BbPao%2B6%2BViis%2BfzwdjWiVw6%3DYqRQvCeG265pZ%3D-jiy3v8qOSg%40mail.gmail.com.


Re: Maintainers/owners of github.com/jenkinsci/js-libs

2021-03-30 Thread Oleg Nenashev
Hi Tom,

Thanks a lot for the update! And what about other components? If you are a
sole maintainer, would you like to put them for adoption?

Best wishes,
Oleg


On Mon, Mar 29, 2021, 12:49 Tom Fennelly  wrote:

> Hi.
>
> I've not been working on anything related to
> https://github.com/jenkinsci/js-libs for some time now (and not likely to
> do so for the foreseeable future) so it makes sense to reassign
> ownership/leadership to someone else.
>
> Regards,
>
> Tom.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAPfivLD1V9g85-dNrHw7tKxG-dT1z%3DneNk0Z9bcZ5c67P4kEkA%40mail.gmail.com.


Re: [Github] jenkins-infra alumni team

2021-03-30 Thread 'Olblak' via Jenkins Developers
Hi Everybody, 
I made few changes to the Jenkins-infra GitHub organization.

**jenkins-infra/alumni**
I created the alumni team here 
, feel free to 
reach out if I put the wrong person there and I'll revert it or if I am missing 
someone.

**Repository permission**
Several teams had "admin" permission and I switched that to "maintain"

I started reviewing team repository permission and while I made few changes, I 
still have pending work but feel free to suggest teams that should or should 
not have a specific repository access

Cheers


On Mon, Mar 29, 2021, at 3:12 PM, 'Olblak' via Jenkins Developers wrote:
> Thanks everybody for your feedback, I'll create that team and start moving 
> people there
> 
> On Mon, Mar 29, 2021, at 2:15 PM, Oleg Nenashev wrote:
>> I went ahead and created a team in the jenkinsci org 
>> https://github.com/orgs/jenkinsci/teams/alumni 
>> I will move some of the known inactive contributors there.
>> On Sunday, March 28, 2021 at 3:13:43 PM UTC+2 siiy...@gmail.com wrote:
>>> +1 from me
>>> 
>>> 
>>> On Fri, Mar 26, 2021 at 9:11 AM Rick  wrote:
 
 +1 from me
 
 
 
 
 
 On 03/26/2021 00:16,Mark Waite wrote:
> +1 from me.
> 
> On Thursday, March 25, 2021 at 3:55:16 AM UTC-6 Olblak wrote:
>> __
>> Hi Everybody,
>> 
>> I am currently collecting feedback about the best way to manage user 
>> access to the Jenkins-infra GitHub organization and more specifically 
>> for people who don't contribute anymore (whatever the reason).
>> 
>> I recently review user permissions on the Github Jenkins infrastructure 
>> organization and we have 53 people with different kinds of permission. A 
>> lot of them stepped back or just don't actively contribute anymore.
>> This brings unneeded risk to the Github organization as they have change 
>> permissions even though a lot of them don't need those permissions 
>> anymore. Differently said, It doesn't make sense to take the risk that a 
>> compromised account introduces changes in our git repositories if that 
>> account doesn't need privileged access anymore.
>> 
>> So I am proposing to create a new "team" named alumni which would have 
>> read-only permissions on every public repository.
>> This would bring the following benefits
>> 
>>  1. We would still be able to assign individual alumni group member PR 
>> or Issues as knowledge experts.
>>  2. Alumni team members will have the "jenkins-infra" badge on their 
>> GitHub user profile as a way to highlight their past contribution.
>>  3. If for some reason a malicious user get access to one of the alumni 
>> account, that attacker won't be able to merge PR which reduces the risk 
>> on the GitHub organization.
>>  4. Of course, once a contributor get more active, we can still remove 
>> him from alumni group and grant him more permission
>> Any thoughts? 
>> Without any feedback, I'll wait one week, starting from this email, 
>> before implementing my plan.
>> 
>> Cheers,
>> 
>> Olivier
>> 
>> --
>>   Olblak
>> 
>> 
>> 
> 

> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-de...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-dev/7719a88f-ee56-465a-a44e-67867c473cb2n%40googlegroups.com
>  
> .
 

 -- 
 You received this message because you are subscribed to the Google Groups 
 "Jenkins Developers" group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to jenkinsci-de...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/jenkinsci-dev/7faf2c04.2688.1786c140815.Coremail.zxjlwt%40126.com
  
 .
>>> 
>>> 
>>> -- 
>>> Shi Yanjun(yJunS)
>>> Blog:https://github.com/yJunS
>> 

>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jenkinsci-dev+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-dev/50aa7676-2e97-48a4-9f6c-cbb968e077d6n%40googlegroups.com
>>  
>>