Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d35gI-0000Mw-D1 for pgsql-general@arkaria.postgresql.org; Tue, 25 Apr 2017 18:59:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d35gI-0004mS-01 for pgsql-general@arkaria.postgresql.org; Tue, 25 Apr 2017 18:59:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d35dt-0008EH-0I for pgsql-general@postgresql.org; Tue, 25 Apr 2017 18:56:53 +0000 Received: from resqmta-po-04v.sys.comcast.net ([2001:558:fe16:19:96:114:154:163]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d35do-0004AN-5d for pgsql-general@postgresql.org; Tue, 25 Apr 2017 18:56:52 +0000 Received: from resomta-po-01v.sys.comcast.net ([96.114.154.225]) by resqmta-po-04v.sys.comcast.net with SMTP id 35d3dkiguz0b735dgdjRR4; Tue, 25 Apr 2017 18:56:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1493146600; bh=s/SkIOV8bUKVA8TzK/GjAilTZvxNlOzm0INzxhKe4x0=; h=Received:Received:Received:From:To:Subject:Date:Message-ID: MIME-Version:Content-Type; b=eGrc+y/PesNL1zeCpSBibYKauiW3OfHGW3H6qk3ZBTIGBNtQ4pZbEv7gt3AHQsPLa DIBHTbkJ8qvFc/DWFmxknS0UfZJ8sT3+pY/p8QdWdf1PwYWAszEGgk7HKIk243zAc/ MUhDweHYBbJoA0kK14+r2SfBQxKcKtkXa6hkMdyKAprE14FIi+a1BOA9qrSTS4lTSW SFDqcQlJxs0/Rviqf1aT4vKXaIkJRER/2ZtfVRECywXQ1MPnpd2VrJJ4rMkPl18AYo T72qqyjum0GjFIcP4X3ovAXmU8WfzHsPEbFYSkVraahLM2q9QPruJI0Mz222PjvsoO tSdoyOOBpoMsg== Received: from jsievers.comcast.net ([12.30.159.20]) by resomta-po-01v.sys.comcast.net with SMTP id 35dUdpb4WPheQ35dXd3su1; Tue, 25 Apr 2017 18:56:38 +0000 Received: from jsievers.enova.com (localhost [127.0.0.1]) by jsievers.comcast.net (Postfix) with ESMTP id 7F0E226005E; Tue, 25 Apr 2017 13:56:28 -0500 (CDT) From: Jerry Sievers To: Andres Freund Cc: pgsql-general@postgresql.org Subject: Re: Questionaire: Common WAL write rates on busy servers. References: <20170425041743.ddabv2mwevcmtx5a@alap3.anarazel.de> Date: Tue, 25 Apr 2017 13:56:28 -0500 In-Reply-To: <20170425041743.ddabv2mwevcmtx5a@alap3.anarazel.de> (Andres Freund's message of "Mon, 24 Apr 2017 21:17:43 -0700") Message-ID: <87inlsco4j.fsf@jsievers.enova.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-CMAE-Envelope: MS4wfNxu+H/6LuD6qZmKGedRQb/txNH12tdy82Cvup01e3EJYXnhb9ICFu9w0kYMKNC55ZkVFzuqyDTx1Xwb6nfdgcSPEIQZ0rRBfXvNMFxHgCa3+E98JQUR 0dXdf2WPgAaqopGa11/wcFqgTk5RlSC9DkC3z9KjNuaFPCJPBFtykO6NjSj8Kb/4nUx/YKApeACYzCWdjJtblg4kbPO930q4wTfOBRNL0go38D98BgxVkpjL X-Pg-Spam-Score: -1.5 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Andres Freund writes: > Hi, > > I've lately seen more and more installations where the generation of > write-ahead-log (WAL) is one of the primary bottlenecks. I'm curious > whether that's primarily a "sampling error" of mine, or whether that's > indeed more common. > > The primary reason I'm curious is that I'm pondering a few potential > optimizations, and would like to have some guidance which are more and > which are less important. I have a busy warehouse spitting out about 400k segments/week... ~10MB/second :-) We have resorted to a rather complex batch/parallel compressor/shipper to keep up with the volume. > > Questions (answer as many you can comfortably answer): > - How many MB/s, segments/s do you see on busier servers? Our busiest system Avg 10MB/second but very burst. Assume it'w many times that during high churn periods. > - What generates the bulk of WAL on your servers (9.5+ can use > pg_xlogdump --stats to compute that)? Simply warehouse incremental loading and/or full table delete/trunc and reload, plus dirived data being created. Many of the transient tables are on NVME and unlogged. > - Are you seeing WAL writes being a bottleneck?OA > - What kind of backup methods are you using and is the WAL volume a > problem? I do not know if basic local WAL writing itself is a problem of or not but as mentioned, we are scarcely able to handle the necessary archiving to make backups and PITR possible. > - What kind of replication are you using and is the WAL volume a Th;are 2 streamers both feeding directly from master. We use a fairly large 30k keep-segments value to help avoid streamers falling behind and then having to resort to remote archive fetching. It does appear that since streaming WAL reception and application as well as of course remote fetching are single threaded, this is a bottleneck as well. That is, a totally unloded and well outfitted (hardware wise) streamer can barely keep up with master. > - What are your settings for wal_compression, max_wal_size (9.5+) / > checkpoint_segments (< 9.5), checkpoint_timeout and wal_buffers? checkpoint_timeout | 5min max_wal_size | 4GB wal_buffers | 16MB wal_compression | off > - Could you quickly describe your workload? warehouse with user self-service reporting creation/storage allowed in same system. > > Feel free to add any information you think is pertinent ;) Great idea!! Thanks > > Greetings, > > Andres Freund -- Jerry Sievers Postgres DBA/Development Consulting e: postgres.consulting@comcast.net p: 312.241.7800 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general