Calls to CB sometimes take unusually high time to execute

Hello All,

We are using couchbase 3.1. Java SDK version is 2.1 and ES replication is also configured. Its a single node CB installation.
In our test environments we have seen some random issues seen sometimes where our test fails with some timeout exceptions and when we look at the root cause its always the services that talks to couhcbase returns data after 20, 25 seconds which is unusually high. Overall request timeout is 30 seconds and hence we see timeout at user facing services.

I would like to understand what tuning we really need to do in order to avoid such issues? We are fairly new to CB world. Let me know if you need more information.