Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpX5N-0008UA-3b for pgsql-performance@arkaria.postgresql.org; Mon, 22 Jul 2019 12:06:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hpX5L-0003Kb-8W for pgsql-performance@arkaria.postgresql.org; Mon, 22 Jul 2019 12:06:31 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpX5K-0003KT-TR for pgsql-performance@lists.postgresql.org; Mon, 22 Jul 2019 12:06:31 +0000 Received: from mail-io1-xd2a.google.com ([2607:f8b0:4864:20::d2a]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpX5D-0007NH-Cr for pgsql-performance@lists.postgresql.org; Mon, 22 Jul 2019 12:06:30 +0000 Received: by mail-io1-xd2a.google.com with SMTP id q22so73302910iog.4 for ; Mon, 22 Jul 2019 05:06:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IBRIPLcpCz5z4mYKNBNv8HnDF4RWxaM20avhnhCSBC4=; b=cYPjsJ7jSEYcBD8XPRrrbvK2jHrKL4nHQEKzFGRLAWLUwY6/R2GW+D99GaLyvxj5gZ F6gVnZPrlh8zUTdo8UZFx+9F3bl8yr20LzJMFYT5qrRK+Oxh+Su62T3sacDwSMVRjot3 ZkL9rIRfCTDrEuYLQaTWq/toOGvyVgFzLuOkMV1+WX6lpdutAppA3pkDP8jAPUgXqlC8 naTEdMY2gY9ebOBsN75AQqYaaUbOaK4Z3C5gU/9FBRUJ1ktx05+UnRoy8y1JKj7kHmgZ dwyc81MBhvvb2WO0KjO+dydiAoffjCqMvaqhPFAVdpS3d2NvyVifX1it/K6+iIh6FSHW jYTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IBRIPLcpCz5z4mYKNBNv8HnDF4RWxaM20avhnhCSBC4=; b=bkMCTGoRDV3KIduVHYrIT1CCY2ct1aRM5JzhlqZAbGWgDTprvccRC7LfKRTh/Fmmj7 NBDRrvXzmgwC868Zb91MxJlDL6rcfnPcyZ0kHRNqxfXB0YY3BCJmIWXJ5KSdOfTsO+di D9uaZ9XXapUdA9nadLpxFVjajUI9jFIPsqYrX6kFZd05xc3A/DSGa3UamHjnjz1/7etk tNez1i1sL9B0T5UzORGWRPk/C5AmKuME+cL5KZcVWW7gJJZSnPruMElfXxouDuUAyQEo IMP9Xw1vvM90Oh+YTblcWanVyQbGc05uN/O88rCUOJQQHg8npg26CelK2ImPM6QvUmVG R0lA== X-Gm-Message-State: APjAAAXz66wuRJXJ0MI8irRNKpB+Y7qTbbvu1thy3yacFXyfIUHy5FS6 jN7hKb8x3Ydk3unqc4lPFgz8XGoQ2ELK8HAL40MHig== X-Google-Smtp-Source: APXvYqxtiKD2RUB0gObR/eFK+ctWNCH3o765nyP51tURff2EJ8n1hvPuceiL4u6ObNV/3tnZsiVhcRN/gzG2Y/cXsF8= X-Received: by 2002:a02:5a02:: with SMTP id v2mr70561145jaa.124.1563797180551; Mon, 22 Jul 2019 05:06:20 -0700 (PDT) MIME-Version: 1.0 References: <54899ec9-5043-6f2a-01a8-0773f549b0a5@portavita.eu> In-Reply-To: <54899ec9-5043-6f2a-01a8-0773f549b0a5@portavita.eu> From: Rick Otten Date: Mon, 22 Jul 2019 08:06:09 -0400 Message-ID: Subject: Re: benchmarking effective_io_concurrency To: Fabio Pardi Cc: pgsql-performance@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000729525058e43e7ac" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000729525058e43e7ac Content-Type: text/plain; charset="UTF-8" On Mon, Jul 22, 2019 at 2:42 AM Fabio Pardi wrote: > Hello, > > > I recently spent a bit of time benchmarking effective_io_concurrency on > Postgres. > > I would like to share my findings with you: > > > https://portavita.github.io/2019-07-19-PostgreSQL_effective_io_concurrency_benchmarked/ > > Comments are welcome. > > regards, > > fabio pardi > You didn't mention what type of disk storage you are using, or if that matters. The number of cores in your database could also matter. Does the max_parallel_workers setting have any influence on how effective_io_concurrency works? Based on your data, one should set effective_io_concurrency at the highest possible setting with no ill effects with the possible exception that your disk will get busier. Somehow I suspect that as you scale the number of concurrent disk i/o tasks, other things may start to suffer. For example does CPU wait time start to increase as more and more threads are consumed waiting for i/o instead of doing other processing? Do you run into lock contention on the i/o subsystem? (Back in the day, lock contention for /dev/tcp was a major bottleneck for scaling busy webservers vertically. I have no idea if modern linux kernels could run into the same issue waiting for locks for /dev/sd0. Surely if anything was going to push that issue, it would be setting effective_io_concurrency really high and then demanding a lot of concurrent disk accesses.) --000000000000729525058e43e7ac Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Jul 22, 2019 at 2:42 AM Fabio= Pardi <f.pardi@portavita.eu= > wrote:
Hell= o,


I recently spent a bit of time benchmarking effective_io_concurrency on Pos= tgres.

I would like to share my findings with you:

https://porta= vita.github.io/2019-07-19-PostgreSQL_effective_io_concurrency_benchmarked/<= /a>

Comments are welcome.

regards,

fabio pardi



Based on your data, one should set = effective_io_concurrency at the highest possible setting with no ill effect= s with the possible exception that your disk will get busier.=C2=A0 Somehow= I suspect that as you scale the number of concurrent disk i/o tasks, other= things may start to suffer.=C2=A0 For example does CPU wait time start to = increase as more and more threads are consumed waiting for i/o instead of d= oing other processing?=C2=A0 Do you run into lock contention on the i/o sub= system?=C2=A0 (Back in the day, lock contention for /dev/tcp was a major bo= ttleneck for scaling busy webservers vertically.=C2=A0 I have no idea if mo= dern linux kernels could run into the same issue waiting for locks for /dev= /sd0.=C2=A0 Surely if anything was going to push that issue, it would be se= tting effective_io_concurrency really high and then demanding a lot of conc= urrent disk accesses.)


=
--000000000000729525058e43e7ac--