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 1hCeEy-0003Zi-Sl for pgsql-general@arkaria.postgresql.org; Sat, 06 Apr 2019 05:51:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hCeEx-00014V-HH for pgsql-general@arkaria.postgresql.org; Sat, 06 Apr 2019 05:51:43 +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 1hCeEx-00014O-5f for pgsql-general@lists.postgresql.org; Sat, 06 Apr 2019 05:51:43 +0000 Received: from mail-ot1-x344.google.com ([2607:f8b0:4864:20::344]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hCeEq-0001PN-Fx for pgsql-general@lists.postgresql.org; Sat, 06 Apr 2019 05:51:42 +0000 Received: by mail-ot1-x344.google.com with SMTP id e80so7594822ote.5 for ; Fri, 05 Apr 2019 22:51:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=ia8Nuv8as45nT2wMOnw9NCARuvFR1pCDbBTm8N/xVtU=; b=pkmKdP892hJ7UHz/5pTXIqMJSw9PFN5/8Xs/iJAAR1KV7ECyYqRVUz39G+XhyAaJYP Tmc6J7lw2We6hBG5NNYgZSNaN7Tjxan7wI+Z2ZtYEwfqkEZVfjwAKla8wzv51VGZGPDC F1/uGyfbreijvXxNPnOWcoKCmFgdyLnXfhXR7wYTLEcxIgT2dHGPD6zdu74tI9alnmET Uz41ymKJgzlswpj2n92XJFmXSnizfZOmzELg8RmFQWBclkzKFJt97sbuoCpiCQ/rULXb N6fvagMXLC5SQksgQ5YjSOp/qX9+VJRj/9BxNH0xwGjFnk11068BPFTNr56JAUVpNzsA kdqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=ia8Nuv8as45nT2wMOnw9NCARuvFR1pCDbBTm8N/xVtU=; b=PKtdLpMhhT8K63Vr/0UGYWy2tV6iIsuaCo9q31lXYAlKCacuSYrcMlFpwiuAipKOHX 36BoCM623h5MXEDWng098Ax8ZBoNq4N2CDD4DrPJ5d2Tl1jIrj4rrhkUNUJrrSkiZtFS cuhravnCNQgxDMHObclYhLwc+Vl5ssFGkF6JnwfX1t7kUQ6EJTQZ/7zobc/RteCyPj4q yFBKUEn+K6hY0Q53wSgEy9ey/l8fnhIprNOXmRTjvN89iBMMk4YF0dQmbhRwPFJobXxC /GrGmVI+FarmJ8DYHNDPa5p7qKKjlSqrC3RIGcK5VweMLndIqXlxLO31Xis7wjN40/qr VEgA== X-Gm-Message-State: APjAAAVC1hV4o6jzz43J6wDIvbqAKNEwE8OG1YY3nJ5+H7IBrgcypgZw Wqb+wyI/9ketawiT2ERB0vdWW+qC11UPuQ== X-Google-Smtp-Source: APXvYqzYf55TFn5Zmd5m1kzy87rwvDpQXRtr/IxsIeW+yVuQztFg2t7o0AevZLiYLb507zzIDqX1UA== X-Received: by 2002:a9d:6206:: with SMTP id g6mr11366987otj.7.1554529894511; Fri, 05 Apr 2019 22:51:34 -0700 (PDT) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id s31sm10653185otb.35.2019.04.05.22.51.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Apr 2019 22:51:33 -0700 (PDT) Subject: Re: 10.2: high cpu usage on update statement To: pgsql-general@lists.postgresql.org References: <214e8730-17b5-16be-afd6-8b6175dd15ab@gmail.com> From: Ron Message-ID: <3b877cb8-17ee-e2c8-9c4a-9ed46987484c@gmail.com> Date: Sat, 6 Apr 2019 00:51:32 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <214e8730-17b5-16be-afd6-8b6175dd15ab@gmail.com> Content-Type: multipart/alternative; boundary="------------2D51217F871D9A56C9166178" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------2D51217F871D9A56C9166178 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 4/5/19 5:45 PM, Kevin Wilkinson wrote: > on 10.2, we're seeing very high cpu usage when doing an update statement > on a relatively small table (1GB). one of the updated columns is text, > about 1k bytes. there are four threads doing similar updates concurrently > to the same table (but different rows). each thread does an update about > every two seconds, i.e., the tables gets updated every 1/2 second. the > stack trace below shows the process *stuck in reading the update results*. > this seems very odd. has anyone seen something similar?  this is a modest > server of 8 cores, all of which are 90% busy. Does the table have supporting indexes? -- Angular momentum makes the world go 'round. --------------2D51217F871D9A56C9166178 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit On 4/5/19 5:45 PM, Kevin Wilkinson wrote:
on 10.2, we're seeing very high cpu usage when doing an update statement on a relatively small table (1GB). one of the updated columns is text, about 1k bytes. there are four threads doing similar updates concurrently to the same table (but different rows). each thread does an update about every two seconds, i.e., the tables gets updated every 1/2 second. the stack trace below shows the process stuck in reading the update results. this seems very odd. has anyone seen something similar?  this is a modest server of 8 cores, all of which are 90% busy.

Does the table have supporting indexes?

--
Angular momentum makes the world go 'round.
--------------2D51217F871D9A56C9166178--