25.5.8 Definition of global buffers (standby-less system switchover (effects distributed) facility only)
(1) Design concepts for a unit-based global buffer
First, select whether or not the global buffer is to be shared. You can design a global buffer for reduced operation after system switchover occurs based on either of the following concepts:
- Sharing design
During reduced operation, memory is used efficiently by means of sharing the accepting unit's global buffer. This is called a sharing design; it has the following characteristics:
- Advantage: Because the accepting unit's global buffer is shared during reduced operation, memory usage efficiency is high.
- Disadvantage: During reduced operation, the buffer hit rate is reduced proportionately to the number of servers that share the global buffer.
- Non-sharing design
Global buffer resources to be used only during reduced operation are allocated to each accepting unit and go into service when system switchover occurs. This is called a non-sharing design. It has the following characteristics:
- Advantage: Because the same amount of buffer resources is available for use before and during reduced operation, the hit rate can be maintained.
- Disadvantage: Because global buffer resources to be used only during reduced operation are allocated to an accepting unit, memory usage efficiency is low.
Because the objective of the standby-less system switchover (effects distributed) facility is to share resources and distribute the workload, it is more advantageous to use the sharing design (1 above); the reason for this is that memory is used more efficiently.
In the case of non-sharing design, global buffers dedicated to servers are allocated to all accepting units. Therefore, for an entire HA group, you can estimate the required amount of shared memory for global buffers by multiplying the estimated amount of shared memory for normal global buffers by the number of units comprising the HA group. If the amount of shared memory available satisfies the estimate, performance can be maintained even during reduced operation, enabling you to use non-sharing design (2 above).
(a) Procedure for sharing design
This section explains how to create a sharing design in which a global buffer is shared.
- Determining the RDAREAs that share the same buffer pool
- Sharing among RDAREAs of the same type
Use the -r option of the pdbuffer operand to specify RDAREAs of the same type, such as RDAREAs for data, index RDAREAs, or LOB RDAREAs, so that they cam share a global buffer. When a global buffer is shared by RDAREAs of the same size or same access frequency, memory efficiency is high.
- Sharing among RDAREAs for row-partitioned tables or indexes
Use the -r option of the pdbuffer operand to specify RDAREAs for row-partitioned tables or RDAREAs for row-partitioned indexes so that they share a global buffer. If the row-partitioned tables and indexes are stored in the same RDAREA, specify the -i option of the pdbuffer operand to allocate a buffer exclusively for indexes.
Also, depending on the server and unit allocation of the RDAREAs that share a global buffer, the characteristics described below can be obtained. Use these characteristics for reference when selecting the RDAREAs that will share a global buffer.
- When sharing of RDAREAs of servers located in different units occurs:
Because global buffers can be used exclusively before reduced operation occurs, allocation can be made that places more importance on performance before reduced operation occurs. However, global buffer resource allocation during reduced operation becomes unbalanced among units.
- When sharing occurs between RDAREAs of servers located within the same unit with an RDAREA of a server located in a different unit:
Buffer allocation during reduced operation can be kept balanced among units.
- Determining the buffer sector count of a global buffer to be shared
The number of buffer sectors specified with the -n option are divided equally and used among the sharing serves within the HA group. For this reason, you must specify a buffer sector count that is appropriate to the number of sharing servers so that a shortage will not occur. Use the following formula for estimating an appropriate buffer sector count:
number-of-sectors-needed-by-each-server (number-of-host-BESs + number-of-BESs-that-can-be-accepted) |
If there is an RDAREA that requires the same level of performance before and during reduced operation, allocate to that RDAREA alone a server-specific global buffer; for details, see (b) Procedure for non-sharing design.
(b) Procedure for non-sharing design
This section explains how to create a non-sharing design that does not share global buffers.
You can allocate a server-specific global buffer either for a single RDAREA or for multiple RDAREAs belonging to the same server.
- Allocating exclusively to a single RDAREA
Specify the RDAREA in the -r option of the pdbuffer operand. Because there is no competition from other RDAREAs, a global buffer can be allocated to maximize performance. You can also allocate an index-specific buffer by specifying a non-partitioning index in the -i option of the pdbuffer operand.
- Allocating to multiple RDAREAs belonging to the same server
Specify in the -r option of the pdbuffer operand multiple RDAREAs belonging to the same server. Specify RDAREAs of the same type, such as RDAREAs for data, index RDAREAs, or LOB RDAREAs.
(2) Allocating global buffers for RDAREAs and LOB global buffers (-r or -b option specified)
Allocation of global buffers for RDAREAs and LOB global buffers on a unit-by-unit basis can be classified into four types depending on the combination of the specified RDAREAs. Table 25-15 shows the recommended conditions for global buffer sharing modes (specification of the -r or -b option).
Table 25-15 Recommended conditions for global buffer sharing modes (-r or -b option specified)
Specification method (combination of RDAREAs specified with -r or -b) | Buffer sharing mode | Benefit | Recommended condition |
---|
RDAREAs in different servers | RDAREAs in the same unit | RDAREAs in different units |
---|
None | None | None | Non-shared | Because global buffers are not shared with other servers, normal buffer performance can be maintained even when multiple errors occur. | Because buffers are allocated to all accepting units, this mode is recommended for RDAREAs for which buffer performance should be maintained before and during reduced operation in an environment with ample memory capacity. |
Yes | Yes | None | Sharing by servers within a unit | Normal buffer performance can be maintained even when multiple errors occur. | As with the non-shared mode, this mode can maintain buffer performance before and during reduced operation. However, because memory usage efficiency is low when switching first occurs, the non-shared mode is recommended. |
Yes | None | Yes | Sharing by servers in different units | - Back-end servers of the primary system can use all of the specified buffer sectors.
- During reduced operation, the accepting unit's resources are shared, resulting in high memory efficiency.
| This mode is recommended when performance during normal operation is important and buffer resources should be shared during reduced operation. |
Yes | Yes | Yes | Sharing by servers within a unit and in different units | - During reduced operation, the accepting unit's resources are shared, resulting in high memory usage efficiency.
- Because the number of sharing servers can be balanced, workload during reduced operation can be balanced.
| This mode is recommended when buffer resources should be shared and the workload should be balanced during reduced operation. |
Select the appropriate sharing mode by considering the buffer design guidelines for the -r or -b specification explained below. Because the objective of the standby-less system switchover (effects distributed) facility is to share resources and distribute the workload, it is preferable to use Sharing by servers in different units or Sharing by servers within a unit and in different units, both of which involve sharing between units. If it is important to maintain performance even during reduced operation, select Non-shared or Sharing by servers within a unit.
- Buffer design guideline for -r or -b specification
- For an RDAREA for which the buffer hit rate should be maintained even during reduced operation in an environment with ample memory: Select Non-shared or Sharing by servers within a unit.
- To have a particular server use the buffer resources exclusively during normal operation and allow sharing with other servers during reduced operation: Select Sharing by servers in different units.
- Cases other than 1 or 2: Select Sharing by servers within a unit and in different units.
(a) Allocating non-shared global buffers
Specify only RDAREAs belonging to a single back-end server in the -r or -b option of each pdbuffer operand. A system configuration example follows:
System configuration example
![[Figure]](figure/zu251250.gif)
Global buffer definitions
pdbuffer -a gbuf01 -r RDAREA11,RDAREA12 -n 2000 -c
pdbuffer -a gbuf02 -r RDAREA21 -n 1000 -c
pdbuffer -a gbuf03 -r RDAREA31 -n 1000 -c |
- Explanation
- Only RDAREAs belonging to a single back-end server are specified in the -r or -b option of each pdbuffer operand.
- Non-shared buffers gbuf01, gbuf02, and gbuf03 are allocated to BES11, BES21, and BES31, respectively.
- Even after system switchover, gbuf01 is used exclusively by BES11 and thus the buffer hit rate does not decline. However, because a buffer to be used after system switchover must be allocated to each accepting unit, a large amount of memory is used.
- Notes
- The same global buffer is created for all accepting units. This global buffer is not used until system switchover occurs.
- To improve memory efficiency, specify RDAREAs of the same page size.
(b) Allocating global buffers to be shared by servers within a unit
Specify this option if you wish to maintain the same buffer performance even when multi-point errors occur during reduced operation in an environment with ample memory. Specify RDAREAs allocated to back-end servers within the same unit in the -r or -b option of each pdbuffer operand.
System configuration example
![[Figure]](figure/zu251252.gif)
Global buffer definitions
pdbuffer -a gbuf01 -r RDAREA11,RDAREA12 -n 1000 -c
pdbuffer -a gbuf02 -r RDAREA21,RDAREA22 -n 1000 -c
pdbuffer -a gbuf03 -r RDAREA31,RDAREA32 -n 1000 -c |
- Explanation
- RDAREAs allocated to back-end servers within the same unit are specified in the -r or -b option of each pdbuffer operand.
- Global buffers gbuf01, gbuf02, and gbuf03 that are to be shared by servers within each unit are allocated.
- Because gbuf01 is used even after system switchover, the buffer hit rate does not decline. However, because a buffer to be used after system switchover must be allocated to each accepting unit, a large amount of memory is used.
- Notes
- The same global buffer is created for all accepting units. This global buffer is not used until system switchover occurs.
- A global buffer with this specification is shared among multiple servers.
- The buffer size when the -l option of the pdbuffer operand is omitted is the maximum page size of the specified RDAREAs.
(c) Allocating global buffers to be shared by servers in multiple units
Rather than specifying RDAREAs allocated to servers within the same unit, you may specify RDAREAs allocated to servers in different units in the -r or -b option of the pdbuffer operand.
System configuration example
![[Figure]](figure/zu251254.gif)
Global buffer definition
pdbuffer -a gbuf01 -r RDAREA11,RDAREA21,RDAREA31 -n 1000 -c |
- Explanation
- RDAREAs allocated to servers located in different units are specified.
- A global buffer is not shared exclusively among RDAREAs allocated to servers within the same unit. Instead, a global buffer can be shared by RDAREAs allocated to servers located in different units.
- Before reduced operation, the resource (buffer) can be used exclusively by BES11. During reduced operation, because the resource must be shared between BES21 and BES11, the amount of the resource (buffer) that can be used by each back-end server is halved.
- Notes
- Because the switching destination is a single unit, the workload on the global buffer of that unit alone becomes high. Therefore, define multiple buffers to be shared by servers at multiple units so that the workload among individual units is balanced.
- The same global buffer is created for all accepting units.
- A global buffer with this specification is used exclusively by a single server during normal operation and is shared among multiple servers during reduced operation.
- The buffer size when the -l option of the pdbuffer operand is omitted is the maximum page size of the specified RDAREAs.
(d) Allocating global buffers to be shared by servers within a unit and in different units
You can specify RDAREAs to be shared by servers within a unit and in different units in the -r or -b option of the pdbuffer operand.
System configuration example
![[Figure]](figure/zu251256.gif)
Global buffer definition
pdbuffer -a gbuf01 -r RDAREA11,RDAREA12,RDAREA21,RDAREA22,RDAREA31,RDAREA32 -n 1000 -c |
- Explanation
- The RDAREAs to be shared by servers within the unit and in different units are specified in the -r or -b option of the pdbuffer operand.
- Because the global buffer is shared among RDAREAs that are shared by servers in different units, this method of buffer allocation results in a balanced workload during reduced operation. During normal operation, the back-end servers in each unit share that unit's gbuf01, and the amount of each buffer's resources allocated to each back-end server is one half of the total. During reduced operation, the three back-end servers share gbuf01, so the amount of buffer resources allocated to the back-end servers in each unit is one-third of the total.
- Notes
- Design the configuration so that the number of servers to be supported during reduced operation is equalized among the individual accepting units.
- The same global buffer is created for all accepting units.
- A global buffer with this specification is shared by multiple servers.
- The buffer size when the -l option of the pdbuffer operand is omitted is the maximum page size of the specified RDAREAs.
(3) Allocating a global buffer to an index (-i option specified)
To buffer the index pages of a particular index, allocate a global buffer for the index. If an index RDAREA contains only an index, you can also achieve the same effect by allocating a global buffer for an RDAREA (-r option specified) to that RDAREA. Allocation of global buffers to indexes on a unit-by-unit basis can be classified into four types depending on the allocation of the index RDAREA for the specified index. Table 25-16 shows the recommended conditions for global buffer sharing modes (specification of the -i option).
Table 25-16 Recommended conditions for global buffer sharing modes (-i option specified)
Specification method (index RDAREA specified by the -i option) | Index partitioning mode | Buffer sharing mode | Benefit | Recom- mended condition |
---|
RDAREAs in different servers | RDAREAs in the same unit | RDAREAs in different units |
---|
None | None | None | Non- partitioning and partitioning within the same server | Non-shared | Because global buffers are not shared with other servers, normal buffer performance can be maintained even when multiple errors occur. | Because buffers are allocated to all accepting units, this mode is recommended for indexes for which buffer performance should be maintained before and during reduced operation in an environment with ample memory capacity. |
Yes | Yes | None | Partitioning within the same unit | Sharing by servers within a unit | Normal buffer performance can be maintained even when multiple errors occur. | Because buffers are allocated to all accepting units, this mode is recommended for indexes for which buffer performance should be maintained before and during reduced operation in an environment with ample memory capacity. |
Yes | None | Yes | Partitioning between units but not within each unit | Sharing by servers in different units | - Back-end servers of the primary system can use all the specified buffer sectors.
- During reduced operation, the accepting unit's resources are shared, resulting in high memory efficiency.
| This mode is recommended when performance during normal operation is important and the buffer resources should be shared during reduced operation. |
Yes | Yes | Yes | Partitioning between units and within each unit | Sharing by servers within a unit and in different units | - During reduced operation, the accepting unit's resources are shared, resulting in high memory efficiency.
- Because the number of sharing servers can be balanced, workload during reduced operation can be balanced.
| This mode is recommended when the buffer resources should be shared and the workload should be balanced during reduced operation. |
You should determine whether or not to allocate buffers dedicated to indexes by considering the buffer design guidelines for the -i specification explained below.
- Buffer design guidelines for -i option specification
- For a non-partitioning index, partitioning index within the same server, or partitioning index within the same unit: Define a dedicated buffer if each unit within the HA group has sufficient memory capacity to allocate a global buffer.
- Cases other than 1: Define a global buffer for index. Allocate a number of buffer sectors that is appropriate for the sharing servers.
(a) Allocating a global buffer to a non-partitioning index
Specify a non-partitioning index in the -i option of the pdbuffer operand.
System configuration example
![[Figure]](figure/zu251260.gif)
Global buffer definition
pdbuffer -a gbuf01 -i USER01.INDEX01 -n 200 -c |
- Explanation
- Non-partitioning index USER01.INDEX01 is specified.
- This example allocates a shared global buffer to a non-partitioning index. The global buffer is used exclusively and is not shared with other servers. Even after system switchover, gbuf01 is used exclusively by BES11 and thus the buffer hit rate does not decline. However, because a buffer to be used after system switchover must be allocated to each accepting unit, a large amount of memory is used.
- Note
- The same global buffer is created for all accepting units. This global buffer is not used until system switchover occurs.
(b) Allocating a global buffer to a partitioning index within the same server
Specify an index that is partitioned within the same server in the -i option of the pdbuffer operand.
System configuration example
![[Figure]](figure/zu251262.gif)
Global buffer definition
pdbuffer -a gbuf01 -i USER01.INDEX01 -n 1000 -c |
- Explanation
- USER01.INDEX01, an index with row partitioning within a server, is specified.
- This example allocates a shared global buffer to an index partitioned within the same server. The global buffer is used exclusively and is not shared with other servers. Even after system switchover, gbuf01 is used exclusively by BES11 and thus the buffer hit rate does not decline. However, because a buffer to be used after system switchover must be allocated to each accepting unit, a large amount of memory is used.
- Notes
- The same global buffer is created for all accepting units. This global buffer is not used until system switchover occurs.
- To improve memory efficiency, specify index RDAREAs of the same page size.
(c) Allocating a global buffer to a partitioning index within the same unit
Specify an index that is partitioned within the same unit in the -i option of the pdbuffer operand.
System configuration example
![[Figure]](figure/zu251264.gif)
Global buffer definition
pdbuffer -a gbuf01 -i USER01.INDEX01 -n 1000 -c |
- Explanation
- This example allocates a shared global buffer to an index partitioned within the same unit. Even after system switchover, gbuf01 is used and thus the buffer hit rate does not decline. However, because a global buffer to be used after system switchover must be allocated to each accepting unit, a large amount of memory is used.
- Notes
- The same global buffer is created for all accepting units. This global buffer is not used until system switchover occurs.
- A global buffer with this specification is shared by multiple servers.
- To improve memory efficiency, specify index RDAREAs of the same page size.
- The buffer size when the -l option of the pdbuffer operand is omitted is the maximum page size of the specified index RDAREAs.
(d) Allocating a global buffer to an index partitioned between units but not within each unit
Specify an index that is partitioned between units but not within each unit in the -i option of the pdbuffer operand.
System configuration example
![[Figure]](figure/zu251266.gif)
Global buffer definition
pdbuffer -a gbuf01 -i USER01.INDEX01 -n 1000 -c |
- Explanation
- USER01.INDEX01, an index that is row partitioning between different units, is specified.
- This example allocates a global buffer to an index partitioned between units but not within each unit. Before reduced operation, the gbuf01 resource (buffer) is used exclusively by BES11. During reduced operation, because the resource is shared between BES21 and BES11, the amount of the resource (buffer) that can be used by each back-end server is halved.
- Notes
- Because the switching destination is a single unit, the workload on the global buffer of that unit alone becomes high. Therefore, you should define multiple buffers to be shared by servers at multiple units so that the workload among individual units is balanced.
- The same global buffer is created for all accepting units.
- A global buffer with this specification is used exclusively by a single server during normal operation and is shared among multiple servers during reduced operation.
- To improve memory efficiency, specify index RDAREAs of the same page size.
- The buffer size when the -l option of the pdbuffer operand is omitted is the maximum page size of the specified index RDAREAs.
(e) Allocating a global buffer to an index partitioned between units and within each unit
Specify an index that is partitioned between units and within each unit in the -i option of the pdbuffer operand.
System configuration example
![[Figure]](figure/zu251268.gif)
Global buffer definition
pdbuffer -a gbuf01 -i USER01.INDEX01 -n 1000 -c |
- Explanation
- USER01.INDEX01, an index with row partitioning within each unit and between servers, is specified.
- This example allocates a shared global buffer to an index partitioned between units and within each unit. During normal operation, back-end servers in the units share each gbuf01, and the amount of the buffer resources allocated to each back-end server is one half of the total. During reduced operation, the three back-end servers share gbuf01, so the amount of the buffer resources allocated to the back-end servers in each unit is one-third of the total.
- Notes
- Design the configuration so that the number of servers to be supported during reduced operation is equalized among the individual accepting units.
- The same global buffer is created for all accepting units.
- A global buffer with this specification is shared by multiple servers.
- To improve memory efficiency, specify index RDAREAs of the same page size.
- The buffer size when the -l option of the pdbuffer operand is omitted is the maximum page size of the specified index RDAREAs.
(4) Allocating a global buffer for OTHER (-o option specified)
One global buffer for OTHER can be allocated to all units to which the standby-less system switchover (effects distributed) facility is applied. The allocation method is explained below:
(a) Recommended conditions for a global buffer for OTHER
- System in which RDAREAs are added on an online basis
- RDAREAs with a low access frequency
- RDAREAs with a small number of accessed pages
- RDAREAs storing an extremely large number of pages (RDAREAs for which buffer hits are not expected)
(b) Notes about a global buffer for OTHER
- The resources of a global buffer for OTHER allocated to units are divided and used equitably among these units. Therefore, specify in the -n option of the pdbuffer operand a buffer sectors count that is appropriate to the number of servers used.
- In a system in which RDAREAs are added on an online basis, specify a buffer size in the -l option of the pdbuffer operand by taking into consideration the page sizes of the RDAREAs that will be added in the future.
(c) Allocation example of a global buffer for OTHER
Specify the -o option of the pdbuffer operand.
System configuration example
![[Figure]](figure/zu251270.gif)
Global buffer definitions
pdbuffer -a gbuf01 -r RDAREA11 -n 500 -c
pdbuffer -a gbuf02 -o -n 1000 -c |
- Explanation
- The -o and -c options of the pdbuffer operand are specified.
- A dedicated buffer is allocated to RDAREA11 and a global buffer for OTHER is allocated to all other RDAREAs. The global buffer for OTHER is created for all units to which the standby-less system switchover (effects distributed) facility is applicable.
(5) Allocating a global buffer during a configuration change (database reorganization utility)
Specify the name of an existing global buffer in the globalbuffer operand of the control statement of the database reorganization utility. You can use the pdbufls command to check the existing global buffers.
System configuration example
![[Figure]](figure/zu251272.gif)
Configuration changed definition
create rdarea RDAREA13 globalbuffer gbuf01 server name BES11
: |
- Explanation
- Shared global buffer gbuf01 is allocated to an added RDAREA. The added RDAREA uses gbuf01 even after system switchover.
- Design guidelines
- During both system switchover and system reactivation, allocate the global buffer specified with the globalbuffer operand.
- You cannot allocate an index global buffer or a LOB global buffer.
- The size of the global buffer to be specified must be greater than the page size of any RDAREA to be added. You can use the pdbufls command to check the global buffer size.
- The global buffer allocation specified here becomes invalid when the server terminates normally (normal or planned termination of the HiRDB system, normal termination of the unit, or normal termination of a server itself). Therefore, before the server starts normally the next time, you must use the pdbuffer operand in the system common definition to allocate global buffers. However, if a global buffer with the -o option specification has been allocated, that global buffer is allocated again, and therefore there is no need to modify the system common definition.
- When HiRDB fails to allocate a global buffer, no RDAREAs can be added.