Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id E8BF91337BF7 for ; Fri, 8 Oct 2010 00:34:45 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 21157-10 for ; Fri, 8 Oct 2010 03:34:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from hrndva-omtalb.mail.rr.com (hrndva-omtalb.mail.rr.com [71.74.56.123]) by mail.postgresql.org (Postfix) with ESMTP id 28D791337C0A for ; Fri, 8 Oct 2010 00:34:37 -0300 (ADT) X-Authority-Analysis: v=1.1 cv=QISHQ+x4xS+apxgDHgAvNvlUjyrXCzYsHvuXcbPYiKg= c=1 sm=0 a=PWriTx3p5B0A:10 a=8nJEP1OIZ-IA:10 a=RAii6je2cdnAH6ATCOpc6g==:17 a=_Ixf_7qHAAAA:8 a=84TNgwznt4RuLimC7fkA:9 a=lBZ3UJ5Sa-syrzQJ5fsA:7 a=rU4TiMpooAx2ziIQA2U63Hs60PcA:4 a=wPNLvfGTeEIA:10 a=ryAo9hy1-OkA:10 a=VM1zglQXznYA:10 a=6vsjEBoLwlAA:10 a=0tfO7MgyNwYA:10 a=RAii6je2cdnAH6ATCOpc6g==:117 X-Cloudmark-Score: 0 X-Originating-IP: 74.73.87.196 Received: from [74.73.87.196] ([74.73.87.196:53250] helo=[192.168.1.103]) by hrndva-oedge04.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id E9/87-11377-C419EAC4; Fri, 08 Oct 2010 03:34:36 +0000 Message-ID: <4CAE914B.7050305@vmsinfo.com> Date: Thu, 07 Oct 2010 23:34:35 -0400 From: Mladen Gogala User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: "pgsql-novice@postgresql.org" Subject: Re: Asynchronous I/O in Postgres References: <4CAE6D12.9050301@vmsinfo.com> In-Reply-To: <4CAE6D12.9050301@vmsinfo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201010/52 X-Sequence-Number: 24024 Mladen Gogala wrote: > > The platform is Postgres 9.0.1 on RH EL 5.5 x86-64. My understanding of > the "effective_io_concurrency" was apparently very wrong. What is the > "effective concurrency" and what are those "simultaneous I/O requests" > that man page is talking about. Can somebody please define in precise > terms what is it that this parameter defines? What kind of "concurrent > I/O" is Postgres doing without asynchronous I/O calls? If this parameter > is just a stub for the future reference, I'd like to know. Will Postgres > use asynchronous I/O? Is that planned? > > > The mystery deepens. I thought that this might be the size of the I/O vector, for readv and writev routines, but not so. I did "ltrace -e readv -p on a PID that was doing a large sequential scan and not a single "readv" library call was encountered. All calls were just plain and simple "read" calls. Where is the concurrency? I am really curious now. The LWN article pompously announced that PostgreSQL 9.0 will use asynchronous I/O, with aio_read and aio_write. What does effective_io_concurrency define? What kind of "concurrent I/O" is Postgresql doing? This doesn't look very "concurrent": read(65, "\16\0\0\0\210\254\333\240\1\0\4\0L\0P\0\0 \4 \0\0\0\0000\231\240\r\370\227p\2"..., 8192) = 8192 read(65, "\16\0\0\0000\1\334\240\1\0\4\0008\0 \1\0 \4 \0\0\0\0(\234\260\7`\231\220\5"..., 8192) = 8192 read(65, "\16\0\0\0\20;\334\240\1\0\4\0<\0(\1\0 \4 \0\0\0\0\360\233\36\10\320\232@\2"..., 8192) = 8192 read(65, "\16\0\0\0Pk\334\240\1\0\4\0004\0\300\0\0 \4 \0\0\0\0H\232p\v \224P\f"..., 8192) = 8192 read(65, "\16\0\0\0\220\273C\241\1\0\4\0D\0p\0\0 \4 \0\0\0\0\230\234\320\6\220\233\16\2"..., 8192) = 8192 read(65, "\16\0\0\0P\311\335\240\1\0\4\0<\0008\1\0 \4 \0\0\0\0\240\231\300\fp\230`\2"..., 8192) = 8192 read(65, "\16\0\0\0\260*\335\240\1\0\4\0008\0\350\0\0 \4 \0\0\0\0\20\230\340\0178\224\256\7"..., 8192) = 8192 read(65, "\16\0\0\0\20\10\337\240\1\0\4\0004\0h\0\0 \4 \0\0\0\0\210\231\356\f\230\225\340\7"..., 8192) = 8192 read(65, "\16\0\0\0\220\310C\241\1\0\4\0@\0\260\0\0 \4 \0\0\0\0H\231p\r0\227.\4"..., 8192) = 8192 read(65, "\16\0\0\0\350-\301\241\1\0\4\0<\0X\0\0 \4 \0\0\0\0H\232p\v\0\226\216\10"..., 8192) = 8192 Descriptor 65 is a DB file: [root@lpo-postgres-01 ~]# cd /proc/16663/fd [root@lpo-postgres-01 fd]# ls -l 65 lrwx------ 1 postgres postgres 64 Oct 7 23:26 65 -> /software/pgsql/m-over/PG_9.0_201008051/16417/1572186.7 So, essentially, the process is reading block by block, in a sequence. What, exactly, does "effective_io_concurrency" mean? -- Mladen Gogala Sr. Oracle DBA 1500 Broadway New York, NY 10036 (212) 329-5251 www.vmsinfo.com