Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 9AF76FA6B99 for ; Thu, 22 Mar 2012 06:42:35 -0300 (ADT) Received: from mail-we0-f174.google.com ([74.125.82.174]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SAeXS-0001uV-Gn for pgsql-performance@postgresql.org; Thu, 22 Mar 2012 09:42:35 +0000 Received: by wejx9 with SMTP id x9so1639448wej.19 for ; Thu, 22 Mar 2012 02:42:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=uEgAfgIKky/oNqu6wN1w9OtPDi+WMYI+LoiNnUcc6HQ=; b=Cg9t0+fDwOLYHUnalIvPHsliAKco3AZG0lhNIZ5rrMAE4/d/F7vIapG/vdyqiEleyV D+iXE/bVRsHXr+i10sEO5nQ3/2hFFYH8c9HpmYNkzRnvVwM2x5CV76EWylvy71aHk0Q6 W6n12n91sldSDNgrDvkJ3RS8Yg/4ydAWMsFHDoRv4dAN+gu6W3s3f3sPmVVfrvnodKvs Mu5d0Vdk7clc1Wo7yzSqKucjY/dmVVEWLTWbV5sus/Wn15DYlHgifHPLvE088JRyEQSH FoiKQnC9fiNSEx1qReJv6B6d1L8S8DFAwtnvaPzD/uGfNGFgR484uw06V8HD5dDlSu4j +WhA== Received: by 10.180.19.37 with SMTP id b5mr3531566wie.9.1332409341080; Thu, 22 Mar 2012 02:42:21 -0700 (PDT) Received: from [10.64.1.26] ([94.45.140.16]) by mx.google.com with ESMTPS id ex2sm6695438wib.8.2012.03.22.02.42.19 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Mar 2012 02:42:19 -0700 (PDT) Message-ID: <4F6AF3FE.30407@gmail.com> Date: Thu, 22 Mar 2012 11:42:22 +0200 From: Vitalii Tymchyshyn User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.27) Gecko/20120216 Lightning/1.0b2 Thunderbird/3.1.19 MIME-Version: 1.0 To: gnanam@zoniac.com CC: pgsql-performance@postgresql.org Subject: Re: Write workload is causing severe slowdown in Production References: <006301cd07fd$358ebe40$a0ac3ac0$@com> In-Reply-To: <006301cd07fd$358ebe40$a0ac3ac0$@com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.3 (--) X-Archive-Number: 201203/140 X-Sequence-Number: 46590 Check for next messages in your log: LOG: checkpoints are occurring too frequently (ZZZ seconds apart) HINT: Consider increasing the configuration parameter "checkpoint_segments". Best regards, Vitalii Tymchyshyn 22.03.12 09:27, Gnanakumar написав(ла): > Hi, > > We're running a web-based application powered by PostgreSQL. Recently, > we've developed a "new" separate Java-based standalone (daemon process) > threaded program that performs both read and write operations heavily on 2 > "huge" tables. One table has got 5.4 million records and other has 1.3 > million records. Moreover, more than one read and/or write operations may > be executing concurrently. > > The issue that we're facing currently in our Production server is, whenever > this "newly" developed Java program is started/run, then immediately the > entire web application becomes very slow in response. At this time, I could > also see from the output of " iostat -tx" that "%util" is even crossing more > than 80%. So, what I could infer here based on my knowledge is, this is > creating heavy IO traffic because of write operation. Since it was entirely > slowing down web application, we've temporarily stopped running this > standalone application. > > Meantime, I also read about "checkpoint spikes" could be a reason for slow > down in "write workload" database. I'm also reading that starting in > PostgreSQL 8.3, we can get verbose logging of the checkpoint process by > turning on "log_checkpoints". > > My question is, how do I determine whether "checkpoint" occurrences are the > root cause of this slowdown in my case? We're running PostgreSQL v8.2.22 on > CentOS5.2 having 35 GB RAM. "log_checkpoints" is not available in > PostgreSQL v8.2.22.