The In-Memory Transaction Example

Some applications use XML documents in a transient manner. That is, they create and store XML documents as a part of their run time, but there is no need for the documents to persist between application restarts. For these class of applications, overall throughput can be improved by abandoning the transactional durability guarantee. To do this, you keep your environment, containers, and logs entirely in-memory so as to avoid the performance impact of unneeded disk I/O.

To do this:

Refrain from specifying a home directory when you open your environment.

Configure your environment to back your regions from system memory instead of the file system.

Increase the size of your in-memory log buffer so that it is large enough to hold the largest set of concurrent write operations.

Increase the size of your in-memory cache so that it can hold your entire data set. You do not want your cache to page to disk.

Specify an empty string when you open your container. Note that for in-memory operations, you are limited to just one container.

As an example, this section takes the transaction example provided in Transaction Example and it updates that example so that the environment, container, log files, and regions are all kept entirely in-memory.