Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLsFl-0006RI-6E for pgsql-general@arkaria.postgresql.org; Mon, 04 Dec 2017 15:01:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLsFk-0000kL-Px for pgsql-general@arkaria.postgresql.org; Mon, 04 Dec 2017 15:01:52 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eLsFk-0000kB-Ik for pgsql-general@lists.postgresql.org; Mon, 04 Dec 2017 15:01:52 +0000 Received: from mail-wr0-x22e.google.com ([2a00:1450:400c:c0c::22e]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eLsFZ-0005cb-OY for pgsql-general@lists.postgresql.org; Mon, 04 Dec 2017 15:01:52 +0000 Received: by mail-wr0-x22e.google.com with SMTP id k61so17634216wrc.4 for ; Mon, 04 Dec 2017 07:01:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=H+qq1fmpFIFEdSfoEh0C3vjxgzUDhZDulZLqyrM2SlI=; b=fky5maj39mg/Gb790Fvnc40oFA/JEsgtNsOHTHZT9oRMB2UBKs1sGqZjHGeboFZsXA kmfd1pa6o720RMPNTvePEPzROS4Y+Hxd6eogWVLZL83kuu4UKZgWQrGFdDqULy3zZoiP KjBX39HZTvaF1ITygwPE20tRNZSMJR8xgYmZNo2ulR5MZsTGVKIyzo6/h3JjgUk2dEZN BKgVVR72ZpfXOqQnS9zRro1PkJwJKwfmjasbsalSqAkjUy9hZpi5bSc1Ps2dEtRgFLEi 0fzeuXT3ewJml/oNUkJWZJwzD+OvqtahKBbmfCKCdU3PP0iBB5biWCWw7cvontwdfirC pvXg== 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 :content-transfer-encoding; bh=H+qq1fmpFIFEdSfoEh0C3vjxgzUDhZDulZLqyrM2SlI=; b=LK6OEP0MXVA10+VTy+FsBPJckTUBb+aa/Sgi65ak9yC20iN3YF51I0HzEZdLdTrOCI kXQgjrJ2FApygA+YHCK6bgWyyj0l5zHX/SqtQqXx694l8VF4qqFtNLW6CBO5lVNPqEYA YNvHAuTrtyWNojJ7vzWRE87Ih8FbPE0+Z2st0CFG/LgzwieI1sFDCEE7Be5jF7W1+ilm yXjYtSdXYGMcFm4RGR+q8MOZfTUdqF1/NASbPf1hc2u0YkfkYG9BcXg+I+vdB/GXGyjl am33KmaepZHtehRi+CXlf9o5mlqqPEv1z/ay4T5C28WjbSge+V3nlNAYagqjsozGPqUF PE9Q== X-Gm-Message-State: AJaThX6/Ej0sa2NGYw79IVP/TLXRoGzIyE+m0KIrFOtLyXqj9NswypYy DYmpDC1Go1GYCMZHZRlT7jV7cZ79J99dRJO83paOQITGloFJsQMgP6jI8zoCdVh9UyGfzIHjp0I j8n29CVWCzQ1EzCcQWPqLe0FYPrjbiidXGPMo/atRn86/DvDM29A/MXTQapti0xcPQG29+kjih5 S5qVFJ68E1j01stc7V X-Google-Smtp-Source: AGs4zMZ3g1OfiKce9Ujr0gbbFAzXizlUg6XBKvFevH/9DRPYMXDrHPH0kcewtheoRMMT+WJgHU5Kvw== X-Received: by 10.223.130.205 with SMTP id 71mr13974208wrc.101.1512399699944; Mon, 04 Dec 2017 07:01:39 -0800 (PST) Received: from [10.137.2.19] (ip-78-102-97-226.net.upcbroadband.cz. [78.102.97.226]) by smtp.gmail.com with ESMTPSA id p15sm10996653wre.24.2017.12.04.07.01.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Dec 2017 07:01:39 -0800 (PST) Subject: Re: Centos 6.9 and centos 7 To: Nicola Contu , pgsql-general@lists.postgresql.org References: From: Tomas Vondra Message-ID: <4663621c-d667-dcb1-8652-afdb5a6b1718@2ndquadrant.com> Date: Mon, 4 Dec 2017 16:01:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/04/2017 02:19 PM, Nicola Contu wrote: ...> > centos 7 :  > > dbname=# \timing Timing is on. cmdv3=# SELECT id FROM > client_billing_account WHERE name = 'name'; id ------- ***** (1 row) > Time: 3.884 ms > > centos 6.9 > > dbname=# SELECT id FROM client_billing_account WHERE name = 'name'; id > ------- ***** (1 row) Time: 1.620 ms > We need to see EXPLAIN (ANALYZE,BUFFERS) for the queries. Are those VMs or bare metal? What CPUs and RAM are there? Have you checked that power management is disabled / cpufreq uses the same policy? That typically affects short CPU-bound queries. Other than that, I recommend performing basic system benchmarks (CPU, memory, ...) and only if those machines perform equally should you look for issues in PostgreSQL. Chances are the root cause is in hw or OS, in which case you need to address that first. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services