You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by nadav hoze <na...@gmail.com> on 2013/04/21 09:15:23 UTC

Jena 64-bit performance

Hi,

We had serious performance degradation once we switched our clients to 64
bit machine.
After a thorough investigation I saw that the default file access mode
determined for the 64 bit is memory mapped files.
When I switched to direct access mode it flied out of the roof!!! (350
times faster).
I have here 3 important questions:
1. Why is that ?
2. Is it safe to use the direct access mode instead of the memory mapped
files ?
3. I Couldn't find a good documentation on this, can you please explain the
functionality of each mode ?


Thanks,

Nadav

Re: Jena 64-bit performance

Posted by Andy Seaborne <an...@apache.org>.
On 21/04/13 08:15, nadav hoze wrote:
> Hi,
>
> We had serious performance degradation once we switched our clients to 64
> bit machine.
> After a thorough investigation I saw that the default file access mode
> determined for the 64 bit is memory mapped files.
> When I switched to direct access mode it flied out of the roof!!! (350
> times faster).
> I have here 3 important questions:
> 1. Why is that ?

In geenral, memory mapped files are as fast as or faster than caching 
within the JVM.

> 2. Is it safe to use the direct access mode instead of the memory mapped
> files ?

Yes

(and it's safe to change modes on a DB if you restart the JVM)

> 3. I Couldn't find a good documentation on this, can you please explain the
> functionality of each mode ?

direct mode - there is a block cache managed in the heap. It's fixed size.

mapped mode - the OS does the caching of files into RAM - it's dynamic, 
and adjusts to the load on the machine.  And it's faster (usually)


>
> Thanks,
>
> Nadav
>

(and to Alexander Shapiro from a similar message)

Nadav, Alex,

In both your case, there aren't many details of the setup:

* Size of databsse (in triples).
* Version of Jena software
* operating system
* size of machine in RAM
* whether the machine is a VM or real hardware
* Java heap size

and other details like work load (update? read-mostly?)

	Andy