From: Kevin Grittner <kgrittn@ymail.com>
To: Aftab Ahmed Chandio <aftabac@siat.ac.cn>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
To: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: postgreSQL query via JDBC in different OS taking different running time?
Date: Mon, 7 Oct 2013 20:35:30 -0700 (PDT)
Message-ID: <1381203330.72593.YahooMailNeo@web162902.mail.bf1.yahoo.com> (raw)
In-Reply-To: <1bf97f3.3e260.14195c01fd6.Coremail.aftabac@siat.ac.cn>
References: <1bf97f3.3e260.14195c01fd6.Coremail.aftabac@siat.ac.cn>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>
Aftab Ahmed Chandio <aftabac@siat.ac.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.
I would start by getting timings for query execution using EXPLAIN
ANALYZE, to see how PostgreSQL itself is performing on the two
environments. I would test raw connect/disconnect speed. I would
benchmark RAM using STREAM and disk using bonnie++.
You might want to review this page, and post a more detailed report
to the pgsql-performance list:
http://wiki.postgresql.org/wiki/SlowQueryQuestions
Posting to multiple lists is generally considered bad form.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: kgrittn@ymail.com, aftabac@siat.ac.cn, pgsql-general@postgresql.org
Subject: Re: postgreSQL query via JDBC in different OS taking different running time?
In-Reply-To: <1381203330.72593.YahooMailNeo@web162902.mail.bf1.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox