On Sat, Mar 19, 2016 at 4:37 PM, ben e <[email protected]> wrote:
> @ Yichao Yu - thank you for the response. That clears things up a bit. Does
> this also imply that there is no performance penalty incurred by mmap'ing a
> persisted file as opposed to a non-persisted file?
>

Right. Accessing mmap'd file is exactly the same with any other pages,
the only difference is back storage.

Note that this also means in general write to the mmap'd page won't be
immediately visible on the back storage (i.e. other machines sharing
the same drive) or it will be 5+ orders of magnitude slower. See
msync(3).

>
> On Saturday, March 19, 2016 at 8:38:20 AM UTC-4, Yichao Yu wrote:
>>
>> > It appears that the disk-file backed SharedArray is syncing to the file
>> > on
>> > every write/update to the array - am I mistaken about this (I'm not
>> > suggesting it is a problem, just want to ensure I'm clear)?
>>
>> If you are talking about sync'ing to the OS cache, yes, and that's why
>> other process can see it. If you are talking about sync'ing to disk
>> then no, not even most normal file IO do that.

Reply via email to