Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VTO5C-0005Ba-VQ for pgsql-general@arkaria.postgresql.org; Tue, 08 Oct 2013 03:35:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VTO5C-0001XG-EQ for pgsql-general@arkaria.postgresql.org; Tue, 08 Oct 2013 03:35:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VTO5A-0001VY-Lu for pgsql-general@postgresql.org; Tue, 08 Oct 2013 03:35:36 +0000 Received: from nm13-vm0.bullet.mail.ird.yahoo.com ([77.238.189.195]) by magus.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VTO57-0005fE-Hh for pgsql-general@postgresql.org; Tue, 08 Oct 2013 03:35:36 +0000 Received: from [77.238.189.238] by nm13.bullet.mail.ird.yahoo.com with NNFMP; 08 Oct 2013 03:35:31 -0000 Received: from [212.82.98.69] by tm19.bullet.mail.ird.yahoo.com with NNFMP; 08 Oct 2013 03:35:31 -0000 Received: from [127.0.0.1] by omp1006.mail.ir2.yahoo.com with NNFMP; 08 Oct 2013 03:35:31 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 329609.68501.bm@omp1006.mail.ir2.yahoo.com Received: (qmail 76609 invoked by uid 60001); 8 Oct 2013 03:35:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s1024; t=1381203330; bh=/qqSsmoilonioSWYyfjvOlJEBDqVBBN7azTKSD56L7s=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Xw5IMMvugwe7tKVqb/ZLVcyUNmOTThWRSXlNWtawdpqEk2o/4b/dgUVNVFPbZmvZlA7bHrHb7pQRXcegLG2ZsV3x8lxnI8ZLvs4eRKZAmzJJJRGXSK5EOptSBt/6jTDY8RB0Deinnr7lgAefQMZ0vAX8yNpbAmHbAzAHuTLXUAs= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=ymail.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=p97AwX3eN4ixW0T3SzDafKKgqi8dC5U+tA6CaGbQpZBq063+65NcAhqgpAyaSDyuzR9R+ZaaxZYac0uaR/36lhibCjB8Fmgxh0rpYmDQb9Q7oUH/yowo5p8LbXWCH4I/Uzd2oMrRJ3YHXZtpJLr9d565JpMjsVZn772Vl9OHH5Y=; X-YMail-OSG: .1EhWqcVM1k8KqXNMg1Js9sVAfFlYSn3R2.C9d7H6VURBuY L.f6oG7r4NOdSo48f964xYhejfUAQBBKRDNCvsTWcNp3yBwT5cqbHboX3mN1 Uqr8g_ogtkIoiIGkunB734qckG1eLqBUa72MAG5lBMNudeQKPS1VJsaxWfJx eTxuiphZeBdr_Xom7AVenTgYmrckdRjqFdDIac7MU0r33wH.__Oll8FDuIex 2UhdyHmF_wzeHxHg_a_U0a7uiDms3GzJKyD5IxwZkGitqMPsbprfp14Npuwd wHD41YzWNPTonZCaZ8yNeh3GHrkLMt0cPJJgVMA5BynKF2vpzVssXG7tH.tN q1t7f9Bhn0JuYHZj_pGsggtyBieRdzeCtF_3fh3W5odVu7YujmCfOtSy1YPq N3glsBAwj7aHf5kDLlXbnpGZ4ZP4LTDONNK7sW6eqf0bQfwJWAoWI.mSuQjg qO_0GKVN1artMqTT2Ocf8RcNpq7thQecRZYEGS0YIytsSdpos0leU_.RL7sL r8dh6xd39QH5_8XnMf_Hcw328GJF2yaidIUcoa1wbmkmnLdOQNLLkji8eEyK SjEPhCjAr59f7XXFfS.G.6SlKlh4A9wYQsBMJU7Nu0EZlc7Z9G2AlmeoPIGK olqdi9WbnsagxuYyPGI7lXjDPxyer9G.wdkhG.iuQpAqWwxeR4zt1Ir2Dmcx 7xFbnJQuJW0e13C_EaW8QF6xP Received: from [76.255.18.237] by web162902.mail.bf1.yahoo.com via HTTP; Mon, 07 Oct 2013 20:35:30 PDT X-Rocket-MIMEInfo: 002.001, QWZ0YWIgQWhtZWQgQ2hhbmRpbyA8YWZ0YWJhY0BzaWF0LmFjLmNuPiB3cm90ZToKCj4gTXkgcXVlcnkgcHJvY2Vzc2VzIGZyb20gSkRCQyAoSmF2YSBQcm9ncmFtKSB0byBQb3N0Z3JlU1FMLiBJIHVzZQo.IHN5c3RlbSB0aW1lIGJ5IGludm9raW5nIGphdmEgZnVuY3Rpb24sIEkgY29sbGVjdCBvbmUgdGltZSB1bml0Cj4gYmVmb3JlIHRoZSBxdWVyeSBzdGF0ZW1lbnQgcGVyZm9ybSBhbmQgc2Vjb25kIGFmdGVyIHRoZSBleGVjdXRpb24KPiBvZiBxdWVyeSBzdGF0ZW1lbnQuIAo.IEkgZm91bmQgODUgbXMgdGkBMAEBAQE- X-Mailer: YahooMailWebService/0.8.160.587 References: <1bf97f3.3e260.14195c01fd6.Coremail.aftabac@siat.ac.cn> Message-ID: <1381203330.72593.YahooMailNeo@web162902.mail.bf1.yahoo.com> Date: Mon, 7 Oct 2013 20:35:30 -0700 (PDT) From: Kevin Grittner Reply-To: Kevin Grittner Subject: Re: postgreSQL query via JDBC in different OS taking different running time? To: Aftab Ahmed Chandio , "pgsql-general@postgresql.org" , "pgsql-performance@postgresql.org" In-Reply-To: <1bf97f3.3e260.14195c01fd6.Coremail.aftabac@siat.ac.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Aftab Ahmed Chandio 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.=20 > 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.=20 > 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=A0 of postgresql.conf in the linux setup, > which is available same in the win7=A0 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.=A0 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.=A0 I would test raw connect/disconnect speed.=A0 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 --=20 Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general