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 1nZHh0-0004xm-7s for pgsql-performance@arkaria.postgresql.org; Tue, 29 Mar 2022 19:39:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nZHgz-0002Tz-45 for pgsql-performance@arkaria.postgresql.org; Tue, 29 Mar 2022 19:39:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZHgy-0002To-Mp for pgsql-performance@lists.postgresql.org; Tue, 29 Mar 2022 19:39:48 +0000 Received: from mail-il1-x12f.google.com ([2607:f8b0:4864:20::12f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nZHgw-0001HX-0K for pgsql-performance@lists.postgresql.org; Tue, 29 Mar 2022 19:39:48 +0000 Received: by mail-il1-x12f.google.com with SMTP id e9so13110083ilu.9 for ; Tue, 29 Mar 2022 12:39:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=p1Y444s+PXD5dELoFpHw6+g+uOyCs0FZBcLxRfK7Z8o=; b=Z6GlwwL9M9ZM9Wqsig1tvV7myD6cKq/Lk1dGRFxm7ACRn2vBXSxm6CFkJEMPFme8nB wN8Ib5iXavc/XfhQXKb2+odkIBATryB1vmJJ7OKeLxABcqJUTU9R0RGe/SBGqTZBhMEl JuBqWfliNExY+B7TKQYHNTzedCQMT6N0xOPFWlJgjC3NkZA8a/ZM1HNIdNcZf4we/9VV My5/wSxbS5tXtU6TTUmIgkVqf9A/7iqMtL4hpzYm9b+WU1Bx/kGuDsRe0+kaL+iS3q3j sU5CU4NN1kc/GugiXh6F9112RE15HAMixyxnquXGdnkek6X5au2mJZIwKQpOXC2zrX2F dmSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=p1Y444s+PXD5dELoFpHw6+g+uOyCs0FZBcLxRfK7Z8o=; b=GS6YZyc3ghY7ZoMqJifFBQBZg8I5l4MbZIPR9XNu+Hd9X1cqJa59ih8aHgY9IT+vOF przyqVQ8G8VU0lC3KhLnYO1b8TnQimK/jgSSfkD5sS9WsDen083q3Qw1kkMjRHFCTaz5 AqwyL7gdAQCX+UNIc83pY6gsRzMRwuXvtYbVhxbGvF33UqQoLYor5RI/hgcbid2ywpzr 5b2diL7Tg6dR2/nvwIfZSSwboktZNZ+t9NLg/ccShlIymA2WxoGU6KWkvMKCOnVs11Nk WnvIFH7AkkxIEHL4i9/YH+2QnjnvRnbd/QQwDe5+OIwCaOzeL5kSfnuMpOKjciHOnMkN o6Hg== X-Gm-Message-State: AOAM532STdeLp7CBEAC+Nxzs/1drjYtE7acHAhabIFeNmez1x4A8LCmh yWnuy95YnB/XkOEm3Whb8vB/XDK6KdoLtg== X-Google-Smtp-Source: ABdhPJwL8S2J/cKLOuHRNkISnvWhLCGurBwgoAF+thDaSQUb3yW++ShX/SAXPUJGbT93rXXckTo//A== X-Received: by 2002:a92:d088:0:b0:2c9:be41:5282 with SMTP id h8-20020a92d088000000b002c9be415282mr5220842ilh.301.1648582783065; Tue, 29 Mar 2022 12:39:43 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id o2-20020a92c682000000b002c82a16db8csm9404746ilg.24.2022.03.29.12.39.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Mar 2022 12:39:42 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id DF326800DDD; Tue, 29 Mar 2022 14:39:41 -0500 (CDT) Date: Tue, 29 Mar 2022 14:39:41 -0500 From: Justin Pryzby To: Rambabu g Cc: pgsql-performance@lists.postgresql.org Subject: Re: HIGH IO and Less CPU utilization Message-ID: <20220329193941.GB28503@telsasoft.com> References: <20220329182453.GA28503@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Mar 30, 2022 at 12:52:05AM +0530, Rambabu g wrote: > > What indexes are defined on this table ? > > How large are they ? > > There are three indexes defined on the table, each one is around 20 to 25GB > and the indexes is create on Did you mean to say something else after "on" ? Show the definition of the indexes from psql \d > postgres=# explain select distinct empno from emp where sname='test' and tp='EMP NAME 1' Is this the only query that's performing poorly ? You should send explain (analyze,buffers) for the prolematic queries. > > > Hypervisor vendor: KVM > > > > Are KSM or THP enabled on the hypervisor ? > No, the Ec2 VM is delicate to postgres DB instances only. Oh, so this is an EC2 and you cannot change the hypervisor itself. > -bash-4.2$ tail /sys/kernel/mm/ksm/run /sys/kernel/mm/transparent_hugepage/khugepaged/defrag /sys/kernel/mm/transparent_hugepage/enabled /sys/kernel/mm/transparent_hugepage/defrag ... > ==> /sys/kernel/mm/transparent_hugepage/defrag <== > [always] madvise never I doubt it will help, but you could try disabling these. It's a quick experiment anyway.