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 1iiNEK-0004jf-QZ for pgsql-performance@arkaria.postgresql.org; Fri, 20 Dec 2019 18:42:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iiNEJ-0005rt-H8 for pgsql-performance@arkaria.postgresql.org; Fri, 20 Dec 2019 18:42:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iiNEI-0005rl-Tq for pgsql-performance@lists.postgresql.org; Fri, 20 Dec 2019 18:42:27 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iiNEF-0000rI-EY for pgsql-performance@postgresql.org; Fri, 20 Dec 2019 18:42:25 +0000 Received: by mail-wr1-x435.google.com with SMTP id z3so10388875wru.3 for ; Fri, 20 Dec 2019 10:42:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=bv/LUwxC1taKn7k0Dm5aRl1fQLrp7MmTSCCAW1cz63E=; b=qzCWfcS6D01cjiiJ3PQDypUgFVjS5ovNQEhCA+Yt/fBzF+4HkuyLQKl6EVne7kCCUp hKUJ+4a6blsD4DhphpM5WbLH0o63GAd6oS0EzGI4Q04MIJe+BXMB3/0YJ6GuM0oLzbTo yM0g5Y4EPG7uRzm+A1Y2rBvuWKJP5RmuLyQzHFKgHFql6a6DCH3pTi666ZIBTDIRVyxc h0blEqfapQQSj1lSVMkOwQMflzXR2dUcTjuYHFb5u2MzVHElKKm5JLnx96tEJyr7At9x nBmdobl+oT/diWnQh35MaZ1ZRDxPOGPJY6RfI2CgZB3CmnQp5DIQSDpauIvcnT+vYCuM WVvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=bv/LUwxC1taKn7k0Dm5aRl1fQLrp7MmTSCCAW1cz63E=; b=icov1ZZYv9xHNnFP6or3a6L/vvo/tsHLZVCWttjmt8iWCqcoHox25FXx6v68SlVuAz FV2f94ZiU5Loqq32e3YJfijOeQTJ4f5hvcUKQaikuXLL/wVXNx0Po7gycwlVxCJQGfXy K1O+oQc8XCviGLXcbrbxjkzFhEDoOhPjAEiXa//4E2y4eTyJfDRzKI9YrREGS5h/aXv7 4Tgqn1NkJAKflNmP+2uSWxULh1k87wIs7ZAZgbv1QtC6PR1dV3vtcX0i9lETVnGvHkIJ TBRs0hYSLB3IjkOtlCV6kuvwWw0fDgtKIk6l4ci4/xd/+N/NrrEhm/7g35xINJjKRd9S Ewqg== X-Gm-Message-State: APjAAAVG2HHHOFiykURXP19CVXEz4h8hGoRyoNBEsxK7ljUIBQ9b4FGh seWTQipMyq+p5vNCP9vq52GQr86Er7k= X-Google-Smtp-Source: APXvYqwZpKZIg75Z/tQEMUM/W3nYYFbki/+6nxpAi+gYPu36xnDu/3opW/bcDZRT6stewzfBM6Kcgw== X-Received: by 2002:a5d:6048:: with SMTP id j8mr16719007wrt.41.1576867340942; Fri, 20 Dec 2019 10:42:20 -0800 (PST) Received: from localhost.localdomain (217-149-175-184.nat.highway.telekom.at. [217.149.175.184]) by smtp.gmail.com with ESMTPSA id l2sm10305262wmi.5.2019.12.20.10.42.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 10:42:20 -0800 (PST) Message-ID: <9d984638e80cd99a699ed85b3cebcc855d1cf8d1.camel@cybertec.at> Subject: Re: How to set parallel_tuple_cost From: Laurenz Albe To: Jeff Janes , "pgsql-performa." Date: Fri, 20 Dec 2019 19:42:19 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, 2019-12-20 at 13:03 -0500, Jeff Janes wrote: > The docs for parallel_tuple_cost are quite terse, as the reference section of the docs usually are: > > "Sets the planner's estimate of the cost of transferring one tuple from a parallel worker process to another process. The default is 0.1." > > Usually you can find more extensive discussion of such settings in informal resources like blog posts or mailing lists, > but Googling the name I don't find much for this setting. Is there good information out there somewhere? > > If you were take the doc description literally, then the default value seems much too high, as it doesn't take > 10x the (default) cpu_tuple_cost to transfer a tuple up from a parallel worker. On the other hand, you probably > don't want a query which consumes 8x the CPU resources just to finish only 5% faster (on an otherwise idle server with 8 CPUs). > Maybe this Amdahl factor is what inspired the high default value? Hmm. The parameter was introduced into the discussion here: https://www.postgresql.org/message-id/CAA4eK1L0dk9D3hARoAb84v2pGvUw4B5YoS4x18ORQREwR%2B1VCg%40mail.gmail.com and while the name was changed from "cpu_tuple_comm_cost" to "parallel_tuple_cost" later, the default value seems not to have been the subject of discussion. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com