Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 285EB6325DE for ; Thu, 14 Jan 2010 17:27:34 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 78706-03 for ; Thu, 14 Jan 2010 21:27:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mail.postgresql.org (Postfix) with ESMTP id 21E8D6321E7 for ; Thu, 14 Jan 2010 17:27:22 -0400 (AST) Received: by fxm27 with SMTP id 27so1346028fxm.3 for ; Thu, 14 Jan 2010 13:27:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:date:from:to:cc :subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=tUaO/HVuJfQaHxakz53D5lKJJh7bKdt9V+vMR7mX0yI=; b=BkyW+5dNkC/Y9eeAWJtIPkwUNuP1bAlAwQKfvJdoh/e2fgOnQ5MmBrfGPCHZ2VEzMT 0dyHnNXmSbutorGP6/5ytJPNuCYkRzGDhWZJQY8ytMrysAxr0IxNbe24HWkPL3SeBPHd wN4jEfXbt30xCTLdVnt7pkPjf+MFLWzIYg+lo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=uDT2ER/LH2YaYPfXBYreK9uaVNfw20AhOTkHO4Nw4xAQcUEpmrC/WgoppYZr0Sh9BN 6JQKSYnX9kZA6jtXFhla8rOXVzuBGlwMtK1D8TT1ym2a1D6045UNDpMhHGcapNvkBaf8 PW1jLVj69Xlfkp30iaUh+XTsVrjLcgDCwWjkw= Received: by 10.223.110.29 with SMTP id l29mr1779838fap.64.1263504441399; Thu, 14 Jan 2010 13:27:21 -0800 (PST) Received: from googlemail.com (port-87-193-148-114.static.qsc.de [87.193.148.114]) by mx.google.com with ESMTPS id 15sm619683fxm.10.2010.01.14.13.27.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 14 Jan 2010 13:27:20 -0800 (PST) Received: by googlemail.com (nbSMTP-1.00) for uid 1100 (using TLSv1/SSLv3 with cipher RC4-MD5 (128/128 bits)) fkater@googlemail.com; Thu, 14 Jan 2010 22:27:20 +0100 (CET) Date: Thu, 14 Jan 2010 22:27:19 +0100 From: "fkater@googlemail.com" To: Florian Weimer Cc: pgsql-performance@postgresql.org Subject: Re: Inserting 8MB bytea: just 25% of disk perf used? Message-ID: <20100114212719.GE2384@comppasch2> References: <20100114142903.GB2973@comppasch2> <82aawgoh09.fsf@mid.bfk.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <82aawgoh09.fsf@mid.bfk.de> User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201001/312 X-Sequence-Number: 37192 Florian Weimer: > > Do you have any further idea why 16MB/s seems to be the limit here? > > BYTEA deserialization is very slow, and this could be a factor here. > Have you checked that you are in fact I/O bound? Could you elaborate that a bit? It sounds interesting but I do not get what you mean by: "bytea deserialization": Do you mean from an escaped string back to real binary data? Does that apply to my case (I use PGexecParam and have the Format arg set to 1, binary) ? "I/O bound": What do you mean by that? > You can speed things up by sending the data in binary, by passing > approriate parameters to PQexecParams(). Do you mean the Format arg =1 ? If not, what is appropriate here? Felix