Re: Non-linear Performance

From: Curt Sampson <cjs(at)cynic(dot)net>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "Peter A(dot) Daly" <petedaly(at)ix(dot)netcom(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Non-linear Performance
Date: 2002-06-10 08:51:33
Message-ID: Pine.NEB.4.43.0206101743170.426-100000@angelic.cynic.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 7 Jun 2002, Bruce Momjian wrote:

> I am curious how you are going to address >4 gig of RAM on a 32-bit
> system, especially if you want to address it all from the same process.

Bank switching. :-)

But to be a bit more precise, physical addresses are more than 32
bits. This is not a problem for the kernel; when it maps a page
into an address space, it just hands over a 36-bit (or whatever)
address. It's always going and mapping and unmapping stuff all over
the place anyway, so life is not much different.

For user processes, however, there's a bit of a problem. A single
process can only address 4GB of RAM at any particular momement,
and in fact it's less under Linux (2 GB or 3 GB, depending on how
your built your kernel) because the kernel is using up address
space at the same time. So the OS would have to provide special
system calls for, essentially, bank switching memory in the processes'
address space, and the specific application (postgres in this case)
would have to know how to use them.

But, in fact, this facility already does exist, in a sort of a
kludgy way anyway. You'd want to try it and see if it actually
works under any specific OS, of course. You ought to be able to
create, say, four or five 1GB SysV shared memory segments, and map them
individually in and out of your address space using the shmat system
call.

cjs
--
Curt Sampson <cjs(at)cynic(dot)net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Achilleus Mantzios 2002-06-10 12:09:05 VIEWs and FOREIGN keys
Previous Message Curt Sampson 2002-06-10 08:32:47 Re: How to start without password