Skip site navigation (1) Skip section navigation (2)

Re: slow queries, possibly disk io

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Close <narshe(at)gmail(dot)com>
Cc: POSTGRES-PERFORMANCE <pgsql-performance(at)postgresql(dot)org>
Subject: Re: slow queries, possibly disk io
Date: 2005-05-31 14:33:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Josh Close <narshe(at)gmail(dot)com> writes:
> There is 2 gigs of mem in this server. Here are my current settings.

> max_connections = 100
> shared_buffers = 50000
> sort_mem = 4096
> vacuum_mem = 32768
> effective_cache_size = 450000

> Shared buffers is set to 10% of total mem. Effective cache size is 90% of mem.

Uh, shared_buffers and effective_cache_size are both measured in pages,
which are 8K apiece unless you built with a nondefault BLCKSZ.  So the
above calculations are off ...

> Is there anything that can be done to have postgres grab more from
> memory rather than disk?

It's not so much a matter of what Postgres will do as what the kernel
will do.  Check to see if there is some limit on how much memory the
kernel will set aside for disk buffers.  Plain old "top" will generally
tell you what is going on, though interpreting its output sometimes
requires some wizardry.

			regards, tom lane

In response to

pgsql-performance by date

Next:From: Josh CloseDate: 2005-05-31 16:36:49
Subject: Re: slow queries, possibly disk io
Previous:From: Tom LaneDate: 2005-05-31 14:06:15
Subject: Re: very large table

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group