pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ivan Voras <ivoras@freebsd.org>
To: pgsql-performance@postgresql.org
Subject: Re: Problem with database performance, Debian 4gb ram ?
Date: Mon, 02 Nov 2009 15:22:03 +0100
Message-ID: <hcmpu8$44l$1@ger.gmane.org> (raw)
In-Reply-To: <c09b5d640911020616t7177a7b9sb4b5f285d99e7c05@mail.gmail.com>
References: <c09b5d640911020616t7177a7b9sb4b5f285d99e7c05@mail.gmail.com>

Grant Masan wrote:
> Hi Hi all,
> 
> I have now readed many many forums and tried many different solutions 
> and I am not getting good performance to database. My server is Debian 
> linux, with 4gb ram, there is also java application and I am giving to 
> that 512mb (JAVA_OPTS) memory. In database there is now like 4milj rows. 
> What should I do better.
> Now .conf is:
> 
> max_connections = 80
> shared_buffers = 512MB
> temp_buffers = 8MB
> work_mem = 20MB
> maintenance_work_mem = 384MB
> wal_buffers = 8MB
> checkpoint_segments = 128MB
> effective_cache_size = 2304MB
> cpu_tuple_cost = 0.0030
> cpu_index_tuple_cost = 0.0010
> cpu_operator_cost = 0.0005
> fsync = off
> checkpoint_timeout = 1h
> 
> and I am giving kernels like:
> 
> sysctl -w kernel.shmmax=1073741824
> sysctl -w kernel.shmall=2097152
> 
> btw, what file I should modify to give this kernels as defaults ?
> 
> Thank you very much ! Hope you can clear my problem !

You have given almost no information that can be used to help you. In 
particular, you seem to be mixing up Java performance and database 
performance (JAVA_OPTS has nothing to do with pg performance).

How do you know your performance is low? What is your hardware, what 
performance do you get and what do you expect?

If after this you are still convinced the problem is database-related, 
you will probably need to run a tool like 
http://pqa.projects.postgresql.org/ to search which queries are slow and 
then start analyzing each particular query.

In short, there is no magical answer to your question :)




view thread (11+ messages)  latest in thread

Message-ID: <hcmpu8$44l$1@ger.gmane.org>
Permalink:  ../hcmpu8$44l$1@ger.gmane.org/
Also on:    postgresql.org/message-id/hcmpu8$44l$1@ger.gmane.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: ivoras@freebsd.org
  Subject: Re: Problem with database performance, Debian 4gb ram ?
  In-Reply-To: <hcmpu8$44l$1@ger.gmane.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox