Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VBRHG-0001CJ-8c for pgsql-admin@arkaria.postgresql.org; Mon, 19 Aug 2013 15:21:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VBRHF-0002sP-NT for pgsql-admin@arkaria.postgresql.org; Mon, 19 Aug 2013 15:21:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VBRHE-0002s5-9l for pgsql-admin@postgresql.org; Mon, 19 Aug 2013 15:21:52 +0000 Received: from mail-qa0-x233.google.com ([2607:f8b0:400d:c00::233]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VBRHA-00087Z-Gv for pgsql-admin@postgresql.org; Mon, 19 Aug 2013 15:21:51 +0000 Received: by mail-qa0-f51.google.com with SMTP id f11so1898417qae.3 for ; Mon, 19 Aug 2013 08:21:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :in-reply-to:mime-version:content-type:content-transfer-encoding; bh=BXjdrbN0T2y0jPTBPhITCwhKoDhfP0apeUyvrx4mtcs=; b=F2wKGITsl/judwpNkMipWdbRiHH3FGpJEKX0xJ6uHAwsa4ZWV+ZS/TClhqoK8lTV2t oUuGo4HJZM4Yim/B0gallSrUW9W4J9bh4GXJXy1y+nlYDOdc+XZS9OdD6m5QXpSDNj8x 0hv2Ruo1gLYzeWZXokUfxmBhrrA1EgsxcOL3hC8STgszEclFSCczXAkrtuyGDjtEYY8L rX/SiHtk/DIslpUP1dEu5ARWobubSMJsrL13/dSLHfhJQAOZAk6RgryCm11eWIw4IJ5V iicbXEcIz2tdrIeybsgI6NF1zyr5eMG8f0ls+2KZS+MK/HU6YxtL13Ome2PSyIsT0cYI n1EA== X-Received: by 10.49.48.33 with SMTP id i1mr2734597qen.60.1376925706524; Mon, 19 Aug 2013 08:21:46 -0700 (PDT) Received: from [10.8.1.62] (40.166.255.173.client.static.strong-in91.as13926.net. [173.255.166.40]) by mx.google.com with ESMTPSA id h6sm17089087qej.4.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 19 Aug 2013 08:21:46 -0700 (PDT) User-Agent: Microsoft-MacOutlook/14.2.3.120616 Date: Mon, 19 Aug 2013 18:21:43 +0300 Subject: Re: postgres crashes on insert in 40 different threads From: Dzmitry To: Scott Ribe CC: Frank Lanitz , Message-ID: Thread-Topic: [ADMIN] postgres crashes on insert in 40 different threads In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Sorry for confusion. I have 2 machines, each machine run 1 process, with 20 threads in each - total 40 threads. Every thread connected to postgres and insert data. I am using technology, that keep connection opens. It means every thread open 1 connection when it starts, and will closed it - only when killed. But threads performing background jobs - it means they running always, so I keep connection always open. Thanks, Dzmitry On 8/19/13 6:17 PM, "Scott Ribe" wrote: >On Aug 19, 2013, at 9:07 AM, Dzmitry wrote: > >> Yes- I need so many threads... > >This is not at all clear from your answer. At most, 1 thread per logical >core can execute at any one time. And while many can be waiting on IO >instead of executing, there is still a rather low limit to how many >threads it takes to saturate IO capacity. If you actually tried to *run* >550 processes at the same time, you'd just be wasting time on contention. > >So, back to the question I just asked a minute ago in the prior email, do >you have any idea how many pg connections are actually being used? > >-- >Scott Ribe >scott_ribe@elevated-dev.com >http://www.elevated-dev.com/ >(303) 722-0567 voice > > > > -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin