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

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: postgreSQL query via JDBC in different OS taking different running time?
Дата
Msg-id 1381203852885-5773637.post@n5.nabble.com
обсуждение исходный текст
Ответ на postgreSQL query via JDBC in different OS taking different running time?  ("Aftab Ahmed Chandio" <aftabac@siat.ac.cn>)
Список pgsql-general
Aftab Ahmed Chandio wrote
> 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'm not particularly performance measuring experienced but a few items come
to mind:

A single (or handful) of manual runs is not going to provide good data for
comparison
Hard drive characteristics can make a difference

A single query uses a single process/thread so core count is irrelevant
RAM is likely immaterial though depends heavily on the dataset

These last two factors is why your "2times greater" system is in fact nearly
identical to the laptop with respect to its ability to run and single query.
Your Linux system is probably capable of handling twice the data and
simultaneous connections but each connection is limited.

Lastly, the execution times - while relatively different - are both quite
small and subject to considerable system noise - which is why a single run
is insufficient to draw conclusions.

I'm not really sure what kind of positive response you want.  There may be
room to improve the Linux setup, and using the same configuration on two
difference OS is not going to mean they should be expected to provide the
same performance, but you need to be much more detailed in what you are
testing and your measurement procedure if you expect any actionable advice.

In order to do performance tuning you need to setup a realistic environment
within with to perform measurements.  You are either lacking that or have
failed to describe it adequately.  Once you can measure those measurements
will guide you to where to need to either tweak settings or improve
hardware.

Finally, the ability and need for configuration changes is highly dependent
upon the version of PostgreSQL you are running - that should be the first
thing you disclose.

And then, you presume that it is differences in PostgreSQL that are to be
solved but you have the entire Java VM to be concerned with as well.
Running your queries in psql removes that variable and helps pin-point where
the tuning likely needs to occur.

David J.




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/postgreSQL-query-via-JDBC-in-different-OS-taking-different-running-time-tp5773618p5773637.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


В списке pgsql-general по дате отправления:

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: postgreSQL query via JDBC in different OS taking different running time?
Следующее
От: 高健
Дата:
Сообщение: Re: Why there are no max_wal_receivers