From: Gunther Schadow <gunther@pragmaticdata.com>
To: pgsql-performance@lists.postgresql.org
Subject: Re: neither CPU nor IO bound, but throttled performance
Date: Thu, 21 Feb 2019 10:59:44 -0500
Message-ID: <aeaeddc6-25c8-0ba9-fbbe-a0482798751e@pragmaticdata.com> (raw)
In-Reply-To: <CABUevEyp0xGzdP=gbDspbrS0SyDesm2h8g+L5Gr0iDYy6v937A@mail.gmail.com>
References: <1b6d8b15-75eb-f00e-2d16-27f79d81eae7@gusw.net>
<CABUevEyp0xGzdP=gbDspbrS0SyDesm2h8g+L5Gr0iDYy6v937A@mail.gmail.com>
Thank you Magnus. 68% steal. Indeed. You probably hit the target. Yes.
That explains the discrepancy. I need to watch and understand that CPU
credits issue.
regards,
-Gunther
On 2/21/2019 4:08, Magnus Hagander wrote:
> On Thu, Feb 21, 2019 at 12:34 AM Gunther <raj@gusw.net
> <mailto:raj@gusw.net>> wrote:
>
> 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
>
>
> If I read that right, it's about 70% "steal". The description for this
> is "the percentage of time spent in involuntary wait by the virtual
> CPU or CPUs while the hypervisor was servicing another virtual
> processor.".
>
> So basically, the CPU is spent dealing with other peoples VMs on the
> same hardware. Welcome to the multi-tenant cloud.
>
> In particular, I believe T series instances get a limited number of
> CPU "credits" per hours. My guess is you've hit this limit and are
> thus being throttled. T series are not intended for persistent
> workloads. Either way, this is probably a question better asked at the
> Amazon EC2 forums rather than PostgreSQL as you'll find more people
> who know the EC2 interactions there.
> --
> Magnus Hagander
> Me: https://www.hagander.net/ <http://www.hagander.net/;
> Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: gunther@pragmaticdata.com, pgsql-performance@lists.postgresql.org
Subject: Re: neither CPU nor IO bound, but throttled performance
In-Reply-To: <aeaeddc6-25c8-0ba9-fbbe-a0482798751e@pragmaticdata.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox