When running some operations customer's using 1 GiB instances may see the following error:
"The allocation of an extra 12.0 MiB would use more than the limit 100.0 MiB. Currently using 92.0 MiB. dbms.memory.transaction.global_max_size threshold reached"
A 1 GiB instance represents all the resources needed to run which means the operating system, Java HEAP space, and the page cache are consuming their portion of the instance's resources. The graphic below shows how memory is portioned out. It is not possible to configure the specifics of how your memory is allocated as you can using the on-premises Enterprise Edition (e.g. you can't adjust the size of your HEAP).
- OS memory is what is available after accounting for neo4j.
- The JVM has a heap that is the runtime data area from which memory for all class instances and arrays is allocated.
- Native memory, sometimes referred to as off-heap memory, is memory directly allocated by Neo4j from the OS.
The database management system, or DBMS, contains the global components of the Neo4j instance. For example, the bolt server, logging service, monitoring service, etc.
- Each database in the system comes with an overhead. In deployments with multiple databases, this overhead needs to be accounted for.
- The page cache is used to cache the Neo4j data stored on disk. The caching of graph data and indexes into memory helps avoid costly disk access and result in optimal performance.
- Direct buffers are used by Neo4j to send and receive data.
- Lastly, the JVM itself comes with its own overhead.
Regardless of the size of your instance, some portion of it will be taken up with overhead but the transaction limit scales as the size of your instance grows (e.g. a 4 GiB instance has a higher maximum transaction size than a 1 GiB instance).