KB Article #176026
msg_max_size, blk_len, max_blk parameters meaning, location and way to change and calculate within Messaging installation
Problem
-- what are the meaning, location, how to calculate and change following parameters in Messaging:max message size
block size
max number of blocks
message file size
msg_max_size
blk_len
max_blk
Resolution
- the size of 'message.ifm' file is given explicitely during installation;- then, with having this size given and the block size
20971520 / 4096 = 5120 max number of blocks (used to store messages), stored in configuration
- the real size of 'message.ifm' is little bit higher actually as it contains a couple of set of headers; there is no other limit for this size other then the one imposed by OS; theoretically, it should work for files more than 2Gb;
- a data message occupies minimum 2 blocks; the calculation of the maximum number of messages from Queue Manager should:
-- be counted from all queues as they are stored in the same file on disk 'message.ifm';
-- take into account this minimun 2 blocks allocation for each message;
- the maximum message size is also a value given during installation (default 4Kb = 4194304 b)
This is the report displayed at the end of the Messaging installation:
local qmgr name : LOCALMSG
max message size : 4194304 (given at installation)
block size : 4096 (given at installation)
max number of blocks : 5120 calculated
message file size : 20971520 Bytes (given at installation)
- location of these parameters:
/Messaging/runtime/etc/conffile
admin@44su1164:~> egrep 'blk|size' synch44/Messaging/runtime2/etc/conffile
msg_max_size = 4194304
blk_len = 4096
max_blk = 5120
21508096 synch44/Messaging/runtime2/data/messages.ifm
Size calculation confirmation:
21508096 / 4096 = 5251 (more than 5120)
and
5120 x 4096 = 20971520 + some headers = 21508096
- how to reset (rewrite) these parameters ?
by running
./bin/xmsinstall name_of_runtime
from
/Messaging folder
Thus, all queue definitions will be preserved, message parameters re-written and data cleared. This is also a (rough) measure to clean all queues when other measures don't work.