Re: Large writable variables

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Subject: Re: Large writable variables
Date: 2018-10-16 19:13:43
Message-ID: CA+Tgmobk-6=b2KLRRMUWGNWi9KzKrx=WNszr7DDE+QCuwNyrEQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 15, 2018 at 4:08 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> So we have 500kb of not-initialized memory mapped into every
> process. That's, uh, not nothing.

Thinking about this a bit more, why is this bad? I mean, if the
memory is never touched, the OS does not really need to allocate or
zero any pages, or even make any page table entries. If somebody
actually accesses the data, then we'll take a page fault and have to
really allocate, but otherwise I would think we could have 50MB of
unused bss floating around and it wouldn't really matter, let alone
500kB.

What am I missing?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2018-10-16 19:22:18 Re: Index Skip Scan
Previous Message Tom Lane 2018-10-16 17:17:02 Re: Large writable variables