From sambavan.tharmarajah@usask.ca Mon Jan 23 16:41:20 2017 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cVhgG-0006Oy-Qg for pgsql-admin@arkaria.postgresql.org; Mon, 23 Jan 2017 16:41:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cVhgG-0008CB-B3 for pgsql-admin@arkaria.postgresql.org; Mon, 23 Jan 2017 16:41:20 +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 1cVhLS-0001Dq-HC for pgsql-admin@postgresql.org; Mon, 23 Jan 2017 16:19:50 +0000 Received: from mail01.usask.ca ([128.233.195.233] helo=mail.usask.ca) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cVhLK-0002vW-8H for pgsql-admin@postgresql.org; Mon, 23 Jan 2017 16:19:49 +0000 Received: from Mail02.usask.ca (192.168.228.183) by Mail01.usask.ca (192.168.228.182) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Mon, 23 Jan 2017 10:19:38 -0600 Received: from Mail02.usask.ca ([fe80::e496:8290:d631:ef58]) by Mail02.usask.ca ([fe80::e496:8290:d631:ef58%14]) with mapi id 15.00.1178.000; Mon, 23 Jan 2017 10:19:38 -0600 From: "Tharmarajah, Sam" To: "pgsql-admin@postgresql.org" Subject: Req. for some help with temp tables Thread-Topic: Req. for some help with temp tables Thread-Index: AdJ1k5E0U8JAHGS7Tdae0cqRhiQcNg== Date: Mon, 23 Jan 2017 16:19:38 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.80.30.37] Content-Type: multipart/alternative; boundary="_000_c138f0693f524e7db788d836036172f8Mail02usaskca_" MIME-Version: 1.0 X-Pg-Spam-Score: -7.4 (-------) 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 --_000_c138f0693f524e7db788d836036172f8Mail02usaskca_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi We have a vendor delivered application running on postgres 9.1. It is creat= ing temp tables per session. Currently the application group is reporting t= he that they are seeing a very slow response on the application in producti= on and in the logs we see tons and tons of autovaccum of oraphan temp table= cleanups. So we have the following questions. 1. How can we mitigate this performance degradation from the database= side. The most interesting part is the application vendor doesn't seem to = response in a timely manner. Also this application is connecting through gl= assfish. 2. What can we tune in the database to get this performance improve? 3. Every time the auto vacuum runs it pegs 1 CPU to 100%. Please bear with these novice questions as I am very new to postgres... Thanx, Sam --_000_c138f0693f524e7db788d836036172f8Mail02usaskca_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi

 

We have a vendor delivered application running on po= stgres 9.1. It is creating temp tables per session. Currently the applicati= on group is reporting the that they are seeing a very slow response on the = application in production and in the logs we see tons and tons of autovaccum of oraphan temp table cleanups. So= we have the following questions.

 

1.     &= nbsp; How can we mitigate this performance degradation fr= om the database side. The most interesting part is the application vendor d= oesn’t seem to response in a timely manner. Also this application is = connecting through glassfish.

2.     &= nbsp; What can we tune in the database to get this perfor= mance improve?

3.     &= nbsp; Every time the auto vacuum runs it pegs 1 CPU to 10= 0%.

 

Please bear with these novice questions as I am very= new to postgres…

 

Thanx,

Sam

--_000_c138f0693f524e7db788d836036172f8Mail02usaskca_-- From feikesteenbergen@gmail.com Tue Feb 14 14:30:41 2017 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cde7t-0005Zg-Oo for pgsql-admin@arkaria.postgresql.org; Tue, 14 Feb 2017 14:30:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cde7t-0000bh-5l for pgsql-admin@arkaria.postgresql.org; Tue, 14 Feb 2017 14:30:41 +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 1cde6B-00074D-If for pgsql-admin@postgresql.org; Tue, 14 Feb 2017 14:28:55 +0000 Received: from mail-vk0-x22a.google.com ([2607:f8b0:400c:c05::22a]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cde68-0007LT-23 for pgsql-admin@postgresql.org; Tue, 14 Feb 2017 14:28:55 +0000 Received: by mail-vk0-x22a.google.com with SMTP id t8so80858071vke.3 for ; Tue, 14 Feb 2017 06:28:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=aBO8O9mS19S64Zyr3JrcTKNmlsYt4Te0oG43Inr0Oc0=; b=f9jqrad9yCFGAMU3a9Y3FRurg01ZhaSIgEJgerbgFCvuJ5hLoWDwEhHTtTN1VvDeYA 5G5CPXAicp5QHhyrve9vkWYG6xQw/8oaszOew1CjhSo/imF+AdWyigM0VvXEzql7nArt flcyT+qE7VYHH2TuIa8Ql3GKu870Qs3uE7gN7NEXden6wYYStkxz8docP1NzN0CrAdiV HDIpsklqUU8nOR6J+wU4yu6HkxuvGWtYbfaqcTqv5azYJ6+taK7KDx5z3CANnjgLSvbk Jf3Vnr30QAOackrDafPx0GicosZ1igHpoFB6u8VpACD1cM7a5L7T1COAP4u6c+vtrWd+ 1krA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=aBO8O9mS19S64Zyr3JrcTKNmlsYt4Te0oG43Inr0Oc0=; b=V8648uTBvYrybS1VHhZsbOrnghH2gwd39YaWY/AsCZr8DY6SloCxtzHyLHIxnQyQeH WUiDtpsh0RRbm77obrOleWzOj1bbUGfFwjR+gv0fjFBouU1eRPk+lD4hs/hZsA2vrSDn mzcps83bv6lKLeGsZR14am99DfzEmZxnoGKGDbxm/tIRQ+rIKSOGa9CwFemTNfP54BzC l9QK9f5Xc88Ef5qRDWAl+LN1G5ePyTR3X5Dou9tZwaXAQu/29gtUe16SoECvpF8zOOEZ r4iqylU/YqyZa4v5bdL+Eo3dg5Y4vGtJIOUlU7n6yi2vx6LYL0X5qmKuVBgc1el/c4lt iYmg== X-Gm-Message-State: AMke39nSMNqjcO1h+lyGK6zH4ZFOqLUkCpuVK3a+YHjEK7QzN9nKnHajqe1dujC2Znyni36EF9wAvuhbJ14hkA== X-Received: by 10.31.214.134 with SMTP id n128mr14343331vkg.124.1487082530314; Tue, 14 Feb 2017 06:28:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.3.163 with HTTP; Tue, 14 Feb 2017 06:28:49 -0800 (PST) In-Reply-To: References: From: Feike Steenbergen Date: Tue, 14 Feb 2017 15:28:49 +0100 Message-ID: Subject: Re: Req. for some help with temp tables To: "Tharmarajah, Sam" Cc: "pgsql-admin@postgresql.org" Content-Type: multipart/alternative; boundary=001a114eb44ef8a31b05487e61dc X-Pg-Spam-Score: -2.7 (--) 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 --001a114eb44ef8a31b05487e61dc Content-Type: text/plain; charset=UTF-8 First of all, 9.1 is EOL. That, and the fact that there are huge performance gains in every release since then, it is advisable to upgrade. On 23 January 2017 at 17:19, Tharmarajah, Sam wrote: > [...] seeing a very slow response on the application in production and in the > logs we see tons and tons of autovaccum of oraphan temp table cleanups Could you share some of these log entries? > 1. How can we mitigate this performance degradation from the database > side. 2. What can we tune in the database to get this performance > improve? 3. Every time the auto vacuum runs it pegs 1 CPU to 100%. Are you using actual temporary tables or our you using permanent tables temporarily? I'm asking, because according to the docs[1]: Temporary tables cannot be accessed by autovacuum. So that probably means you're using permanent tables temporarily. - how are these tables created? - when are they dropped? - how are they emptied? (DELETE or TRUNCATE?) [1] https://www.postgresql.org/docs/9.1/static/routine-vacuuming.html#AUTOVACUUM regards, Feike --001a114eb44ef8a31b05487e61dc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
First of all, 9.1 is EOL. That, and the fact that there ar= e huge performance
gains in every release since then, it is advisable to= upgrade.

On 23 January 2017 at 17:19, Tharmarajah, Sam <sambavan.tharmarajah@usask.ca= >
wrote:
> [...] seeing a very slow response on the application= in production and in the
> logs we see tons and tons of autovaccum o= f oraphan temp table cleanups

Could you share some of these log entr= ies?

> 1. =C2=A0 =C2=A0 =C2=A0 How can we mitigate this performan= ce degradation from the database
> side. =C2=A02. =C2=A0 =C2=A0 =C2= =A0 What can we tune in the database to get this performance
> improv= e? =C2=A03. =C2=A0 =C2=A0 =C2=A0 Every time the auto vacuum runs it pegs 1 = CPU to 100%.

Are you using actual temporary tables or our you using = permanent tables
temporarily?=C2=A0 I'm asking, because according to= the docs[1]: Temporary tables
cannot be accessed by autovacuum.=C2=A0 S= o that probably means you're using
permanent tables temporarily.
= - how are these tables created?
- when are they dropped?
- how are th= ey emptied? (DELETE or TRUNCATE?)

[1]https://www.postg= resql.org/docs/9.1/static/routine-vacuuming.html#AUTOVACUUM

rega= rds,

Feike
--001a114eb44ef8a31b05487e61dc--