10.2B: New message in db log file when startup of DB

Posted by Valeriy Bashkatov on 25-Feb-2010 01:15

Hello,

In 10.2B there was a new message in db log file when startup DB.

$ proserve sports -B 100000

10:52:54 BROKER     The startup of this database requires 423Mb of shared memory.  Maximum segment size is 512Mb.

10:52:55 BROKER  0: Multi-user session begin. (333)

I understand that the size of shared memory allocated to a database (in this example 423Mb) depends on parameter -B.
But I do not understand, how the segment size is defined, as at the different sizes -B the segment size too the different.
$ proserve sports -B 10000
10:52:18 BROKER     The startup of this database requires 46Mb of shared memoryMaximum segment size is 128Mb.
10:52:18 BROKER  0: Multi-user session begin. (333)
I know that I can define the segment size through "-shmsegsize" startup parameter.
My question:
How the segment size  is defined, if I do not use "-shmsegsize"?
What for in log a file this new message has been added?

All Replies

Posted by gus on 25-Feb-2010 09:05

0) the message has been added to provide data in the hope that it will help when diagnosing problems

1) the requires nnn of shared memory is the value calculated by the database taking into consideration the number, alignment, and size of all the data structures that will be allocated from the database's shared memory region.

2) If you don't specify one, a value for -shmsegsize is established based on the outcome of the calculation above. It tries to choose a value such that one or two shared segments will be created.

3) The actual number of segments that are created may be different because until we actually try to create one, we don't know what size segment the operating system can allocate. It may be smaller than the size we want. If so, then we will create more segments until we have allocated enough.

4) Although the maximum segment size reported in your first example is 512, if one smaller segment of (approximately) 432 mb can be created, we will do so. The 512 is the maximum segment size based on the value of -shmsegsize.

5) Few large segments is preferable to many small ones. On many operating systems, there is a small performance advantage to using fewer segments.

6) large segments are not always practical because a process connecting to the database in self- serving mode may not have holes in its address space large enough to map a large segment. In such a case, you would have to specify a lower value for -shmsegsize (e.g. 128).

HTH,

gus

Posted by Valeriy Bashkatov on 26-Feb-2010 01:24

Now I have understood.

Thank You, Gus.

This thread is closed