X-Original-To: pgsql-novice-postgresql.org@localhost.postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id C77CDB42169; Sun, 6 Jul 2003 15:20:23 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 57182-02; Sun, 6 Jul 2003 12:19:51 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 1A34FB42167; Sun, 6 Jul 2003 12:19:51 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h66FJPQ3009919; Sun, 6 Jul 2003 11:19:25 -0400 (EDT) To: Martin Foster Cc: Richard Huxton , PostgreSQL Novice , PostgreSQL Performance Subject: Re: [PERFORM] Extreme high load averages In-reply-to: <3F07FA98.70009@ethereal-realms.org> References: <3F07ABA1.2070100@ethereal-realms.org> <200307060849.00544.dev@archonet.com> <3F07FA98.70009@ethereal-realms.org> Comments: In-reply-to Martin Foster message dated "Sun, 06 Jul 2003 04:31:52 -0600" Date: Sun, 06 Jul 2003 11:19:25 -0400 Message-ID: <9918.1057504765@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/34 X-Sequence-Number: 7569 Martin Foster writes: >> The only time that I have ever seen load averages of 30 or more under >> OpenBSD is when one of my scripts goes wild. Note also that "high load average" is not per se an indication that anything is wrong. In Postgres, if you have thirty queries waiting for disk I/O, that's thirty processes --- so if that's the average state then the kernel will report a load average of thirty. While I'm no MySQL expert, I believe that the equivalent condition in MySQL would be thirty threads blocked for I/O within one process. Depending on how your kernel is written, that might show as a load average of one ... but the difference is completely illusory, because what counts is the number of disk I/Os in flight, and that's the same. You didn't say whether you were seeing any real performance problems, like slow queries or performance dropping when query load rises, but that is the aspect to concentrate on. I concur with the nearby recommendations to drop your resource settings. The thing you have to keep in mind about Postgres is that it likes to have a lot of physical RAM available for kernel disk buffers (disk cache). In a correctly tuned system that's been up for any length of time, "free memory" should be nearly nada, and the amount of RAM used for disk buffers should be sizable (50% or more of RAM would be good IMHO). regards, tom lane