Development

Reducing the # of threads in Jenkins: SSH slaves

As the usage of Jenkins expands, we started seeing users who run multiple 100s of slaves on one master, and thus it became a lot more important for us to scale well to even larger number of slaves.

While I was looking at the thread dump of a large system, I started noticing that there are a large number of threads lying around pumping InputStream and writing to another OutputStream. On Linux, each thread occupies 2MB just for its stack size, so if we can eliminate some of them, it'd be a good saving.

So this morning, I tackled one source of such waste.

Jenkins has the ability to launch slave on a remote server via SSH for the longest time, and to simplify this, we've been using a pure-Java implementation of SSH client.

To cut the long story short, I was able to eliminate two pump threads per every SSH connection. Furthermore, when it runs on the upcoming Jenkins 1.521, it'll save one more thread per every SSH connection. So if you have 100 slaves connected through SSH, this alone saves up 600MB of memory. That's pretty good for a few hours work!

Giving Back to the Community: 3 Ways to Keep Jenkins Growing

With more than 600 plugins, Jenkins has a vibrant community and we're dependent on YOU to keep it that way. Here are 3 ways you can give back to the community to ensure that everyone benefits and Jenkins keeps growing...

Giving it back to the community #1: vendor+community=win

Jenkins is becoming ubiquitous enough that tool vendors and service providers often find their users asking them to provide Jenkins plugins. The challenge for these companies is that they don’t necessarily possess the necessary Jenkins expertise to do one.

Here at the Jenkins project, what we are trying to do is to work with these people to deliver a plugin. It gets the job done a whole lot more quickly if the vendor brings in their expertise on their tool/services and we bring in our expertise on Jenkins plugin development.

For example, we recently worked with SOASTA to help them open-source the plugin they developed in house, then help them add a whole bunch of new functionalities. By open-sourcing a plugin in the Jenkins project, vendors win as the community helps fix bugs and improve plugins. The Jenkins project wins by building relationship with vendors. And finally the users win by having more integrations.

Los Altos Hackathon This Friday

What better way to end the year than to come join a little Jenkins hackathon this Friday afternoon with Kohsuke (the core developer), Max Spring (Jenkow plugin), and hopefully other Jenkins hackers?

We'll do this at CloudBees Los Altos office, starting around Friday 1pm.
View CloudBees Los Altos office in a larger map

Office hours next week: metadata plugin

The last Jenkins office hour of the year hosts Robert Sandell and Tomas Westling, who will go over newly open-sourced metadata plugin from Sony Mobile Communications (more about this story on their website). This team from Sony Mobile has been known for several other popular plugins, including the Gerrit trigger plugin. And I think this latest batch of plugins will not disappoint!

As I understand, this plugin is a library plugin, which is primarily meant to be consumed by other plugins. With help of other plugins using this plugin, it can classify jobs and slaves by adding metadata tags to them. This in turn enables more intelligent scheduling, views, access control, and so on.

Sponsor Jenkins bugs with Freedom Sponsors

(This is a guest post by Tony França)

Hi all, my name is Tony, I'm the creator of (FreedomSponsors) and today I want to talk how Jenkins has inspired me to build it.

Before starting, I'd like to thank the Jenkins crew for letting me publish this guest post in their blog. On top of that, thank you for maintaining Jenkins as well - I'm a big fan and a heavy user. Jenkins potential to make peoples lives easier is really amazing. You guys are amazing. And Kohsuke, you're my personal hero :-)

All right, that being said, let's move on with the story.

Most people who like FreedomSponsors probably don't know that Jenkins is sort of the reason it exists in the first place. That's right, if it wasn't for Jenkins I'd probably never had the idea for FS.

This is how it happened.

I was playing with the (Jenkins OpenID plugin), and I was having some trouble with it. After a little research, I found that there was a JIRA bug for it - (JENKINS-9216: Make OpenID work with Google Apps accounts).

"Bummer" - I thought - "Maybe I can try to debug it.