Re: SSL encryption makes bytea transfer slow

Поиск
Список
Период
Сортировка
От Marti Raudsepp
Тема Re: SSL encryption makes bytea transfer slow
Дата
Msg-id CABRT9RBhWGWMvxA7v-mTxcOrZ0ngrnqy66jssKOeokgRqdXqGA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: SSL encryption makes bytea transfer slow  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Ответы Re: SSL encryption makes bytea transfer slow  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Re: SSL encryption makes bytea transfer slow  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Список pgsql-performance
On Fri, Oct 28, 2011 at 14:02, Albe Laurenz <laurenz.albe@wien.gv.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.albe@wien.gv.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

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

Предыдущее
От: "Tomas Vondra"
Дата:
Сообщение: Re: Optimization required for multiple insertions in PostgreSQL
Следующее
От: Justin Pitts
Дата:
Сообщение: Re: Guide to PG's capabilities for inlining, predicate hoisting, flattening, etc?