X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CF15FDBA3F for ; Fri, 18 Nov 2005 15:25:02 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 77967-02 for ; Fri, 18 Nov 2005 19:25:02 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.mi8.com (d01gw04.mi8.com [63.240.6.44]) by svr1.postgresql.org (Postfix) with ESMTP id 6E4D7DBACA for ; Fri, 18 Nov 2005 15:24:58 -0400 (AST) Received: from 172.16.1.110 by mail.mi8.com with ESMTP (- Welcome to Mi8 Corporation www.Mi8.com (D4)); Fri, 18 Nov 2005 14:24:49 -0500 X-Server-Uuid: C8FB4D43-1108-484A-A898-3CBCC7906230 Received: from MI8NYCMAIL06.Mi8.com ([172.16.1.175]) by D01SMTP01.Mi8.com with Microsoft SMTPSVC(6.0.3790.211); Fri, 18 Nov 2005 14:24:49 -0500 Received: from 67.103.45.218 ([67.103.45.218]) by MI8NYCMAIL06.Mi8.com ( [172.16.1.219]) via Exchange Front-End Server mi8owa.mi8.com ( [172.16.1.105]) with Microsoft Exchange Server HTTP-DAV ; Fri, 18 Nov 2005 14:24:49 -0500 User-Agent: Microsoft-Entourage/11.2.1.051004 Date: Fri, 18 Nov 2005 11:24:48 -0800 Subject: Re: Hardware/OS recommendations for large databases ( From: "Luke Lonergan" To: "Greg Stark" , stange@rentec.com cc: "Dave Cramer" , "Joshua Marsh" , pgsql-performance@postgresql.org Message-ID: Thread-Topic: [PERFORM] Hardware/OS recommendations for large databases ( Thread-Index: AcXsc2f8fcfu6PTQRrGGWWqW2mECvgAAlU+z In-Reply-To: <87oe4hpyfd.fsf@stark.xeocode.com> MIME-Version: 1.0 X-OriginalArrivalTime: 18 Nov 2005 19:24:49.0694 (UTC) FILETIME=[BE3D3BE0:01C5EC75] X-WSS-ID: 6F60F50B31S14707789-01-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.253 required=5 tests=[AWL=0.000, RCVD_NUMERIC_HELO=1.253] X-Spam-Score: 1.253 X-Spam-Level: * X-Archive-Number: 200511/366 X-Sequence-Number: 15623 Greg, On 11/18/05 11:07 AM, "Greg Stark" wrote: > That said, 130MB/s is nothing to sneeze at, that's maxing out two high end > drives and quite respectable for a 3-disk stripe set, even reasonable for a > 4-disk stripe set. If you're using 5 or more disks in RAID-0 or RAID 1+0 and > only getting 130MB/s then it does seem likely the cpu is actually holding you > back here. With an FC array, it's undoubtedly more like 14 drives, in which case 130MB/s is laughable. On the other hand, I wouldn't be surprised if it were a single 200MB/s Fibre Channel attachment. It does make you wonder why people keep recommending 15K RPM drives, like it would help *not*. > Still it doesn't show Postgres being nearly so CPU wasteful as the original > poster claimed. It's partly about waste, and partly about lack of a concurrent I/O mechanism. We've profiled it for the waste, we've implemented concurrent I/O to prove the other point. >> It's all in the kernel either way; using a different scheduler or file >> system would change that result. Even better would be using direct IO to not >> flush everything else from memory and avoid some memory copies from kernel >> to user space. Note that almost none of the time is user time. Changing >> postgresql won't change the cpu useage. > > Well changing to direct i/o would still be changing Postgres so that's > unclear. And there are plenty of more mundane ways that Postgres is > responsible for how efficiently or not the kernel is used. Just using fewer > syscalls to do the same amount of reading would reduce cpu consumption. Bingo. - Luke