Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VBR3o-0000Xt-Iq for pgsql-admin@arkaria.postgresql.org; Mon, 19 Aug 2013 15:08:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VBR3n-0007Gj-Vp for pgsql-admin@arkaria.postgresql.org; Mon, 19 Aug 2013 15:08:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VBR3m-0007Eb-G3 for pgsql-admin@postgresql.org; Mon, 19 Aug 2013 15:07:58 +0000 Received: from mail-qe0-x22d.google.com ([2607:f8b0:400d:c02::22d]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VBR3i-0007pX-T1 for pgsql-admin@postgresql.org; Mon, 19 Aug 2013 15:07:58 +0000 Received: by mail-qe0-f45.google.com with SMTP id nc12so1671021qeb.18 for ; Mon, 19 Aug 2013 08:07:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:date:subject:from:to:message-id:thread-topic:in-reply-to :mime-version:content-type:content-transfer-encoding; bh=DjFBbuUri1JZgC5YUoPyo3rm959k8uXqbApaT5koBjQ=; b=FRYsrmAN29FTlol9V/EGsVniyALehQ6i8SY19gsn27V8wjuCr/wna2NGAHPuN47PKw WeIV0drLAkaaZ09GEmJQ5qihtLPY1BZy/ukw2Sa+Tx8bqEBIXcj3ukegSj815AyS7Ca7 Syc1G4Yw2nwenfhW8Fk0enqCfbec17IkM77WNvKAB6K6W6G9LiYhiBlM4iXKdTSYLb8O GG71hHhhoAKO15OI3RQJWd/3CEQmEHgEL4IamhrVk7KxfxS5fOHY7X1O6jle8v/ysvJ0 hZz4l0th7zkPDzEMCNjIz3P+IY4ovdJuwqEGoGVKtFg3s2qzh1nyecm0mMahSRdkpjV0 mJYA== X-Received: by 10.49.49.8 with SMTP id q8mr15929193qen.47.1376924873567; Mon, 19 Aug 2013 08:07:53 -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 w9sm17318835qag.4.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 19 Aug 2013 08:07:53 -0700 (PDT) User-Agent: Microsoft-MacOutlook/14.2.3.120616 Date: Mon, 19 Aug 2013 18:07:48 +0300 Subject: Re: postgres crashes on insert in 40 different threads From: Dzmitry To: Frank Lanitz , Message-ID: Thread-Topic: [ADMIN] postgres crashes on insert in 40 different threads In-Reply-To: <521232C2.1060801@frank.uvena.de> Mime-version: 1.0 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable 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 Yes- I need so many threads, every night I need load jobs from xml to DB. I need do it as fast as I can, currently it take 4h to load all of them(around 1000000 jobs). CPU/IO wait/percent is about 25%. Do you know how can I check other params related to IO wait ? Thanks, Dzmitry On 8/19/13 5:59 PM, "Frank Lanitz" wrote: >Am 19.08.2013 10:07, schrieb Dzmitry: >> I am doing a lot of writes to DB in 40 different threads =AD so every >> thread check if record exists =AD if not =3D> insert record, if exists = =3D> >> update record.=20 >> During this update, my disk IO almost always =AD 100% and sometimes it >> crash my DB with following message: > >Is this really needed to have so many threads and chances for race >conditions? > >Beside the mention RAM thing you box might have to low IO capacities for >this kind of trnasactions. What is the load and in detail the iowait >saying? > >Cheers, >Frank > > >--=20 >Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) >To make changes to your subscription: >http://www.postgresql.org/mailpref/pgsql-admin --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin