Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1omGrN-0002qQ-Cr for pgsql-general@arkaria.postgresql.org; Sat, 22 Oct 2022 15:56:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1omGrM-0005jy-3S for pgsql-general@arkaria.postgresql.org; Sat, 22 Oct 2022 15:56:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1omGrK-0005jo-6N for pgsql-general@lists.postgresql.org; Sat, 22 Oct 2022 15:56:27 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1omGrH-00079n-4U for pgsql-general@lists.postgresql.org; Sat, 22 Oct 2022 15:56:25 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 0409B3200312; Sat, 22 Oct 2022 11:56:20 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 22 Oct 2022 11:56:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1666454180; x= 1666540580; bh=hpCsmeHeGo1effl+TSzt1hfYnl9iQdjc98NaW2d6Wiw=; b=u uM/5inUoVbvJKyXNrc8dxJc11SC26T9gdT3z/RW67qd70p++2zwbIBkGPaKLm1F3 RKPUYGXLdNM6TUaQ+q2ysHByWudgNDUS8dHcIdzhFNPiq8RyWyv9PHsHu65fDUQ0 YKD9cFAg0l6EVSLbGPtc9qJ0IZTR3H/kM8MEfdKpJtJcb19M0FSpUetvuib29Rlw kKTbnG3HwBnaiRDOh60Dm8XVuh4/D4T+EuaqNa0S+cBmod/lmTgSxkPHznqOYGvA Bxwa1qGq5lICOPFS50G28a+x9DAhrLWli1noBEocUz442rcYxtxT/qDLFLSx8DmP GWM6IgRGraEXkDtw7nesQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1666454180; x=1666540580; bh=h pCsmeHeGo1effl+TSzt1hfYnl9iQdjc98NaW2d6Wiw=; b=Nb8WehXAEm0wRp3ig WjxhIN0hinDWk3mSl6cAeA6tgMVym4EzDweoYe32Niy+Z0hfTUFfIito+yRhhgd0 pcTVFuo8u9PlOdPgaeE6vZsCtKTw92EljIIFzj+ZduCJYy7UdRORy508v/PPD2IJ VIXZDODHxZ/UmHEL1nTv9LuNxVdxpvikNfoGRkKflAEJ0Elp60l36iapb46/7FMS 5NHRx/3pKvGVRnbbg6696DTmz3x/fQJ0h4euC8i+vyc3oM3IpD8orNcwA68qMy1a LGBTJDRyvZJ2votnPWHI8kxrV1KCQBEOkKqBsR2aDbZ3zGs/o00FpAV1K5Lt7pUS XufJw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrgedttddgleefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtje ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepvedvkeeihf duhffhtdekleegffduiefgteejgeffgffhteefleeludfgleelgeevnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvh gvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 22 Oct 2022 11:56:19 -0400 (EDT) Message-ID: <253189e9-764d-48ec-d911-4288a5f864fe@aklaver.com> Date: Sat, 22 Oct 2022 08:56:18 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: High CPU usage To: ertan.kucukoglu@1nar.com.tr, pgsql-general@lists.postgresql.org References: <005e01d8e4be$6a516cf0$3ef446d0$@1nar.com.tr> Content-Language: en-US From: Adrian Klaver In-Reply-To: <005e01d8e4be$6a516cf0$3ef446d0$@1nar.com.tr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/20/22 12:59, ertan.kucukoglu@1nar.com.tr wrote: > Hello, > > I am using PostgreSQL v14.5 on Linux Debian 11.5. I recently observe very > high CPU usage on my Linux system as below > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ > COMMAND > 2357756 postgres 20 0 2441032 2,3g 4 S 298,7 67,9 2114:58 > Tspjzj2Z The USER is the system user postgres which could be running any program not necessarily the Postgres server. In this case that would seem to be the program Tspjzj2Z. Try running: top -U postgres -c to get the full command line under COMMAND. > > I could not find any file named Tspjzj2Z on the file system. I could not > find PID number using below SQL I doubt this has anything to do with the Postgres server itself. Is this machine accessible to the Internet? There is the possibility you have had an intrusion. > > SELECT * FROM pg_stat_activity > > I also see another suggestion like below to identify long running queries > > SELECT max(now() - xact_start) FROM pg_stat_activity > WHERE state IN ('idle in transaction', > 'active'); > > I get no long running query at all. > > There is no replication of any kind. This is a single instance server which > alows certification login only. > > I appreciate any help to figure this out. > > Thanks & Regards, > Ertan > > > > -- Adrian Klaver adrian.klaver@aklaver.com