Re: High I/O writes activity on disks causing images on browser to lag and not load - Mailing list pgsql-general

From Bill Moran
Subject Re: High I/O writes activity on disks causing images on browser to lag and not load
Date
Msg-id 20090603101316.7ac9f350.wmoran@potentialtech.com
Whole thread Raw
In response to High I/O writes activity on disks causing images on browser to lag and not load  (Jennifer Trey <jennifer.trey@gmail.com>)
Responses Re: High I/O writes activity on disks causing images on browser to lag and not load
List pgsql-general
In response to Jennifer Trey <jennifer.trey@gmail.com>:
>
> I have finally found out why I have had images that lag on the website. It
> seems to be that postgre is doing allot of I/O activity and the images is
> somehow suffering because of this.
> The strange part about this is that it seems to be allot more disk writes
> than disk reads. Even though 99.9% of my application traffic is DB read.
> Looking up in tables and presenting.
> Why is postgre doing all this writing? Should it not be I/O reads?

Possible causes:
* Table reads sometimes result in the updating of hint-bits, which equate
  to disk writes.  This should not happen often, however, and not continually.
  http://wiki.postgresql.org/wiki/Hint_Bits
* If you are doing complex queries with sorting and don't have enough RAM,
  PostgreSQL will have to create temporary files.  See the config variable
  log_temp_files:
  http://www.postgresql.org/docs/8.3/static/runtime-config-logging.html
* You have other logging settings set too high and PostgreSQL is tying
  up disk I/O writing log data.
* Your application is more write-intensive than you realize.

> I would now like to move the DB activity to another disk if possible?

That's only going to help if the machine has enough I/O capability to
process both disks.  Adding more RAM might be a better (and cheaper)
solution.

> Would
> I have to re-install PostgreSQL from scratch?

No.  You can just pick up the data directory and relocate it, then config
PostgreSQL to look for the data directory in the new location, or create
a symlink.

--
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/

pgsql-general by date:

Previous
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: High I/O writes activity on disks causing images on browser to lag and not load
Next
From: "Gauthier, Dave"
Date:
Subject: non-owner superuser needs to be able to vacuum