Boost logo

Boost Users :

Subject: Re: [Boost-users] [interprocess] Shared memory object
From: Ahmed Charles (acharles_at_[hidden])
Date: 2014-02-24 12:41:22


Windows doesn't have to write to disk if there is no memory pressure in the case of a page file but if you have an explicit file being mapped, then you'll get writes to disk. This hypothesis should be easy to observe by monitoring the disk activity during your perf tests.
________________________________
From: Davies, John
Sent: 2/21/2014 1:28 PM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] [interprocess] Shared memory object

>From my reading, the Windows version is faster but it doesn't have the persistence as the Linux version. The description mentions this:

A class that wraps the native Windows shared memory that is implemented as a file mapping of the paging file. Unlike shared_memory_object<http://www.boost.org/doc/libs/1_55_0/doc/html/boost/interprocess/shared_memory_object.html>, windows_shared_memory<http://www.boost.org/doc/libs/1_55_0/doc/html/boost/interprocess/windows_shared_memory.html> has no kernel persistence and the shared memory is destroyed when all processes destroy all their windows_shared_memory<http://www.boost.org/doc/libs/1_55_0/doc/html/boost/interprocess/windows_shared_memory.html> objects and mapped regions for the same shared memory or the processes end/crash.

Boost lets you choose what means more to you.

___________________________________

John Davies
Contractor
Home Respiratory Care
Philips Home Healthcare Solutions
1740 Golden Mile Highway
Monroeville, PA 15146

Email: john.davies_at_[hidden]
Fax: 724-387-4109

From: Boost-users [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Patrick Steele
Sent: Thursday, February 20, 2014 11:40 AM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] [interprocess] Shared memory object

Tests at the time were showing the Windows version to operate about twice as fast. If nothing has changed I guess I will remain with it then. I had just been hoping for the code to be more platform dependent.

On 20 February 2014 14:44, Ion Gaztañaga <igaztanaga_at_[hidden]<mailto:igaztanaga_at_[hidden]>> wrote:
El 20/02/2014 11:42, Patrick Steele escribió:

Hi,
can anyone tell me if there is a performance or other difference between
boost::interprocess::shared_memory_object and
boost::interprocess::windows_shared_memory? With the version of boost we
were using back in 2011 ( boost 1.48 ), we found that
windows_shared_memory operated faster than shared_memory_object when
transporting around 10MB of data. Is this still the case?
Thanks,

Nothing has changed AFAIK. shared_memory_object is a memory mapped file whereas windows_shared_memory is backed by the pagefile. I don't know why Windows should make one faster than the other, though.

Best,

Ion
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]<mailto:Boost-users_at_[hidden]>
http://lists.boost.org/mailman/listinfo.cgi/boost-users

________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.


_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users



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