Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YXHyK-0003rq-Hg for pgsql-performance@arkaria.postgresql.org; Sun, 15 Mar 2015 23:29:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YXHyJ-000534-Nq for pgsql-performance@arkaria.postgresql.org; Sun, 15 Mar 2015 23:29:27 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YXHyI-00052v-CO for pgsql-performance@postgresql.org; Sun, 15 Mar 2015 23:29:26 +0000 Received: from mail-wi0-f174.google.com ([209.85.212.174]) by makus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YXHyA-00008c-M1 for pgsql-performance@postgresql.org; Sun, 15 Mar 2015 23:29:24 +0000 Received: by wibg7 with SMTP id g7so25143353wib.1 for ; Sun, 15 Mar 2015 16:29:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:organization:user-agent :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=B6Y8xtM3/vs4W/FKdpBv31LlxPQDsrdazy0XGILV4a0=; b=ZSr8cTAw6v6t+5xsWI2m+npiUfU8GpMxj93LnuVJ+94vs9TeVRBEtzR9CQDhJn6LfX UU1TAST2OoRSWPElJ1RlZ9AACHivZGi9BM2llYzZaFPJF0xveWRzRHFvfeXZuhBneyAq 98gdwaY4asQ5SnkzbGtTzkOie+ckpS0vnjwD3eZQxIK+O8pCv3bD8GRqQbFOkp3bNjk3 2mv1yCNzMV76Tt8Rh5w8lFR/vLaXOzW6AhyiivsxWn9U6f9bnzeTtENVgJDAM13Zk957 GLklNFqE16k85fE2TcKqYEUo/Ar+DbRwIqDAweVZSJ+udfWsaRwsdiWRb721fxfAEff/ DUDg== X-Gm-Message-State: ALoCoQnsOZ7w21OZgw1z9GhIDt7OR6zFixFAIwhlAvnNRSSZdcodDDeVTEWg0IUCXZ+hbgjHH6ndAFtYVDlOcrS1o1RncUS815on9QlqMRQ6Xfrcc7yPbClO+4cbDYbEVCDmFDuYUQssCH4Le5cxCb4PhQbg/jSnaOrxj/6d0jHkxVJ+ypSqRbGsak5roD+oYIKY+g0hnSuI X-Received: by 10.181.9.98 with SMTP id dr2mr31712216wid.62.1426462156669; Sun, 15 Mar 2015 16:29:16 -0700 (PDT) Received: from [192.168.1.163] (ip-78-45-139-138.net.upcbroadband.cz. [78.45.139.138]) by mx.google.com with ESMTPSA id kr5sm12856068wjc.1.2015.03.15.16.29.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Mar 2015 16:29:14 -0700 (PDT) Message-ID: <550615C7.6040200@2ndquadrant.com> Date: Mon, 16 Mar 2015 00:29:11 +0100 From: Tomas Vondra Organization: 2ndQuadrant User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: MusicBrainz postgres performance issues References: <9E71CCBE-4CDF-482E-878D-6C16027B6283@musicbrainz.org> <20150315135022.GC19792@alap3.anarazel.de> <20150315172048.GG9324@alap3.anarazel.de> <20150315174646.GH9324@alap3.anarazel.de> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 15.3.2015 18:54, Ilya Kosmodemiansky wrote: > On Sun, Mar 15, 2015 at 8:46 PM, Andres Freund wrote: >> That imo doesn't really have anything to do with it. The primary >> benefit of a BBU with writeback caching is accelerating >> (near-)synchronous writes. Like the WAL. > > My point was, that having no proper raid controller (today bbu > surely needed for the controller to be a proper one) + heavy writes > of any kind, it is absolutely impossible to live with large > shared_buffers and without io problems. That is not really true, IMHO. The benefit of the write cache is that it can absorb certain amount of writes, equal to the size of the cache (nowadays usually 512MB or 1GB), without forcing them to disks. It however still has to flush the dirty data to the drives later, but that side usually has much lower throughput - e.g. while you can easily write several GB/s to the controller, the drives usually handle only ~1MB/s of random writes each (I assume rotational drives here). But if you do a lot of random writes (which is likely the case for write-heavy databases), you'll fill the write cache pretty soon and will be bounded by the drives anyway. The controller really can't help with sequential writes much, because the drives already handle that quite well. And SSDs are a completely different story of course. That does not mean the write cache is useless - it can absorb short bursts of random writes, fix the write hole with RAID5, the controller may compute the parity computation etc. Whenever someone asks me whether they should buy a RAID controller with write cache for their database server, my answer is "absolutely yes" in 95.23% cases ... ... but really it's not something that magically changes the limits for write-heavy databases - the main limit are still the drives. regards Tomas -- Tomas Vondra http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance