Tomcat connector : bufferSize

So, we recently had a client who was complaining of high CPU load on JIRA. Indeed, thread dumps are picturing the Tomcat threads hooked on CPU doing network I/O:

  1. http-bio-exec threads were spending time in: java.net.SocketOutputStream.socketWrite
  2. StreamsCompletionService threads were busy as h**l filling buffers

Took some while, but then I realized that the Tomcat connector is a bit too 'default' for the real world. The http connector on Tomcat uses the default bufferSize, which is 2k (actually depends on the underlying OS, but anyway, it is ridiculously low).

I just increased the buffer size from default to 32k and poof ! the CPU load vanished like in some biblical healing stories  - I repeat myself here, I said it with some other occasion, but I like how it sounds smile

Now, in this particular case, I suspect the virtualization; I did however some tests on non-virtualized envs and find out that the perf is improved. Now, I don't pretend that 32k is a magical value, but shouldn't JIRA come with some nice default for the bufferSize ?

I would love to hear some opinions on this.

1 answer

Have I re-discovered the wheel here? :)

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Apr 17, 2018 in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

809 views 2 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you