Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tLrFO-00HY4U-Po for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Dec 2024 22:01:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tLrEO-00Ei9G-0q for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Dec 2024 22:00:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tLrEN-00Ei94-Md for pgsql-hackers@lists.postgresql.org; Thu, 12 Dec 2024 22:00:24 +0000 Received: from mail-io1-xd29.google.com ([2607:f8b0:4864:20::d29]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tLrEM-002VsP-Ky for pgsql-hackers@postgresql.org; Thu, 12 Dec 2024 22:00:23 +0000 Received: by mail-io1-xd29.google.com with SMTP id ca18e2360f4ac-844e61f3902so46596439f.0 for ; Thu, 12 Dec 2024 14:00:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734040822; x=1734645622; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=KmPRVDQesSGBwiSVUI/upCENVd0lwX0lNLa45WncQrg=; b=Ku2Hrzua7Jb02aKmwHxgVMQVBoOzSQAXxO91XvHpMuSvXCIAAgrQdHSzh+T9EJLJY6 wXw+iY5/v6XPMfHg5fR/sZLZI5SimWZkbPtVEjAc4ZZM7Wfv7R+jvGQ+3pq2XU2KOzfL Mazkv2pzR8A2duK+QYapRTY1v7nphtwyRKh+CZuxAxxZ8vCPj3zBWJS2R4g4t9WiF2Hj lHFo+7QZXLD2BJ21h77eUqZRM2M9NJndQx558zf22PdpHYlxlLbxx+1v0Oq20CCqCBLB euwDkyHeMhVJk5MgcOd0hbSdSLj93TgNU7X9DPpfZ4jW6uzXTazPzsgfJW8PCRViY4QL aNzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734040822; x=1734645622; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=KmPRVDQesSGBwiSVUI/upCENVd0lwX0lNLa45WncQrg=; b=jeOVQmWNDsQjj1fmD88TVxkFp0xbVqgbkFqdNzoC9+CIjhPAU+EwK8EbDR5LWshwwv RE5oMYeFV1ciJqQkHLujaF8n+DJgj4Gn5sZ63CmZj+Evsh/S4XxQDZUNDJrxlvR/uHtL LuTzbdJVV+4Jfapz3wVEIIjmmwxlfgBwjpOR0iHId6ue5/v2Wo4/dHmf4ERz5PM9zvPP kC2IzGUcH9WaRyNq9FmVLmrPQTLOqtIudcf5xTNds9mT8HCWdsX1s7faxoL+lEiEwMFl Zje9q08mpQDbxkzdCG6MH2gcxq0SG0vxbpLtXDJfVkr2fPm1JJ/MfM01yjxLQR74dVdE A6/A== X-Gm-Message-State: AOJu0Yymn1EGiarHutD+HJjhMiGhCW+2cZ8Na+fa4ASy+dtoqgrYxM26 Xa0v4O+3s4C+nMKUvebbIGtTwW5bPGhr0GfQjkc0kw1vddC7+ucL X-Gm-Gg: ASbGncubGQgTKfRyx1yGEaSm+HOpbeKaOStQVpC3+af6eu2qODuR0PrCCwIw3lwKaGK 5/toNdixKx9ZNePtkKcadLUtspUJrsShpYjbitm7NlfcvMlWiFTzNqb1cD6cdmTbkmIZiyezj6o y/xsPCQZUyNBfdW643eq3OS6GTXdFQ80UXUJLRni8BzN+LBIcE23X7Fa8lsdH/lo81GEH5bnMcl GJNybaMtPCoP2kRgWwZaM0HdYxFK+LHlCxLOmvXxu9fxCsG9RGM7ag2lN5TDYPWz+NpW6W6elXv YnL1mfqV68qfCWA5rPr7nQOlFrxYr/jl3ciIyTWn3QQod3E= X-Google-Smtp-Source: AGHT+IFe5wT4xXf4hYnNvtk+o/gInXThL4i0lXd1hyvERNDXFUefU8HAWOKtGW5Q24DnGQ4qLHl1QQ== X-Received: by 2002:a05:6602:15c5:b0:843:e8d0:a728 with SMTP id ca18e2360f4ac-844e87b275dmr60414139f.4.1734040821937; Thu, 12 Dec 2024 14:00:21 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4e2c40f1a27sm2072687173.119.2024.12.12.14.00.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2024 14:00:21 -0800 (PST) Date: Thu, 12 Dec 2024 16:00:19 -0600 From: Nathan Bossart To: Thomas Munro Cc: pgsql-hackers@postgresql.org Subject: Re: connection establishment versus parallel workers Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Dec 13, 2024 at 02:29:53AM +1300, Thomas Munro wrote: > Here's an experimental patch to try changing that policy. It improves > the connection times on my small computer with your test, but I doubt > I'm seeing the real issue. But in theory, assuming a backlog of > connections and workers to start, I think each server loop should be > able to accept and fork one client backend, and fork up to 100 > (MAX_BGWORKERS_TO_LAUNCH) background workers. Thanks for the quick response! I'm taking a look at the patch... -- nathan