Hi, I have an Amazon Linux based Postgresql 11 server here on a t2.medium EC2 instance.
It is serving 24 worker processes that read jobs from a queue (thanks to SELECT ... FOR UPDATE SKIP LOCKED!) and do jobs some of which are reading and writing business data to the database, others are only reading, and some don't hit the business data at all, only the queue.
Everything flows quite nicely. Except, I don't understand why I can't max out the CPU or the IO, instead, IO is almost negligible yet the CPU is at 30% hardly hitting 50%.
Here I give you a view of top:
top - 23:17:09 up 45 days, 2:07, 4 users, load average: 20.32, 18.92, 13.80
Tasks: 338 total, 24 running, 111 sleeping, 0 stopped, 0 zombie
%Cpu(s): 28.7 us, 2.5 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.0 si, 68.7 st