lmcarreiro
lmcarreiro

Reputation: 5792

How In-Memory databases avoid use of Virtual Memory

Since the memory is managed by the OS, how an In-Memory Database process avoid its pages in physical memory of being moved to the virtual memory at the disk?

Upvotes: 1

Views: 305

Answers (1)

Steven Graves
Steven Graves

Reputation: 921

On some systems, it is possible to pin pages in memory, but this is discouraged - you are defeating the operating system's virtual memory manager, which might benefit the IMDS but be detrimental to overall system performance.

Our (McObject) recommendation is to ensure that you have enough physical memory so that the operating system does not swap in-memory database pages to the swap space.

If it's not possible to ensure that you have enough physical memory, then you're better off creating a conventional persistent database, and creating as large of a database cache with the DBMS' facility as you can (again, within the constraints of physical memory), and allow the DBMS to move pages into and out of it's own cache. It will do so more intelligently than than the operating system.

Upvotes: 1

Related Questions