Re: Slow in morning hours
От | Bill Moran |
---|---|
Тема | Re: Slow in morning hours |
Дата | |
Msg-id | 40361046.9050708@potentialtech.com обсуждение исходный текст |
Ответ на | Slow in morning hours (<vathakar@banas.guj.nic.in>) |
Список | pgsql-performance |
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
В списке pgsql-performance по дате отправления: