You have 5 connections for your db pool.
I think this is the culprit.
CPU is not slow, so might not be shared memory issue after all.
You have minthreads at 20 which means 20 concurrent connections.
I am not sure what the idle db pool connection settings are though, I know it was discussed before.