Technote (FAQ)
Question
It is said that "the amount of storage occupied by a single lock ranges from 100 to 200 bytes, depending on the word size and platform" in IBM information center for Informix Server 11.50. But what the accurate size of the locks in a specific platform?
Answer
The document will provide a way to check the real memory used by locks in different Informix server versions on different platforms.
The steps are:
1. use 'onstat -k' to get the lock address. For example:
--------------------------------------------------------
Locks
address wtlist owner lklist type tblsnum rowid key#/bsiz
10a20a028 0 10b2db940 0 HDR+S 100002 201 0
2. Use "onstat -g dmp <lock address> rlock" to display the lock information.
-----------------------------------------------------------------
onstat -g dmp 0x10a20a028 rlock
*(struct rlock *)0x10a20a028 = { /* sizeof = 120 = 0x78 */
lk_hash = 0x0
lk_same = 0x0
lk_wtlist = 0x0
lk_owner = 0x10b31b170
......
3. From the output we can know the real memory of each lock is 120 Bytes in the version on the platform.
Related information
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.