Re: Database performs massive reads when I'm doing writes. - Mailing list pgsql-general

From Ray Cote
Subject Re: Database performs massive reads when I'm doing writes.
Date
Msg-id 13498796.3475.1370556913632.JavaMail.rgacote@ip-225.appropriatesolutions.com
Whole thread Raw
In response to Re: Database performs massive reads when I'm doing writes.  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-general



From: "Jeff Janes" <jeff.janes@gmail.com>
To: "Ray Cote" <rgacote@appropriatesolutions.com>
Cc: pgsql-general@postgresql.org
Sent: Thursday, June 6, 2013 5:41:00 PM
Subject: Re: [GENERAL] Database performs massive reads when I'm doing writes.

On Thu, Jun 6, 2013 at 2:12 PM, Ray Cote <rgacote@appropriatesolutions.com> wrote:
It is Postmaster itself:
11068                 -              315.9M               136K                  0K               85%             postmaster
11000                 -              56808K                 8K                  0K               15%             postmaster 
11003                 -                  0K                80K                  0K                0%             postmaster
11004                 -                  0K                24K                  0K                0%             postmaster
11067                 -                  0K                 0K                  0K                0%             load_rets.py

The above are the atop lines for just postmaster. This is a 10s snapshot so you can see lots of read activity.
The load_rets.py task is the Python script loading the database.


The postmaster has many children, each of which is responsible for something different.  If you display the full command line rather than just the abbreviated one, it will give you more info on exactly which child is using the disk, for example:


  PID  DSK COMMAND-LINE
 3950  16% postgres: jjanes jjanes [local] UPDATE
 2978   0% postgres: checkpointer process
 2982   0% postgres: stats collector process


Cheers,

Jeff
Hi Jeff:

I can see that now after pressing c in disk display mode:
19007     - D  86% postgres: postgres petersons 127.0.0.1(59702) UPDATE
11003     - S  12% postgres: writer process
11004     - S   2% postgres: wal writer process

This is how it looks when running properly (doing a big update at the moment).
Thanks for the lead. Learning much about atop today.
--Ray



--
Ray Cote, President Appropriate Solutions, Inc.
We Build Software
www.AppropriateSolutions.com 603.924.6079

pgsql-general by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: Load Mysql table CSV into postgresql
Next
From: "Joshua D. Drake"
Date:
Subject: PSA: If you are running Precise/12.04 upgrade your kernel.