X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 7E571D1D8A8 for ; Tue, 25 Nov 2003 15:48:33 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 83828-07 for ; Tue, 25 Nov 2003 11:48:06 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 787DAD1D8DE for ; Tue, 25 Nov 2003 11:48:01 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id hAPFlb19027728; Tue, 25 Nov 2003 10:47:37 -0500 (EST) To: Shridhar Daithankar Cc: William Yu , pgsql-performance@postgresql.org Subject: Re: Maximum Possible Insert Performance? In-reply-to: <3FC2F17A.5050307@persistent.co.in> References: <3FC19C2C.4050704@myrealbox.com> <3FC2F17A.5050307@persistent.co.in> Comments: In-reply-to Shridhar Daithankar message dated "Tue, 25 Nov 2003 11:36:50 +0530" Date: Tue, 25 Nov 2003 10:47:37 -0500 Message-ID: <27727.1069775257@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/240 X-Sequence-Number: 4800 Shridhar Daithankar writes: > William Yu wrote: >> This is an intriguing thought which leads me to think about a similar >> solution for even a production server and that's a solid state drive for >> just the WAL. What's the max disk space the WAL would ever take up? > Maximum number of WAL segments at any time in 2*(number of checkpoint > segments)+1 IIRC. > So if you have 3 checkpoint segments, you can not have more than 7 WAL > segments at any time. Give or take 1. I don't believe that's a *hard* limit. The system tries to schedule checkpoints often enough to prevent WAL from getting bigger than that, but if you had a sufficiently big spike in update activity, it's at least theoretically possible that more than checkpoint_segments segments could be filled before the concurrently running checkpoint finishes and releases some old segments. The odds of this being a real problem are small, especially if you don't try to fit on an undersized SSD by reducing checkpoint_segments. I'd think that a 512Mb SSD would be plenty of space for ordinary update load levels ... regards, tom lane