Re: Database performs massive reads when I'm doing writes.

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Ray Cote <rgacote(at)appropriatesolutions(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Database performs massive reads when I'm doing writes.
Date: 2013-06-06 20:05:28
Message-ID: CAMkU=1zGXG7ROH5OEDp78-GzxUMmgRN2rhPThUecyj1uvspkMg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jun 6, 2013 at 9:53 AM, Ray Cote
<rgacote(at)appropriatesolutions(dot)com>wrote:

> Hello:
>
> I have a PostgreSQL 9.0.3 database that has suddenly started exhibiting
> odd read behavior.
>
> The version number is:
> "PostgreSQL 9.0.3 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC)
> 4.1.2 20080704 (Red Hat 4.1.2-50), 64-bit"
> This was compiled from source about a year ago and has been running just
> fine.
> The database feeds a very low-volume web site (a few hits per minute).
>
> Starting a few days ago we started to see a strange behavior where writing
> to the database causes massive read operations.
> For example, I have a table that needs to be updated every night (about
> 20,000 rows).
> Using Django ORM, we update them one item at a time.
> Usually the overall process takes a few minutes; it is now taking hours
> (like over 15 hours).
>
> Running atop, we're seeing Read Disk values in the range of 147.2M/10s and
> Write Disk values in the range of 16K/10s.
> Together, the Disk throughput is in the high 90% and frequently hits 100%.
>

Which specific processes are using the disk? (on my atop, if I hit 'c' it
will change mode to show me the entire so-called "command line", which will
let you know if the culprit is a vacuum worker, the checkpointer, or
someone else).

Cheers,

Jeff

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2013-06-06 20:17:58 Re: Function use in query
Previous Message Adarsh Sharma 2013-06-06 19:58:00 Re: Load Mysql table CSV into postgresql