Re: Issue with Linux+Pentium SMP Context Switching

From: Kurt Roeckx <Q(at)ping(dot)be>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Issue with Linux+Pentium SMP Context Switching
Date: 2003-12-19 19:07:27
Message-ID: 20031219190727.GA26648@ping.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 19, 2003 at 10:30:13AM -0800, Josh Berkus wrote:
>
> Linux Versions Reported: RH and Gentoo reported, Kernels 2.4.18 to 2.4.22
> Not tested on other distros/kernels. Kernels are SMP-enabled.

Does the same problem show with an SMP kernel on an UP system?

> When a query is made against a table with millions of rows that requires a
> seq scan, large hash join, per-row calculations or other intensive operation,
> the system climbs to tens or hundreds of thousands of context switches per
> second (contrast with, for example, 5000cs/second on AthalonMP).

This is without any other query running, right? I even find 5000
cs/s rather large if there isn't any other process that wants
some CPU.

> In discussions with Linux kernel hackers online, they blame the way that
> PostgreSQL uses shared memory.

To me this can only make sense in case there is an other backend
trying to use the same memory, and it needs to be moved from 1
CPU to an other.

Kurt

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2003-12-19 19:17:31 Re: Issue with Linux+Pentium SMP Context Switching
Previous Message Joe Conway 2003-12-19 18:57:47 Re: PostgreSQL speakers needed for OSCON 2004