Re: postgreSQL query via JDBC in different OS taking different running time?

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>
Cc: Aftab Ahmed Chandio <aftabac(at)siat(dot)ac(dot)cn>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: postgreSQL query via JDBC in different OS taking different running time?
Date: 2013-10-10 21:44:30
Message-ID: CAHyXU0yqsi8cf++rBmYRgr=-Z87=rmk_CeusOhzUYd9DC6A6Qw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

On Mon, Oct 7, 2013 at 10:35 PM, Kevin Grittner <kgrittn(at)ymail(dot)com> wrote:
> Aftab Ahmed Chandio <aftabac(at)siat(dot)ac(dot)cn> wrote:
>
>> My query processes from JDBC (Java Program) to PostgreSQL. I use
>> system time by invoking java function, I collect one time unit
>> before the query statement perform and second after the execution
>> of query statement.
>> I found 85 ms time unit in DOS (win7) (laptop 4cores). both Java
>> and PostgreSQL installed and invoked on the same machine,
>> respectively.
>> On the other hand, I use same process (separate installation) on
>> linux on 8 cores physical machine with 2times greater then
>> laptop.
>> I found 150 ms. (which is a question for me because the time in
>> Linux environment should give me half of the time taking on
>> laptop)
>> I also make same setting of postgresql.conf in the linux setup,
>> which is available same in the win7 setup, because win7 setup
>> gives better performance of the query.
>> What do u suggest me, where I need to make performance tuning?
>> which configuration setting must need to modify in the linux?
>> * laptop RAM 4 GB and Linux machine 32 GB
>
> Given a little time, I could probably list 100 plausible reasons
> that could be. For my part, load balancing a production system
> between PostgreSQL on Windows and on Linux hitting identical
> databases on identical hardware, I saw 30% better performance on
> Linux.

One sneaky way that windows tends to beat linux is that windows has a
low precision high performance timer that linux does not have. This
affects both java and postgres and particularly tends to show up when
benchmarking with times.

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bret Stern 2013-10-10 22:01:04 Donation
Previous Message Steve Crawford 2013-10-10 21:22:02 Re: ERROR: invalid value "????" for "YYYY"

Browse pgsql-performance by date

  From Date Subject
Next Message Michael Paquier 2013-10-11 03:10:06 Re: limit connections pgpool
Previous Message Jeison Bedoya Delgado 2013-10-10 15:00:51 limit connections pgpool