Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 011AFB5D800 for ; Thu, 12 May 2011 14:27:15 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 06511-02 for ; Thu, 12 May 2011 17:27:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-vw0-f46.google.com (mail-vw0-f46.google.com [209.85.212.46]) by mail.postgresql.org (Postfix) with ESMTP id 1112FB5D802 for ; Thu, 12 May 2011 14:27:06 -0300 (ADT) Received: by vws1 with SMTP id 1so1274177vws.19 for ; Thu, 12 May 2011 10:27:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=1te5FFvqdE0yIm5kFk4EpZQnrQKmexWvAmKwIY3peXs=; b=AX1a2ygG3hLmws3YOko+kYRZpC7LP+PCfiOeXwXMrWLWyAw0uOozpzlmN44qRTaDPU CBQV/ZSh8m9Z0NErIuFn8nC9UqEggtyDbOSKaQKZStlcYCiw+EGzkSt4rGC/vyV1KpJo KGpOJKgViyyv/gwcyMgBSluXGA3XXXq9v6v3s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=oS9MX4yuSGjB2gzu1wi9uvWs9yFKCP47WxZjnuh9b/Q4bT5uzsGEFYWW5+EV+C+qsB lWzOx96nYuDbXUiBU8LN161opELbOOQd9Dy4iItNtqn8s211aWAp80QjlmtUtgX4qv25 3RIaE9t8lCW/ZfQlSnoGamT566RlAzsFK+Fs0= MIME-Version: 1.0 Received: by 10.52.96.9 with SMTP id do9mr634313vdb.263.1305221226351; Thu, 12 May 2011 10:27:06 -0700 (PDT) Received: by 10.52.158.7 with HTTP; Thu, 12 May 2011 10:27:06 -0700 (PDT) In-Reply-To: References: Date: Thu, 12 May 2011 14:27:06 -0300 Message-ID: Subject: Re: Incoming/Sent traffic data From: Israel Ben Guilherme Fonseca To: pgsql-jdbc@postgresql.org Content-Type: multipart/alternative; boundary=20cf307d06628ccb5b04a3177fee X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.887 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RFC_ABUSE_POST=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201105/26 X-Sequence-Number: 21856 --20cf307d06628ccb5b04a3177fee Content-Type: text/plain; charset=ISO-8859-1 I just got a try with the wireshark, it's indeed nice, but I didn't figure a good filter for knowing what's my app trafic (I'm on localhost), so I put the 'lo' interface, executed the test, pick some random package that have just been collected, get the source port (the application port that's random), and filter packages that use it. I did a fast test with both languages and it's still look that the Java traffic is somewhat bigger. (I couldn't isolate the setup traffic) Total Traffic (same test of before but the select is in a loop of 20 iterations) 28KB python 39KB java The strange thing is, I compared the results of my proxy and wireshark for the Java test, and it's ok. For the python test, there was a difference of 10KB between the proxy and wireshark result. I dunno why. I'll have to explore this a bit more. Do you have experience with this Macieck? Could I sent direct email to you regarding the wireshark questions? 2011/5/12 Maciek Sakrejda > > About the log, i'm using log_statement = "all", on the postgres config,is > there any > > other specific option? > > You could try setting log_min_messages = debug1 (I don't think > anything below that--i.e., debug2 through debug5--is useful for your > case, but you can give it a shot to see what's there). > > > My current implementation of proxy just use sockets to transmit the data > between the app (that's > > why the port 4444 on connections) to the database, that's how I check the > size of data > > transfered with it (it have a GUI to clear the traffic so I can check > only the operation, not the > > setup). > > Nice. I didn't mean to imply you were entirely unscientific about > this, just that you should be careful regarding assumptions as to what > is sent where when. A tool like Wireshark is (relatively) easy to pick > up and gives you tremendous insight into what's going on on the wire > with no application changes required (and it even has a PostgreSQL > protocol plugin by default so you don't need to stare at raw bytes). > > --- > Maciek Sakrejda | System Architect | Truviso > > 1065 E. Hillsdale Blvd., Suite 215 > Foster City, CA 94404 > (650) 242-3500 Main > www.truviso.com > --20cf307d06628ccb5b04a3177fee Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I just got a try with the wireshark, it's indeed nice, but I didn't= figure a good filter for knowing what's my app trafic (I'm on loca= lhost), so I put the 'lo' interface, executed the test, pick some r= andom package that have just been collected, get the source port (the appli= cation port that's random), and filter packages that use it.

I did a fast test with both languages and it's still look that the = Java traffic is somewhat bigger. (I couldn't isolate the setup traffic)=

Total Traffic (same test of before but the select is in a loop of 2= 0 iterations)
28KB python
39KB java

The strange thing is, I compared the result= s of my proxy and wireshark for the Java test, and it's ok. For the pyt= hon test, there was a difference of 10KB between the proxy and wireshark re= sult. I dunno why. I'll have to explore this a bit more.

Do you have experience with this Macieck? Could I sent direct email to = you regarding the wireshark questions?

20= 11/5/12 Maciek Sakrejda <msakrejda@truviso.com>
> About the log, i'm using log_statement =3D "all", on th= e postgres config,is there any
> other specific option?

You could try setting log_min_messages =3D debug1 (I don't think<= br> anything below that--i.e., debug2 through debug5--is useful for your
case, but you can give it a shot to see what's there).

> My current implementation of proxy just use sockets to transmit the da= ta between the app (that's
> why the port 4444 on connections) to the database, that's how I ch= eck the size of data
> transfered with it (it have a GUI to clear the traffic so I can check = only the operation, not the
> setup).

Nice. I didn't mean to imply you were entirely unscientific about=
this, just that you should be careful regarding assumptions as to what
is sent where when. A tool like Wireshark is (relatively) easy to pick
up and gives you tremendous insight into what's going on on the wire with no application changes required (and it even has a PostgreSQL
protocol plugin by default so you don't need to stare at raw bytes).

---
Maciek Sakrejda | System Architect | Truviso

1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main
www.truviso.com

--20cf307d06628ccb5b04a3177fee--