On Wed, Jun 3, 2009 at 5:13 PM, Bill Moran <wmoran@xxxxxxxxxxxxxxxxx> wrote:
In response to Jennifer Trey <jennifer.trey@xxxxxxxxx>:
>Possible causes:
> 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?
* 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
Ok. But as you say those should not happen so often and the size is not that great. The combined write size is 3,254,048,805 bytes which is around 3GB ..
* 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
I have enough RAM :)
Java has been awarded 3GB and postgreSQL (Just went to see the value and somehow it was set to 438MB! what!?... just changed it to 2800MB.. could this be the reason??? 438 should be enough though.. (it was an error) I have not that many tuples..)
* You have other logging settings set too high and PostgreSQL is tying
up disk I/O writing log data.
Doesn't seem to be it.. just just checked a couple of things..
* Your application is more write-intensive than you realize.
That's only going to help if the machine has enough I/O capability to
> I would now like to move the DB activity to another disk if possible?
process both disks. Adding more RAM might be a better (and cheaper)
solution.
Enough I/O capability? Not sure what you mean... how can I find out?
No. You can just pick up the data directory and relocate it, then config
> Would
> I have to re-install PostgreSQL from scratch?
PostgreSQL to look for the data directory in the new location, or create
a symlink.
Yes.. I would like to try that(question is how I can do that, without stupid Windows changes permission on my files!) if it turns out that it wasn't the effective cache.. (good that I noticed at least :) )
--
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/
Grzegorz, yes, you are right. I would not recommend Windows Server to anyone either. I am to weak on linux and thought that this was going to make my life easier. Have had lots of issues. I might be trying Ubuntu Server out real soon :)
I am going to try to restart and look at the read, writes for a while. Perhaps it was the effective cache that was causing this (lets hope so :) )
Thanks for the tips and ideas. It feels like I am moving closer to resolving this issue once and for all.
Sincerley / Jennifer