[mercury-users] Shared memory

Peter Ross pro at missioncriticalit.com
Wed Oct 19 18:25:11 AEST 2005


On Wed, Oct 19, 2005 at 12:32:40PM +1000, Julien Fischer wrote:
> 
> On Tue, 18 Oct 2005, Peter Ross wrote:
> 
> > We've been experimenting with forking processes versus creating threads
> > to build a server here.
> >
> > The advantage of forking processes is that one has a single threaded
> > piece of code and it seems that the boehm_gc runs much faster in the
> > single threaded case (in one case 10 times slower for very heavy memory
> > allocation code), the disadvantage is that we use much more memory
> > as we cannot share data structures between threads.
> >
> 
> Do more recent versions of the Boehm gc than we use make any difference?
> (I seem to recall reading stuff about threads in the changelogs for
> the 7.0alpha series.)
> 
That's still on my TODO list of things to test, but due to time pressure
I haven't had a chance yet.

>From what I understand, using thread local allocation (previously only
supported under linux in the 6.x series) may make a huge difference by
not having to stop the work before GCing.

However I'm still interested in the problem of sharing memory between
different processes.  For me MR_deep_copy should be sufficient, provided
one also had a MR_deep_copy_object_size, so that one could ensure that
the shared memory segment was large enough, but maybe I'm missing
something.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list