From: Bill Moran <wmoran@potentialtech.com>
To: vathakar@banas.guj.nic.in
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow in morning hours
Date: Fri, 20 Feb 2004 08:48:54 -0500
Message-ID: <40361046.9050708@potentialtech.com> (raw)
In-Reply-To: <40361DBE.3636.10FEBF@localhost>
References: <4BAFBB6B9CC46F41B2AD7D9F4BBAF78508C847@vt-pe2550-001.vantage.vantage.com>
<40361DBE.3636.10FEBF@localhost>
vathakar@banas.guj.nic.in wrote:
> Hi All,
>
> I am using Linux 7.2 and postgresql 7.2.
>
> Our Office hours are over at 6pm but we use to keep our server
> running 24 hours a day. On the second day morning, Our PGSQL
> Server becomes very slow.
>
> After continuous usage of one hour, It gradually starts responding
> faster ! This has become every day routine !
>
> do u have any idea related to this !!!! Is there any other reason that I
> need to check up?
>
> Please any any idea to get relief daily morning problem !!
I've seen this happen, and not just with PostgreSQL. The reasons are many
an varied, but here's my experience on the most common.
1) As someone else suggested, there may be some daily maintenance process
(i.e. backup) that's still running when you come in. Check this, and
reschedule if necessary.
2) Even if these nightly maintenance processes are finished when you first
come in, they've probably completely rearranged the contents of RAM.
Meaning, data that Linux had cached that made Postgres fast now needs
to be fetched from disk again. There are some things you can do, such
as adding RAM or getting faster disks, but this is a difficult problem
to solve. Some of the nightly processes could be safely disabled,
possibly, such as rebuilding the located database (if you don't use
locate) Possibly (I'm guessing here) if you scheduled pg_dump to be
the last process to run at night, it might put the cache back in a
better state?
3) First thing AM load. It's quite common for load to be higher at certain
times of the day, and first thing in the morning is a common time for
load to be higher than usual (especially for email servers). Check the
load on the machine with tools like top and see if it isn't just busier
in the morning than other times during the day. There might even be one
or two particular queries that people only run first thing that bog the
machine down. Depending on what you find, you may be able to optomise
some queries. Possibly some fine-tuning could correct the problem. Or
you might be forced to upgrade hardware if you want the machine to handle
the higher morning load faster. First thing to determine, though, is
whether or not the load is higher or the same.
Without more detail on the load, setting, etc of your system, these are all
guesses. Hopefully the information is helpful, though.
--
Bill Moran
Potential Technologies
http://www.potentialtech.com
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: wmoran@potentialtech.com, vathakar@banas.guj.nic.in
Subject: Re: Slow in morning hours
In-Reply-To: <40361046.9050708@potentialtech.com>
* 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