Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 25 Sep 2002 17:22:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 25 Sep 2002 17:22:47 -0400 Received: from mailf.telia.com ([194.22.194.25]:61407 "EHLO mailf.telia.com") by vger.kernel.org with ESMTP id ; Wed, 25 Sep 2002 17:22:46 -0400 X-Original-Recipient: linux-kernel@vger.kernel.org From: Roger Larsson To: Adam Goldstein Subject: Re: Very High Load, kernel 2.4.18, apache/mysql Date: Wed, 25 Sep 2002 23:26:10 +0200 User-Agent: KMail/1.4.7 Cc: =?utf-8?q?Pawe=C5=82=20Krawczyk?= , Simon Kirby , Adam Taylor , linux-kernel@vger.kernel.org, Sebastian Benoit References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200209252326.10617.roger.larsson@skelleftea.mail.telia.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1184 Lines: 28 The big question is - why that much CPU usage? Possible answers: * PHP, mySQL, Apache - needs that amount of CPU to perform the requested function. (you have got suggestions from others) * The implementation if either has bugs that cause the CPU usage. Garbage collection? Ineffective algorithms? - Not much to do other than collecting execution profiles, quite advanced - recompiling of the tools will probably be needed... And probably help from the tools developers... * The implementation of the user code has bugs that cause the CPU usage. One example: SQL SELECT with unindexed data - this can usually be noticed as buffer in load in vmstat but since all data fits in memory - it would cause scans in memory, with lots of RAM cache misses... And it would work well as long as the scanned data was smaller than the CPU cache? - Suggestion: Review your index keys and select statements to make sure that they match! /RogerL - 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/