Re: Is Linux 2.6.5 kernel good enough for production? - Mailing list pgsql-general

From Dirk Försterling
Subject Re: Is Linux 2.6.5 kernel good enough for production?
Date
Msg-id 40A5BB1E.10501@zorbla.de
Whole thread Raw
In response to Re: Is Linux 2.6.5 kernel good enough for production?  ("scott.marlowe" <scott.marlowe@ihs.com>)
Responses Re: Is Linux 2.6.5 kernel good enough for production?
Re: Is Linux 2.6.5 kernel good enough for production?
List pgsql-general
Am 05/12/2004 03:49 PM schrieb scott.marlowe:
> On Wed, 12 May 2004, Dirk Försterling wrote:
>>
>>I'd like to add here, that I recently tried 2.6.5 / Postgres 7.4.2 and
>>found out that overall system performance during database operations
>>decreased dramatically.
>>
>
> Which of the two 2.6 schedulers are you running?  It would seem the
> pre-emptive schedule, while making for a better user experience on

Yes, I did, but no, this is not the problem as I found out by testing.

It also doesn't seem to have anything to do with too much swapping.
With Kernel 2.4.25, most of the time the machine used at least 50-70M
swap within a few hours which seldomly decreased later. Using Kernel
2.6.5, the machine uses much less swap (0 bytes since 2 days).

After some measuring I found out, where the exact "problem" is. The
problem was sitting in front of the computer formulating SQL queries...

There were some dumb queries with timestamps, performing much slower
with Linux-2.6.5 compared to Linux-2.4.25:

The queries used something like this (ts is a TIMESTAMP):
     ... AND ts LIKE '2003-04-%'

I found all of them and changed them to a much smarter variant using
     ... AND ts < 'yyyy-05-01' AND ts > 'yyyy-04-01'

Now the whole thing runs a lot faster. (about 2 seconds for a
85000 rows result compared to about 11 seconds for the same result
using the old query)

I just wonder why those queries aren't slow with Linux-2.4.25. Using
2.4.25, the old queries ran as fast as the new ones on 2.6.5...

    -dirk

--
                    D i r k   F "o r s t e r l i n g
                    r@zorbla.de  http://r.zorbla.de/
                             -------------
          "...to boldly eat what no man has eaten before!" - McD



pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pg_xlog becomes extremely large during CREATE INDEX
Next
From: Dirk Försterling
Date:
Subject: Re: Is Linux 2.6.5 kernel good enough for production?