Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 341FB632BC5 for ; Thu, 4 Feb 2010 05:40:50 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 32572-05 for ; Thu, 4 Feb 2010 09:40:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.26]) by mail.postgresql.org (Postfix) with ESMTP id 1D749632A43 for ; Thu, 4 Feb 2010 05:40:38 -0400 (AST) Received: by ey-out-2122.google.com with SMTP id 25so1550046eya.3 for ; Thu, 04 Feb 2010 01:40:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=pyWWUOQD9st4i3x27MSEI7N1WdSVP/6fWB6R4rV2lCs=; b=uCztvvCtN1kL4WhuRKe/JN2PqTDfLkq5DJFzqynVG6Av808m21rwCuGCfF07buQTjh i68TbeP1QF8SdhvQ7iEiDfSe4Jy0p8SRjPw4wjan9zy0j9mv+JNXnGbOS+vlgSdjFVov 7CFXJ70axw3JXavm1iAYbHbcjkz3eqgiiz2is= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=eA0tYaWfnEV6n2o29UDdT5Xo6aGzX790QuObkzGKlv7/n24aFM7ZDSbO35nT3Ul7B4 IWWto+mFyAEGSB8+joraj1zYDEZv7Al9qKAxi3z0GT2DQAHjoIS9ZsO45qLu4QivTrkH IIDAADjaA4vwdNnan9W22+GJSo+8df81fItGU= MIME-Version: 1.0 Received: by 10.216.90.70 with SMTP id d48mr447423wef.159.1265276437314; Thu, 04 Feb 2010 01:40:37 -0800 (PST) In-Reply-To: <84b68b3d1002040102o41b5c121k168accda7e31072b@mail.gmail.com> References: <84b68b3d1002030710x76c31adft58c56624409011fd@mail.gmail.com> <84b68b3d1002040102o41b5c121k168accda7e31072b@mail.gmail.com> From: Ivan Voras Date: Thu, 4 Feb 2010 10:40:17 +0100 X-Google-Sender-Auth: b14a179b00ed18ac Message-ID: <9bbcef731002040140s2dc07c07pc695b94f75382474@mail.gmail.com> Subject: Re: Optimizing Postgresql server and FreeBSD for heavy read and writes To: Amitabh Kant Cc: pgsql-performance@postgresql.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.855 tagged_above=-10 required=5 tests=AWL=-0.745, BAYES_05=-1.11 X-Spam-Level: X-Archive-Number: 201002/83 X-Sequence-Number: 37504 On 4 February 2010 10:02, Amitabh Kant wrote: > On Wed, Feb 3, 2010 at 10:05 PM, Ivan Voras wrote: >> >> On 02/03/10 16:10, Amitabh Kant wrote: >>> >>> Hello >>> >>> I have a server dedicated for Postgres with the following specs: >>> >>> RAM 16GB, 146GB SAS (15K) x 4 - =C2=A0RAID 10 with BBU, Dual Xeon =C2= =A0E5345 =C2=A0@ >>> 2.33GHz >>> OS: FreeBSD 8.0 >> >> If you really do have "heavy read and write" load on the server, nothing >> will save you from the bottleneck of having only 4 drives in the system = (or >> more accurately: adding more memory will help reads but nothing helps wr= ites >> except more drivers or faster (SSD) drives). If you can, add another 2 >> drives in RAID 1 and move+symlink the pg_xlog directory to the new array= . > > Can't do anything about this server now, but would surely keep in mind > before upgrading other servers. Would you recommend the same speed > drives(15K SAS) for RAID 1, or would a slower drive also work here (10K S= AS > or even SATA II)? Again, it depends on your load. It would probably be best if they are approximately the same speed; the location of pg_xlog will dictate your write (UPDATE / INSERT / CREATE) speed. Writes to your database go like this: the data is first written to the WAL (this is the pg_xlog directory - the transaction log), then it is read and written to the "main" database. If the main database is very busy reading, transfers from WAL to the database will be slower.