Re: Is Linux 2.6.5 kernel good enough for production?

From: Dirk Försterling <r(at)zorbla(dot)de>
To: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Is Linux 2.6.5 kernel good enough for production?
Date: 2004-05-15 06:39:26
Message-ID: 40A5BB1E.10501@zorbla.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)zorbla(dot)de http://r.zorbla.de/
-------------
"...to boldly eat what no man has eaten before!" - McD

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dirk Försterling 2004-05-15 07:56:33 Re: Is Linux 2.6.5 kernel good enough for production?
Previous Message Alvaro Herrera 2004-05-15 05:14:11 Re: pg_xlog becomes extremely large during CREATE INDEX