Oracle, TimesTen

Oracle TimesTen not using Large Pages

huge Oracle TimesTen Database, was not using Huge/Large pages. Well at least when I executed a ttStatus command, I saw the following:
Shared Memory KEY 0x0c0504dd ID 1838710795 (LOCKED) when I expected to see
Shared Memory KEY 0x0c0504dd ID 1838710795 (Large Pages,LOCKED)

My ttendaemon.options file was configured correctly (see snippet below):

-linuxLargePageAlignment 2

Memory allocations were correct

What could be the problem? One key was the tterrors.log file.  I found this line:

Lets take a look and see what’s going on in the shared memory.

Turns out that we had some stale memory segments sitting out there, which was enough to prevent TimesTen from from using large/huge pages. In the status column we see “dest”. Dest means that this memory segment is marked to be destroyed. Because this hasn’t/never happened, there is not enough memory, and we need to go ahead and manually free up this space:

Once this space has been freed up, reload the TimesTen database and ttstatus should return:

Now this may not be the only reason TimesTen won’t use Large Pages, but it will get you started.