This content has been marked as final. Show 7 replies
To use MemoryLock there are several prerequisites:1 person found this helpful
1. You must be running on a platform that supports MemoryLock (looks like you are on Linux so you are okay there).
2. Depending on platform you may need to configure the kernel and/or O/S to (a) allow locking of memory and (b) to set the amount of memory that can be locked (we'll come back to this in a moment).
3. On some platforms you need to run the TT dameons as 'root' in order to lock memory (none of the major ones need this nowadays fortunately).
4. When setting the amount of memory that can be locked you need to allow for the entire TT shared memory segment. The best way to get the size of this is with the ipcs command to directly observer it. The size is typically (PermSize + TempSize + LogBufMB + 'overhead') here 'overhead varies from release to release and platform to platform but is typically in the 15 - 20 MB range.
For Linux specifically you need to ensure that the value specified in /etc/limits/security.conf is sufficient according to the above formula (or better still to the size reported via ipcs).
thanks for yoru quick reply.
My platform is RedHat Linux 64bit (Intel(R) Xeon(R) CPU).
Edited by: ramon_lmj on Apr 20, 2010 1:50 AM
Okay. Did you check that the value you have specified for memlock soft/hard limit is sufficient based on the size of the datatsore segment as per my previous post?
yes. I checked. originally the value was too small. but after i enlarged the value to meet the formula, it still didn't work.
Please can you paste in your DSN definitions and the output from /bin/cat /proc/meminfo. Could you have allocated an amount of memory to Huge Pages already, such that not enough is left to be locked via MemoryLock?
[root@xxx]# cat /proc/meminfo
MemTotal: 16439076 kB
MemFree: 2759932 kB
Buffers: 2520668 kB
Cached: 9190484 kB
SwapCached: 0 kB
Active: 5966140 kB
Inactive: 5920668 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 16439076 kB
LowFree: 2759932 kB
SwapTotal: 522104 kB
SwapFree: 522104 kB
Dirty: 3304 kB
Writeback: 0 kB
AnonPages: 173596 kB
Mapped: 21188 kB
Slab: 1691000 kB
PageTables: 6264 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 8708872 kB
Committed_AS: 542180 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 262720 kB
VmallocChunk: 34359475447 kB
Hugepagesize: 2048 kB
So, the total memory needed for your datastore (assuming this is using TimesTen 11g) is 128 + 128 + 32 + 'overhead' which is around 302 MB = 309248 KB. So, the value specified in /etc/security/limits.conf needs to be at least this much. You might want to make it higher in case the 'overhead' is a bit bigger (or check the actual segment size using ipcs and make sure the value is at least that).
Also, after changing /etc/security/limits.conf you need to (a) log off and then back on again to pick up the new value and (b) stop and start the TimesTen main daemon so that it also picks up the new value. If you don't do both of these then the new value will not be in effect.
I also notice you swap space appears to be grossly under configured. Your machine has 16 GB of RAM and it looks like you only have ~512 MB of swap. You really ought to have at least 24 GB of swap configured.