Re: Rather large LA

From: Vitalii Tymchyshyn <tivv00(at)gmail(dot)com>
To: Richard Shaw <richard(at)aggress(dot)net>
Cc: Alan Hodgson <ahodgson(at)simkin(dot)ca>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Rather large LA
Date: 2011-09-07 06:54:25
Message-ID: 4E671521.3090406@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hello.

As it turned out to be iowait, I'd recommend to try to load at least
some hot relations into FS cache with dd on startup. With a lot of RAM
on FreeBSD I even sometimes use this for long queries that require a lot
of index scans.
This converts random IO into sequential IO that is much much faster.
You can try it even while your DB starting - if it works you will see
IOwait drop and user time raise.
What I do on FreeBSD (as I don't have enough RAM to load all the DB into
RAM) is:
1) ktrace on backend process[es]. Linux seems to have similar tool
2) Find files that take a lot of long reads
3) dd this files to /dev/null

In this way you can find hot files. As soon as you have them (or if you
can afford to load everything), you can put dd into startup scripts. Or
I can imagine an automatic script that will do such things for some time
after startup.

Best regards, Vitalii Tymchyshyn

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Anibal David Acosta 2011-09-08 12:51:13 how delete/insert/update affects select performace?
Previous Message Craig Ringer 2011-09-07 01:03:38 Re: how fast index works?