Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ldGs0-00017j-S2 for pgsql-general@arkaria.postgresql.org; Sun, 02 May 2021 18:31:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ldGrz-0005aU-Ez for pgsql-general@arkaria.postgresql.org; Sun, 02 May 2021 18:31:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ldGrz-0005a6-47 for pgsql-general@lists.postgresql.org; Sun, 02 May 2021 18:31:07 +0000 Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ldGrw-0003PV-Uq for pgsql-general@lists.postgresql.org; Sun, 02 May 2021 18:31:06 +0000 Received: by mail-ot1-x32f.google.com with SMTP id d3-20020a9d29030000b029027e8019067fso3147588otb.13 for ; Sun, 02 May 2021 11:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=D2/+62T94r9aqh+/qs6Ea0YeXevYEemYz7dtxIV8rmo=; b=YkB+tZQuW+3C0xqOVGa1HDMdpuHmziAZWtMkNMlxeROgdMIt+CQR0Qh6XvFtfQ4L9P utLzXEgOKnBtXWvPEUVjPFu6tpxCGAlCvC2E2iza6L3Q4/Vi8Kun05QKkciI2UWRP1qP MSX6Z5DgM/xjgYVAf7sIW/K0/Z8DU1uSyRx6y+8F8chmK5ZRbQQbS0sL+kWss6qFahRW HFYrEeE6V6Xm+XQ0I8AJji/phkJpXLGt23+hVKv9/w9ZmLHv+7EpFYu8B1Gq6c3VTKzO tsNcI1tbM2r8t7InX8JooID0tKDtdHUPpPoK8bcS4IUbO0e1tHl02qKeGu2zTYII6B0+ BRWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=D2/+62T94r9aqh+/qs6Ea0YeXevYEemYz7dtxIV8rmo=; b=qH4gRyt/SCucz3Rr19db8h7qIuDu1JFM07PFrMOYCyIYzKVnQWH4VYXmGhX0yREBM1 WbMVQkLprOFOLo/caAPeG+jTwxmubE6sFtVH15VYgKN3TlpS7WH/ypzM8yEFHvuFw4Jd m6JzFwpa/cxjNcQmy57wTlbQj1/HgxOM/nL5K6Qea2VvT1j5VJSkB5qB3g33jhuI0tGL Qp3WgJYGiC1IWkgjaCiBcd4cN1W7BHUb+pdV0VENoYQgjBNQscx6Wntn/md2ErlVm+VS QFOxdQzNPkS3x6ARHfTwmCxHlo7iaTNVrAOvzYwzFHWDjspHyE2Vl+nlB4pYPIgDZWyn r5SQ== X-Gm-Message-State: AOAM532daQB3WFc9+gkwYNMFbk7MhVDiu32ZrCYPgBr5NiDWSWa5WfFz 6vlvOD6tu9W8rTVs0YhME1i4yPBqsKg= X-Google-Smtp-Source: ABdhPJwV5k8UOuxHLVUzevP9FOQdbma2tq5fqCNVkAj3EbHZOQ9SII4ssWPM0k0nHDcPW/6IskO21g== X-Received: by 2002:a05:6830:1de9:: with SMTP id b9mr12148165otj.84.1619980262875; Sun, 02 May 2021 11:31:02 -0700 (PDT) Received: from [192.168.88.10] (ip174-67-141-204.no.no.cox.net. [174.67.141.204]) by smtp.googlemail.com with ESMTPSA id o25sm2294131oie.45.2021.05.02.11.31.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 02 May 2021 11:31:02 -0700 (PDT) Subject: Re: PostgreSQL, Asynchronous I/O, Buffered I/O and why did fsync-gate not affect Oracle or MySQL? To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: <25742a94-aa0d-1595-fe0d-6931e81c1d24@gmail.com> Date: Sun, 2 May 2021 13:31:01 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------80BF9A726DA44908971D7605" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------80BF9A726DA44908971D7605 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 5/2/21 8:46 AM, Pól Ua Laoínecháin wrote: [snip] > Now, I'm not quite sure that I completely comprehend matters: Is there > a difference between Asynchronous I/O and Buffered I/O? * Asynchronous (a-syn-chron-ous) is an adjective which means "not together with time". * Buffered means "read more than you need at the moment, and then do processing to/from a cache". They are not mutually exclusive. Their antonyms are * Synchronous (syn-chron-ous): together with time. * Direct, where you read/write only what you need at the moment, directly to/from the IO device. Thus, *async* IO is where you tell the IO subsystem that you need something, and then *go off and do something else*; the IO system interrupts you when the data has been delivered. *Sync*hronous IO is where you request IO and then *wait for the data*. -- Angular momentum makes the world go 'round. --------------80BF9A726DA44908971D7605 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit On 5/2/21 8:46 AM, Pól Ua Laoínecháin wrote:
[snip]
Now, I'm not quite sure that I completely comprehend matters: Is there
a difference between Asynchronous I/O and Buffered I/O?

* Asynchronous (a-syn-chron-ous) is an adjective which means "not together with time".
* Buffered means "read more than you need at the moment, and then do processing to/from a cache".

They are not mutually exclusive.

Their antonyms are
* Synchronous (syn-chron-ous): together with time.
* Direct, where you read/write only what you need at the moment, directly to/from the IO device.

Thus, async IO is where you tell the IO subsystem that you need something, and then go off and do something else; the IO system interrupts you when the data has been delivered.
Synchronous IO is where you request IO and then wait for the data.

--
Angular momentum makes the world go 'round.
--------------80BF9A726DA44908971D7605--