Re: One process per session lack of sharing

From: Andres Freund <andres(at)anarazel(dot)de>
To: AMatveev(at)bitec(dot)ru
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Jan Wieck <jan(at)wi3ck(dot)info>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Craig Ringer <craig(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: One process per session lack of sharing
Date: 2016-07-19 18:19:51
Message-ID: 20160719181951.zzb4jsy2gurehpqb@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2016-07-19 14:18:22 +0300, AMatveev(at)bitec(dot)ru wrote:
> Hi
>
>
> > Using TLS will slow down things noticeably though. So if we were to go
> > there, we'd have to make up for some constant slowdown.
> I can not understand why?
>
> I've read
> https://msdn.microsoft.com/en-us/library/windows/desktop/ms686749(v=vs.85).aspx
> and
> http://david-grs.github.io/tls_performance_overhead_cost_linux/
> """
> The results are quite straightforward: no overhead at all.
> """
>
> 0x0000000000404f40 <+0>: inc DWORD PTR [rip+0x202382]
> vs
> 0x0000000000404f50 <+0>: inc DWORD PTR fs:0xfffffffffffffffc

Not really true IIRC. For one segment offset stuff is encoded more
widely, and for another, it'll generate more uops in many
microarchitectures. Also, we actually *do* qualify for the exception in
the blog you linked above: We have a fair amount of dynamically linked
code.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Christoph Berg 2016-07-19 18:53:39 Re: sslmode=require fallback
Previous Message Robert Haas 2016-07-19 17:42:42 Re: One process per session lack of sharing