Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aSmHV-0003Iv-4t for pgsql-odbc@arkaria.postgresql.org; Mon, 08 Feb 2016 13:55:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aSmHU-0006tZ-MQ for pgsql-odbc@arkaria.postgresql.org; Mon, 08 Feb 2016 13:55:08 +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) (envelope-from ) id 1aSmHU-0006tP-7k for pgsql-odbc@postgresql.org; Mon, 08 Feb 2016 13:55:08 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aSmHQ-0003DD-1f for pgsql-odbc@postgresql.org; Mon, 08 Feb 2016 13:55:07 +0000 Received: by mail-pf0-x241.google.com with SMTP id e127so1173428pfe.3 for ; Mon, 08 Feb 2016 05:55:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=1Tyj/8GEUN2UqcbJIts3TViVMxb47uWGo97p59+mTB4=; b=Ittya/qqtQT4Inr5lVBPqqFj8opydS5WFcYxC5EE55BDy+KEIwwWXtmz9ra8t61PSj aSrvT7hxDvfoUVKnS63TCg8TBGdQct9b95L8HWdEdCf6Wya412bmGHj5kKFjwRpJ/XSc k3ZFuEZknb9DcFwUacU7Kqfq1P9R0UjHjgkqMQMYmOHMU1X7gycvfu9FHJRcxdUvfmvj XxEr2pXYbteWtzFYRcdSkdwP+yvKEttWyfxJpSrbyM9RiLXeI26BX8qYkjZJqHh3wGAp txMDP1nQykwlLPnMXHlwQaTC1I9vNkULateWM76zMKOY4DQELllyKTdMqf73Dj+gzHiq URHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=1Tyj/8GEUN2UqcbJIts3TViVMxb47uWGo97p59+mTB4=; b=M5/z3tV+ftbvNjnrcCXLIuSHe4ms8qZSQSqObzvtAzNChdppX1DS5scX0L9J87CLOn wsTaEgGwly4IurSM5ssS8r4kbh2WdVjn0SKIIeVk+hNQ667L4t5ifHtN/Xt8CdZzTaZu yIh2tlP61JPnEAPbOygW3/HWoIBYzvVpLB9OfDiIaKSTZeU1Ksz3jDhCOsVqOrSYiWmw hbOHC0VEOFOkOAgrdtfoL7PtObZxFMfZvTSfuXSjeiQ8QznYV12TgX+i3Cbi7V5+juWW +dxsveP6eBfHFrF56aZ6uj8C+9RktG0QIHK9iRAsSZecydfcCXfklqnZYuC9uXjMKa2Z ZaCw== X-Gm-Message-State: AG10YOS+UajQSBp6GW4LFka2Ow4JeWs+2vrcMy0N0jhCfIHCwim2s9VjJwsMDY3F3gXJ0w== X-Received: by 10.98.9.92 with SMTP id e89mr42735053pfd.34.1454939701735; Mon, 08 Feb 2016 05:55:01 -0800 (PST) Received: from [192.168.179.5] (KD119104107075.au-net.ne.jp. [119.104.107.75]) by smtp.gmail.com with ESMTPSA id mk3sm43848003pab.20.2016.02.08.05.54.57 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Feb 2016 05:55:00 -0800 (PST) Content-Type: multipart/alternative; boundary="Apple-Mail=_EC8EC702-F667-4499-A0F1-E7180224EC5D" Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Subject: Re: Degradation of performance when upgrade psqlodbc to 09.03.0400 From: Dang Minh Huong In-Reply-To: <1ECC4FD6-11B3-4D87-AED6-AB6B576BFF43@gmail.com> Date: Mon, 8 Feb 2016 22:54:56 +0900 Cc: pgsql-odbc@postgresql.org Message-Id: <27F26780-FF99-428F-AD59-496734F3CE7B@gmail.com> References: <016BF0E2-C52D-4D78-84C4-FB25BB04005C@gmail.com> <56B3B4A8.7040704@iki.fi> <7430C065-C285-4EC4-833A-640BBE845FB5@gmail.com> <1ECC4FD6-11B3-4D87-AED6-AB6B576BFF43@gmail.com> To: Heikki Linnakangas , h-inoue@dream.email.ne.jp X-Mailer: Apple Mail (2.3112) X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org --Apple-Mail=_EC8EC702-F667-4499-A0F1-E7180224EC5D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi,=20 > I have tested some version of psqlODBC between 09.00.0310 ~ = 09.03.0400, > and found that exactly version 09.03.0100 made the degradation of = performance > in executing my batch (it is not related to replication, i found = that). >=20 > I will try to find out which commit did it and how to avoid this = issues. >=20 I have confirmed commits in version 09.03.0100 and found that,=20 the below commit exactly caused the degration of perfomance. = http://git.postgresql.org/gitweb/?p=3Dpsqlodbc.git;a=3Dcommitdiff;h=3D9fd3= 9495580ada6ff7d989d19fa9f83ed3b2c82e MSDTC is not related to my application (i'm using unixODBC). So, the = other=20 changes in above commit made performance down, but i am not clearly what=20= they are. Could you confirm for me the above commit. If it is not a bug, is there any changing of parameters to solve this = issue? Thanks and best regards. bocap > Thanks and best regards. > bocap >=20 >> On Feb 5, 28 Heisei, at 07:29, Dang Minh Huong > wrote: >>=20 >> Hi, >>=20 >> Thanks for prompt response sir. >>=20 >>>> On 04/02/16 16:54, Dang Minh Huong wrote: >>>> I'm using psqlodbc version 09.00.0310 for my project. Recently i = tried to upgrade to version 09.03.0400 and found that it is very slow in = processing my batch (batch with milion of SELECT, UPDATE, INSERT = statements). >>>>=20 >>>> [environment] >>>>=20 >>>> OS: Redhat 6.7 x 2 nodes >>>>=20 >>>> PostgreSQL 9.1.19: Synchronouse Streaming replication & = hot_standby. >>>>=20 >>>> DB connect method: psqlodbc/unixODBC. >>>>=20 >>>> [results of performance] >>>>=20 >>>> It took below timing to execute my batch >>>>=20 >>>> In version 09.00.0310: 11minute >>>>=20 >>>> In version 09.03.0400: 53minute >>>>=20 >>>> When my batch run in 09.03.0400, ps command repeatedly show below = processes. >>>>=20 >>>> Something delay the transmitting & replaying WAL in STANDBY db = node? >>>>=20 >>>> ----- >>>>=20 >>>> ... UPDATE waiting for 0/xxx >>>>=20 >>>> or >>>>=20 >>>> ... INSERT waiting for 0/yyy >>>>=20 >>>> ------ >>>>=20 >>>> Note that, my replication connection is working well, and above = messages just display within a second. This phenomenon is not reproduced = in version 09.00.0310. >>>>=20 >>>> I have confirmed release note. I thought changing of = UseServerSidePrepare's default value made this perfomance problem but = not. I don't know what change make it slower. >>>>=20 >>>> Sorry for lack of infomation but, is any big changes related to = performance between above versions? >>>=20 >>> I don't recall anything relevant. It seems strange that changing the = ODBC driver would make any difference to the replication. >>=20 >> I also think that. I wonder if something missed in my environment but = not found, and it is not reproduced in 9.00.0310. >>=20 >>> Something to do with autocommit, perhaps? >>=20 >> Sorry but did you mean that, default of autocommit was changed to = "on", between above versions? >>=20 >> Thanks and best regards, >> bocap. >>=20 >>>=20 >>> - Heikki >=20 --Apple-Mail=_EC8EC702-F667-4499-A0F1-E7180224EC5D Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Hi, 

I have tested some version of psqlODBC = between 09.00.0310 ~ 09.03.0400,
and found that = exactly version 09.03.0100 made the  degradation of = performance
in executing my batch (it is not = related to replication, i found that).

I will try to find out which commit did = it and how to avoid this issues.


I have confirmed commits in version 09.03.0100 and found = that, 
the= below commit exactly caused the degration of perfomance.

http://git.postgresql.org/gitweb/?p=3Dpsqlodbc.git;a=3Dcommitdi= ff;h=3D9fd39495580ada6ff7d989d19fa9f83ed3b2c82e

MSDTC is not related = to my application (i'm using unixODBC). So, the other 
changes in above commit = made performance down, but i am not clearly what 
they are.
Could you confirm for = me the above commit.

If it is not a bug, is there any changing of = parameters to solve this issue?

Thanks and best regards.
bocap

Thanks = and best regards.
bocap

On Feb 5, 28 Heisei, at 07:29, Dang Minh = Huong <kakalot49@gmail.com> wrote:

Hi,

Thanks for prompt response = sir.

On 04/02/16 16:54, Dang Minh Huong wrote:
I'm = using psqlodbc version 09.00.0310 for my project. Recently i tried to = upgrade to version 09.03.0400 and found that it is very slow in = processing my batch (batch with milion of SELECT, UPDATE, INSERT = statements).

[environment]

OS: Redhat 6.7 x 2 nodes

PostgreSQL 9.1.19: Synchronouse Streaming replication & = hot_standby.

DB connect method: = psqlodbc/unixODBC.

[results of = performance]

It took below timing to = execute my batch

In version 09.00.0310: = 11minute

In version 09.03.0400: 53minute

When my batch run in 09.03.0400, ps command = repeatedly show below processes.

Something = delay the transmitting & replaying WAL in STANDBY db node?

-----

... UPDATE = waiting for 0/xxx

or

... INSERT waiting for 0/yyy

------

Note that, my replication = connection is working well, and above messages just display within a = second. This phenomenon is not reproduced in version 09.00.0310.

I have confirmed release note. I thought = changing of UseServerSidePrepare's default value made this perfomance = problem but not. I don't know what change make it slower.

Sorry for lack of infomation but, is any big = changes related to performance between above versions?

I don't recall anything relevant. = It seems strange that changing the ODBC driver would make any difference = to the replication.

I also think that. I wonder if something = missed in my environment but not found, and it is not reproduced in = 9.00.0310.

Something to do with = autocommit, perhaps?

Sorry but did you mean that, default of = autocommit was changed to "on", between above versions?

Thanks and best regards,
bocap.


- Heikki


= --Apple-Mail=_EC8EC702-F667-4499-A0F1-E7180224EC5D--