Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::interprocess shared memory performance
From: Zeljko Vrba (zvrba_at_[hidden])
Date: 2008-12-28 15:39:03


On Sun, Dec 28, 2008 at 12:57:13PM -0600, Andy Wiese wrote:
>
> So iiuc, on my two target platforms at least, there is no fundamental
> difference between managed_mapped_file and managed_shared_memory. I
> should not expect to see any fundamental performance difference
> between them, and the msync call in question is probably correct.
> Someone please correct me if I'm mistaken.
>
Yes, calling msync() on file-backed storage is correct.

>
> My previous experience with shared memory IPC has been with shmget and
> its family. If those area also implemented as files, it has never
> mattered to me and I haven't noticed.
>
They are not. SYSV shared memory segments are kernel objects. They
_might_ be implemented via a special filesystem (UNIX likes to map
internally memory pages to "vnodes"), but its operations are not forwarded
to disk. In the old days, SYSV SHM was not even pageable (though, this
has changed now).

>
> So, my hope is to make a good-enough implementation for the one-shot
> scenario, and then use something like FastCGI where that is possible.
>
My advice is to find out how to persuade the interprocess library to use SYSV
SHM, if at all possible.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net