From: | Marti Raudsepp <marti(at)juffo(dot)org> |
---|---|
To: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
Cc: | "Merlin Moncure *EXTERN*" <mmoncure(at)gmail(dot)com>, "Heikki Linnakangas *EXTERN*" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: SSL encryption makes bytea transfer slow |
Date: | 2011-11-03 16:30:00 |
Message-ID: | CABRT9RBhWGWMvxA7v-mTxcOrZ0ngrnqy66jssKOeokgRqdXqGA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Fri, Oct 28, 2011 at 14:02, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> wrote:
> Without SSL the SELECT finished in about a second,
> with SSL it took over 23 seconds (measured with
> \timing in psql).
When you query with psql, it requests columns in text format. Since
bytea hex-encodes its value if output is text, this means it's
transmitting 60 MB for a 30 MB bytea value.
If you could make sure that your app is requesting binary output, then
you could cut 50% off this time. As others mentioned, most of the
overhead is in SSL compression (not encryption), which can be
disabled, but is not very easy to do.
But 23 seconds for 60 MB is still *very* slow, so something else could
be going wrong. What kind of CPU is this?
On Thu, Nov 3, 2011 at 16:48, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> wrote:
> Disabling OpenSSL compression in the source (which
> is possible since OpenSSL 1.0.0) does not give me any performance
> improvement.
If it doesn't give you any performance improvement then you haven't
disabled compression. Modern CPUs can easily saturate 1 GbitE with
AES256-encrypted connections. Compression is usually the bottleneck,
at 20-30 MB/s.
Regards,
Marti
From | Date | Subject | |
---|---|---|---|
Next Message | Jay Levitt | 2011-11-03 17:47:55 | Predicates not getting pushed into SQL function? |
Previous Message | Tomas Vondra | 2011-11-03 16:18:00 | Re: Optimization required for multiple insertions in PostgreSQL |