Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e00Dy-0005tP-S0 for pgsql-admin@arkaria.postgresql.org; Thu, 05 Oct 2017 07:05:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e00Dx-0001tS-LS for pgsql-admin@arkaria.postgresql.org; Thu, 05 Oct 2017 07:05:37 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e00Dw-0001s1-Oh for pgsql-admin@postgresql.org; Thu, 05 Oct 2017 07:05:36 +0000 Received: from zeus.infosplet.com ([91.185.195.51]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1e00Ds-00017n-KJ for pgsql-admin@postgresql.org; Thu, 05 Oct 2017 07:05:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infosplet.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=CAahqzSJz9HUYap+DUf6T/jlp9abCgsLu0/ZBtvpbc4=; b=xXaIBpRL1+plo4SDVuB3bIOosP LdhhP0JhkedtI31zpDzB7Mltp0xRfXcG1hpRjWhikOARwAtMPPp3H+Av51j++6LnFUJkkomW6TWtd 4EbkaarxH0nNJVdvsT0COj036w8LKfd5Ibeg8KvqUKHzORo2k2lNHXJemnWI/ZUQj30gDVbftYg5T VbgLSOXhK0WtWpXhqTsHjhBffPlvjLC7fS/9v32B+kWLyNqlIs2Tm0kjqDjCC7m4a5rouXb91zQqd gNW7DSNWwY/44/uBBExWYbz/yCTzKd6Z+CBoQYQkYAbhvJGTG+gL18Pv4YPVY5Xv6cUWpTdxOU26z L5BLB5Hw==; Received: from 84-255-204-153.static.t-2.net ([84.255.204.153]:60869 helo=ip-192-168-1-133.eu-central-1.compute.internal) by zeus.infosplet.com with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.87) (envelope-from ) id 1e00Dn-002J2J-S3 for pgsql-admin@postgresql.org; Thu, 05 Oct 2017 09:05:27 +0200 Subject: Re: High CPU usage from a vacuum process but does nothing To: pgsql-admin@postgresql.org References: From: "Boris S." Message-ID: <6c3c0b4a-40ba-b5f7-9a8b-97fe43294e62@infosplet.com> Date: Thu, 5 Oct 2017 09:05:27 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - zeus.infosplet.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - infosplet.com X-Get-Message-Sender-Via: zeus.infosplet.com: authenticated_id: boris@infosplet.com X-Authenticated-Sender: zeus.infosplet.com: boris@infosplet.com X-Source: X-Source-Args: X-Source-Dir: 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 To sum it up, after reboot it looks alright, vacuum finishes promptly. On 04/10/2017 19:28, Boris S. wrote: > After migrating the server to a bigger machine, I'm noticing an odd > behaviour. If I begin vacuuming manually, it starts OK: > > > 0 pages are entirely empty. > CPU 0.00s/0.00u sec elapsed 0.00 sec. > INFO:  analyzing "public.table024484" > INFO:  "table024484": scanned 111123 of 111123 pages, containing > 4909226 live rows and 0 dead rows; 150000 rows in sample, 4909226 > estimated total rows > > But then it gets stuck indefinitely with high CPU usage and command > never exits. kill -TERM isn't helping, process stays on with ~99% CPU > usage. Stracing this process gets me just: > > strace: Process 102011 attached > strace: [ Process PID=102011 runs in x32 mode. ] > > Which is an odd message, all other processes give normal strace output. > > latest pgsql 9.5 (same on old and new machine) > Ubuntu 16.04 > > Values in "cat /proc/102011/io" stay the same. > > Autovacuum and other processes, queries aren't affected and can be > straced normally. Disk IO is low (checked with iostat) > > Any ideas on what else to try? > > -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin