Hi,

The read only version is not faster on reads compared to a writable
store. Internally the only difference is we open files in read only
mode.

The reason you get the error is that your OS does not support to place
a memory mapped region to a file (opened in read only mode) when the
region maps outside the file data (in write mode the file will grow in
size when that happens).

-Johan

On Mon, Mar 29, 2010 at 9:03 PM, Marc Preddie <[email protected]> wrote:
> Hi,
>
> I've had some time to look into this issue and it seems that when using the
> "ReadOnly" versions of the classes,  I get the memory mapping warnings and
> when using the "Writable" versions of the classes, the warning does not
> occur (I'm assuming memory mapping gets enabled).
>
> I'm not against using the "writable" versions of the classes; my only
> concern is performance. Are the "readonly" versions faster that the
> "writable" versions? And if they are; then if memory mapping is not enabled,
> are they faster that the "writable" versions with memory mapping?
>
> I'll run some tests, but I guess I would like an expert opinion.
>
> Regards,
> Marc
>
> On Mon, Mar 22, 2010 at 10:24 AM, Tobias Ivarsson <
> [email protected]> wrote:
>
>> Hi,
>>
>> We have seen this message before emitted as a warning from Neo4j. Are you
>> seing this as a warning as well, or are you getting an exception thrown to
>> your application code?
>>
>> It's hard to deal with these errors since nio only throws IOException, and
>> not any more semantic information than that, I believe we deal with all
>> cases by issuing a warning and then falling back to another method of
>> performing the same operation, but if you are getting exceptions we need to
>> resolve it. If you are indeed getting exceptions, some code that triggers
>> it
>> would be very helpful.
>>
>> Cheers,
>> Tobias
>>
>> On Wed, Mar 17, 2010 at 1:47 PM, Marc Preddie <[email protected]> wrote:
>>
>> > Hi,
>> >
>> > I've look at the mailing list and found 1 similar situation, but no real
>> > solution. So I was hoping someone could shed some light on this.
>> >
>> > I seem to have an issue with neo4j being able to use memory mapped files.
>> > I've run my service on Win XP 64bit, Mac OSX Snow Leopard 10.6.2 and
>> Centos
>> > 5.x 64bit and always get the same error when launching. I'm using APOC
>> 1.0
>> > and have a DB of approx 600M. In my neo config I allocate about 5M more
>> for
>> > each type of file than the actual file size (I've tried multiple
>> different
>> > settings). On each machine I also leave at least 1.5G for the OS and have
>> > at
>> > least 2.5G heap for the Java process. I'm also using the
>> > classes EmbeddedReadOnlyGraphDatabase and LuceneReadOnlyIndexService to
>> > access and browse DB.
>> >
>> > Neo config
>> >
>> > neostore.nodestore.db.mapped_memory=10M
>> > neostore.relationshipstore.db.mapped_memory=110M
>> > neostore.propertystore.db.mapped_memory=85M
>> > neostore.propertystore.db.index.mapped_memory=10M
>> > neostore.propertystore.db.index.keys.mapped_memory=10M
>> > neostore.propertystore.db.strings.mapped_memory=320M
>> > neostore.propertystore.db.arrays.mapped_memory=10M
>> >
>> > Here is the error
>> >
>> > org.neo4j.kernel.impl.nioneo.store.MappedMemException: Unable to map
>> > pos=3005872 recordSize=33 totalSize=1153416
>> > at
>> >
>> >
>> org.neo4j.kernel.impl.nioneo.store.MappedPersistenceWindow.<init>(MappedPersistenceWindow.java:59)
>> > at
>> >
>> >
>> org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.allocateNewWindow(PersistenceWindowPool.java:530)
>> > at
>> >
>> >
>> org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.refreshBricks(PersistenceWindowPool.java:430)
>> > at
>> >
>> >
>> org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.acquire(PersistenceWindowPool.java:122)
>> > at
>> >
>> >
>> org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore.acquireWindow(CommonAbstractStore.java:459)
>> > at
>> >
>> >
>> org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getChainRecord(RelationshipStore.java:248)
>> > at
>> >
>> >
>> org.neo4j.kernel.impl.nioneo.xa.NeoReadTransaction.getMoreRelationships(NeoReadTransaction.java:103)
>> > at
>> >
>> >
>> org.neo4j.kernel.impl.nioneo.xa.NioNeoDbPersistenceSource$ReadOnlyResourceConnection.getMoreRelationships(NioNeoDbPersistenceSource.java:275)
>> > at
>> >
>> >
>> org.neo4j.kernel.impl.persistence.PersistenceManager.getMoreRelationships(PersistenceManager.java:93)
>> > at
>> >
>> >
>> org.neo4j.kernel.impl.core.NodeManager.getMoreRelationships(NodeManager.java:585)
>> > at
>> >
>> org.neo4j.kernel.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:332)
>> > at
>> >
>> >
>> org.neo4j.kernel.impl.core.NodeImpl.ensureFullRelationships(NodeImpl.java:320)
>> > at
>> >
>> >
>> org.neo4j.kernel.impl.core.NodeImpl.getAllRelationshipsOfType(NodeImpl.java:129)
>> > at
>> >
>> >
>> org.neo4j.kernel.impl.core.NodeImpl.getSingleRelationship(NodeImpl.java:179)
>> > at
>> >
>> >
>> org.neo4j.kernel.impl.core.NodeProxy.getSingleRelationship(NodeProxy.java:98)
>> >        ....
>> > Caused by: java.io.IOException: Access is denied
>> > at sun.nio.ch.FileChannelImpl.truncate0(Native Method)
>> > at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:728)
>> > at
>> >
>> >
>> org.neo4j.kernel.impl.nioneo.store.MappedPersistenceWindow.<init>(MappedPersistenceWindow.java:53)
>> > ... 78 more
>> >
>> >
>> > Regards
>> > Marc
_______________________________________________
Neo mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to