From: | Curt Sampson <cjs(at)cynic(dot)net> |
---|---|
To: | Jan Wieck <JanWieck(at)Yahoo(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, GB Clark <postgres(at)vsservices(dot)com>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, <glenebob(at)nwlink(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Linux max on shared buffers? |
Date: | 2002-07-24 00:13:28 |
Message-ID: | Pine.NEB.4.44.0207240906060.497-100000@angelic.cynic.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 23 Jul 2002, Jan Wieck wrote:
> No resource limit on that? So my 200 backends all map some random
> 16,000 blocks from 400 files and the kernel jiggles with it like
> it's never did anything else?
Do you know how much of your process is already mmaped in exactly this
way? If you take a look at the source code for ld.so, you'll likely find
that all of the shared libraries your executable is using are mapped
in to your process space with mmap. And in fact, it's all mmap under
the hood as well; the kernel is effectively internal calls to mmap to
map the executable and ld.so into memory in the first place. On BSD
systems, at least, but probably others, all of the shared memory is just
an anonymous (i.e., using swap space as the backing store) bunch of
mmapped pages.
So in theory, having several hundred processes each with a gigabyte
or two of mmaped 8K blocks is not going to be a problem. However,
I've not tested this in practice (though I will do so one day) so
that's not to say it won't fail on certain OSes. In that case you'd
want to map much smaller amounts, and live with the extra syscall
overhead. But even so, it would still be far more efficient than
copying blocks into and out of shared memory.
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
From | Date | Subject | |
---|---|---|---|
Next Message | Curt Sampson | 2002-07-24 00:15:43 | Re: Linux max on shared buffers? |
Previous Message | miguel angel rojas aquino | 2002-07-24 00:00:03 | error modifying max_connections (maybe a little o.t.) |