pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Radosław Smogura <rsmogura@softperience.eu>
To: Israel Ben Guilherme Fonseca <israel.bgf@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Question about speed: Weird Behavior
Date: Tue, 14 Jun 2011 10:15:05 +0200
Message-ID: <192f3859ced2eb87a5ef76a488ec6c86@mail.softperience.eu> (raw)
In-Reply-To: <BANLkTimNhvPo9VeL94o0sxnBCDcRpLKK5A@mail.gmail.com>
References: <BANLkTimTaoOnVMcuUhnhE5VodRVDSTyH0w@mail.gmail.com>
	<4DF5B7B3.7010708@postnewspapers.com.au>
	<BANLkTimPigO8As72fj7MR59JU9GgzJSuyw@mail.gmail.com>
	<56264945a293522f5d499649330d3f84@mail.softperience.eu>
	<BANLkTiksRx=RvGtLqJgGv+PA4pHhOS_x4A@mail.gmail.com>
	<BANLkTimNhvPo9VeL94o0sxnBCDcRpLKK5A@mail.gmail.com>

 On Mon, 13 Jun 2011 14:12:24 -0300, Israel Ben Guilherme Fonseca wrote:
> Thanks for all the answers,
>
> Smogura: "This is system autotuning - a good solution."
>
> Where can I find more about this subject, and how can I weak it? Is 
> it
> hidden on postresql.conf? Can I configure it to always use an specifc
> size like 8258 bytes per-package?
>
> Im doing tests on other drivers of other programming languages to
> postgresql, and for those, there wasnt any package size differences,
> only with the Java tests. Maybe the others drivers are setting
> specific values for this.
>
> 2011/6/13 Maciek Sakrejda
>
>>> There may be some GC
>> > overhead, you should call System.gc after or before each pass to
>> start with
>> > similar environment.
>>
>> Note that the contract of System.gc() is really more like "Hey, I
>> think it might be fun to run GC right now," than "Youll run GC
>> right
>> now and youll like it." In other words, its technically only a
>> suggestion, so you should make sure its actually doing something
>> before you start depending on it for performance numbers.
>>
>> ---
>> Maciek Sakrejda | System Architect | Truviso
>>
>> 1065 E. Hillsdale Blvd., Suite 215
>> Foster City, CA 94404
>> (650) 242-3500 Main
>> www.truviso.com [1]
>
>
>
> Links:
> ------
> [1] http://www.truviso.com
> [2] mailto:msakrejda@truviso.com
 Actually there is no way to tune it. On server side on Linux platforms 
 kernel will adjust send/recv buffer for you and it, in many situations, 
 does it good. On Windows I think this buffer (or send/recv) has fixed 
 size. You may try to change some Windows's registry settings, or proc 
 TCP/IP to decrease / increase max buffer size.

 On Client side send/recv buffer should be auto tuned too, as Java uses 
 system sockets.

 Of course, PGSQL internally has small buffer, as sockets doesn't use 
 TCP delay it size is 8k (I think it should be 16k).

 I don't think it's good to manually tune this buffers (actually I done 
 two approaches for this), and system tuning is much more better.

 If you are looking for some information about this search "TCP/IP 
 tuning" (you will get many how to determine good size of socket 
 recv/send buffers), and as well few links for kernel auto tuning.

 Regards,
 Radosław Smogura



view thread (14+ messages)  latest in thread

Message-ID: <192f3859ced2eb87a5ef76a488ec6c86@mail.softperience.eu>
Permalink:  ../192f3859ced2eb87a5ef76a488ec6c86@mail.softperience.eu/
Also on:    postgresql.org/message-id/192f3859ced2eb87a5ef76a488ec6c86@mail.softperience.eu

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: rsmogura@softperience.eu, israel.bgf@gmail.com
  Subject: Re: Question about speed: Weird Behavior
  In-Reply-To: <192f3859ced2eb87a5ef76a488ec6c86@mail.softperience.eu>
  References: <BANLkTimTaoOnVMcuUhnhE5VodRVDSTyH0w@mail.gmail.com> <4DF5B7B3.7010708@postnewspapers.com.au> <BANLkTimPigO8As72fj7MR59JU9GgzJSuyw@mail.gmail.com> <56264945a293522f5d499649330d3f84@mail.softperience.eu> <BANLkTiksRx=RvGtLqJgGv+PA4pHhOS_x4A@mail.gmail.com> <BANLkTimNhvPo9VeL94o0sxnBCDcRpLKK5A@mail.gmail.com> <192f3859ced2eb87a5ef76a488ec6c86@mail.softperience.eu>

* 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