Re: Dramatic change in memory usage with version 9.1

From: Marti Raudsepp <marti(at)juffo(dot)org>
To: Rafael Martinez <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Dramatic change in memory usage with version 9.1
Date: 2011-12-19 16:02:56
Message-ID: CABRT9RBi4XxZfFOMn_4q77mVCZLLRqN+PXJT6VQ7tSqRWtmZ5g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Dec 19, 2011 at 17:04, Rafael Martinez <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no> wrote:
> * Sudden decrease of swap when running backup/vacuum+analyze jobs

Do you know for certain that this memory use is attributed to
vacuum/analyze/backup, or are you just guessing? You should isolate
whether it's the vacuum or a backup process/backend that takes this
memory.

Do you launch vacuum/analyze manually or are you just relying on autovacuum?
How many parallel vacuum jobs are there?
What's your autovacuum_max_workers set to?
How large is your database?
How did you perform the upgrade -- via pg_upgrade or pg_dump?

> Any ideas about why this dramatic change in memory usage when the only
> thing apparently changed from our side is the postgres version?

Well, for one, there have been many planner changes that make it use
memory more aggressively, these probably being the most significant:
* Materialize for nested loop queries in 9.0:
http://rhaas.blogspot.com/2010/04/materialization-in-postgresql-90.html
* Hash join usage for RIGHT and FULL OUTER JOINs in 9.0

However, none of these would apply to vacuum, analyze or backups.

Regards,
Marti

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Cédric Villemain 2011-12-20 11:15:18 Re: Dramatic change in memory usage with version 9.1
Previous Message ktm@rice.edu 2011-12-19 15:54:11 Re: Dramatic change in memory usage with version 9.1