From: Troels Arvin on
Hello,

Situation: New x86-64 Red Hat Enterprise Linux 5.4 (64 bit) server with
plenty of RAM (192GB) and DB2 ESE v. 9.7 FP1. The server has one DB2
instance, hosting one 10TB database.

I had tried adjusting some kernel limits according to http://
publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/
com.ibm.db2.luw.qb.server.doc/doc/t0008238.html
I.e., I set kernel.msgmnb=65535

When I started DB2, the database increased kernel.msgmnb by one, setting
it to kernel.msgmnb = 65536.

"Normal" activities worked well, but LOAD operations and backup/restore
failed:
DIA8557C No message was sent using the message queue.
CALLED : OS, -, msgsnd OSERR: EAGAIN (11)
DATA #1 : system V message queue identifier., PD_TYPE_SYSV_QUEUE_ID

I tried setting kernel.msgmnb to 524288 (value chosen out of the blue,
but with the intention of it being a handful times 65536), and then
things work. (When kernel.msgmnb is larger than 65536, DB2 seems to
accept it, and doesn't change it when the instance is started.)

I believe it's an error that DB2 chooses kernel message limitation(s)
which don't result in a fully working database system. But apart from
that, I'm interested in find an answer to: What's a good value for
msgmnb, given a lot of RAM, and the latest DB2?

Part an answer to that would involve: What's the upper bound for
kernel.msgmnb? I couldn't find a clear description of this anywhere, so I
tried asking on the Linux kernel mailinglist (LKML):
http://groups.google.com/group/linux.kernel/browse_thread/thread/
a05179e07296a688
I got an answer, but it didn't really answer my question.
So I took at look in the Linux kernel source, and it seems to me that the
upper limit for kernel.msgmnb is sizeof(int)==2147483647.

But sometimes, it's counterproductive to increase various knobs like that
to large values: I suspect that simply increasing kernel.msgmnb to the
upper limit will not necessarily be a performance-enhancing move. So:
Does someone know if there is a point where values for kernel.msgmnb will
make DB2 under-perform? Or is there a point where further increases
simply don't make sense for DB2?

--
Troels
From: whatever on
On Feb 24, 3:39 pm, Troels Arvin <tro...(a)arvin.dk> wrote:
> Hello,
>
> Situation: New x86-64 Red Hat Enterprise Linux 5.4 (64 bit) server with
> plenty of RAM (192GB) and DB2 ESE v. 9.7 FP1. The server has one DB2
> instance, hosting one 10TB database.
>
> I had tried adjusting some kernel limits according to http://
> publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/
> com.ibm.db2.luw.qb.server.doc/doc/t0008238.html
> I.e., I set kernel.msgmnb=65535
>
> When I started DB2, the database increased kernel.msgmnb by one, setting
> it to kernel.msgmnb = 65536.
>
> "Normal" activities worked well, but LOAD operations and backup/restore
> failed:
> DIA8557C No message was sent using the message queue.
> CALLED  : OS, -, msgsnd                           OSERR: EAGAIN (11)
> DATA #1 : system V message queue identifier., PD_TYPE_SYSV_QUEUE_ID
>
> I tried setting kernel.msgmnb to 524288 (value chosen out of the blue,
> but with the intention of it being a handful times 65536), and then
> things work. (When kernel.msgmnb is larger than 65536, DB2 seems to
> accept it, and doesn't change it when the instance is started.)
>
> I believe it's an error that DB2 chooses kernel message limitation(s)
> which don't result in a fully working database system. But apart from
> that, I'm interested in find an answer to: What's a good value for
> msgmnb, given a lot of RAM, and the latest DB2?
>
> Part an answer to that would involve: What's the upper bound for
> kernel.msgmnb? I couldn't find a clear description of this anywhere, so I
> tried asking on the Linux kernel mailinglist (LKML):http://groups.google.com/group/linux.kernel/browse_thread/thread/
> a05179e07296a688
> I got an answer, but it didn't really answer my question.
> So I took at look in the Linux kernel source, and it seems to me that the
> upper limit for kernel.msgmnb is sizeof(int)==2147483647.
>
> But sometimes, it's counterproductive to increase various knobs like that
> to large values: I suspect that simply increasing kernel.msgmnb to the
> upper limit will not necessarily be a performance-enhancing move. So:
> Does someone know if there is a point where values for kernel.msgmnb will
> make DB2 under-perform? Or is there a point where further increases
> simply don't make sense for DB2?
>
> --
> Troels

My Few Cents :)

1. You cannot set this to the MAX size as you might exhaust kernel
memory(message buffer needs memory)
2. So it would be easier to monitor your Peak workload and monitor the
highest usage of these MQ and double this value to be comfortable.

Monitor these kernels usage via ipcs a/q/m and come up with a number.
I don't think there is generic value to be provided only thing..is it
has to come from Monitoring it.

cheers...
Shashi Mannepalli
From: Troels Arvin on
Hello,

On Feb 24, I wrote:
> DIA8557C No message was sent using the message queue. CALLED : OS, -,
> msgsnd OSERR: EAGAIN (11) DATA #1 : system V
> message queue identifier., PD_TYPE_SYSV_QUEUE_ID

I'm told that FP2 will contain some robustness work regarding DB2's
kernel parameter adjustments. And that FP3 will address the problem that
a LOAD may fail because of sub-optimal message queue sizing.

--
Troels