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
Community showcase
Published Nov 29, 2018 in Jira

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,097 views 0 8
Read article

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