Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T1eII-0004Cg-TW for pgsql-bugs@postgresql.org; Wed, 15 Aug 2012 14:09:58 +0000 Received: from moutng.kundenserver.de ([212.227.17.9]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T1eIG-0004IH-79 for pgsql-bugs@postgresql.org; Wed, 15 Aug 2012 14:09:58 +0000 Received: from alap2.localnet (p5DDC7F55.dip.t-dialin.net [93.220.127.85]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0Lu0I6-1Tk5fJ19eQ-010sUB; Wed, 15 Aug 2012 16:09:55 +0200 From: Andres Freund Organization: 2ndQuadrant.com To: pgsql-bugs@postgresql.org Subject: Re: BUG #7494: WAL replay speed depends heavily on the shared_buffers size Date: Wed, 15 Aug 2012 16:09:54 +0200 User-Agent: KMail/1.13.7 (Linux/3.5.0-rc3-andres-00231-g002b758; KDE/4.8.4; x86_64; ; ) Cc: valgog@gmail.com References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201208151609.54315.andres@2ndquadrant.com> X-Provags-ID: V02:K0:EOoSVFUwkOek9WgeqJXktNKpaA0ICTLtqJ6WN9FGocn JTvpqeYAWb+p6f9qhMpF+1BRcwRhedEMb/9MWsm9apuLklm6TT XwRhxlLw2PifXDncb+OpNfDmi7VEaTtGWkSdI1JIQsCqx70xw4 wF580oKazd+UsLe/kKVrz7a0rP6I1B+GFTTnS/d7P1/+PXQpkF pIKYQau54Alc78VZoigT4M4GwYDrkNH6a5LOqpvLRY8sGqm6Kv ABdhoBSlIeIMe5ad4Rsjr3iLDHIcLKsl/d6gUrOOLMzz40s7zo kiyC9ViqsCM+lBGb88lXaMLer+YdsP5rGYcS4RHMnebWieAocz 3gZj4AziTDn+sXM5ItgGi9UzxVhK0ScxA1t3eHWnB X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201208/97 X-Sequence-Number: 33821 Hi, On Wednesday, August 15, 2012 12:10:42 PM valgog@gmail.com wrote: > The following bug has been logged on the website: >=20 > Bug reference: 7494 > Logged by: Valentine Gogichashvili > Email address: valgog@gmail.com > PostgreSQL version: 9.0.7 > Operating system: Linux version 2.6.32-5-amd64 (Debian 2.6.32-41) > Description: >=20 > We are experiencing strange(?) behavior on the replication slave machines. > The master machine has a very heavy update load, where many processes are > updating lots of data. It generates up to 30GB of WAL files per hour. > Normally it is not a problem for the slave machines to replay this amount > of WAL files on time and keep on with the master. But at some moments, the > slaves are =E2=80=9Changing=E2=80=9D with 100% CPU usage on the WAL repla= y process and 3% > IOWait, needing up to 30 seconds to process one WAL file. If this tipping > point is reached, then a huge WAL replication lag is building up quite > fast, that also leads to overfill of the XLOG directory on the slave > machines, as the WAL receiver is putting the WAL files it gets via > streaming replication the XLOG directory (that, in many cases are quite a > limited size separate disk partition). Could you try to get a profile of that 100% cpu time? Greetings, Andres =2D-=20 Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services