Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 29 Dec 2001 15:50:44 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 29 Dec 2001 15:50:34 -0500 Received: from w147.z064001233.sjc-ca.dsl.cnc.net ([64.1.233.147]:56966 "EHLO funky.gghcwest.COM") by vger.kernel.org with ESMTP id ; Sat, 29 Dec 2001 15:50:20 -0500 Date: Sat, 29 Dec 2001 12:49:20 -0800 (PST) From: "Jeffrey W. Baker" X-X-Sender: To: Alan Cox cc: Subject: Re: 2.4.17 absurd number of context switches In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 28 Dec 2001, Alan Cox wrote: > > Check out those figures for context switches! 30,000 switches per second > > with only three runnable processes and practically no block I/O seems > > quite high to me. You can also see that the system is spending half its > .. > > Is this a scheduler worst-case, something to be expected, or something I > > can work around? > > The scheduler is _good_ at the three process case. Run some straces it looks > more like postgres is doing wacky yield based locks. As it turns out, Postgres 7.2 is forcing all this context switching, and it really hasn't got anything to do with the kernel. -jwb - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/