cancel
Showing results for 
Search instead for 
Did you mean: 

NetBackup Memory Utilization

S_Glazebrook
Level 2
Can NetBackup be configured to limit the amount of shared memory it can allocate?
3 REPLIES 3

Stumpr2
Level 6
yes it can.

NET_BUFFER_SZ, SIZE_DATA_BUFFERS and NUMBER_DATA_BUFFERS - how they work and how to configure them

http://seer.support.veritas.com/docs/183702.htm

Here is the part concerning shared memory
Data Buffer Size & Number of Data Buffers.

The NetBackup media server uses shared memory to buffer data between the network and the tape drive (or between the disk and the tape drive if the NetBackup media server and client are the same system). By default, NetBackup uses a default value of 8 x 32KB shared memory buffers for non-multiplexed backups and 4 x 64KB for a multiplexed backup.

These buffers can be configured by creating the files /usr/openv/netbackup/db/config/SIZE_DATA_BUFFERS and /usr/openv/netbackup/db/config/NUMBER_DATA_BUFFERS on the NetBackup media server. These parameters are meant exclusively for media servers, and should not be used on a pure master server or client.

The SIZE_DATA_BUFFERS file should contain a single line specifying the data buffer size in bytes in decimal format.
The NUMBER_DATA_BUFFERS file should contain a single line specifying the number of data buffers in decimal format.

The value in the SIZE_DATA_BUFFERS file has to be a multiple of 1024B.
It is common to increase SIZE_DATA_BUFFERS to 256KB and NUMBER_DATA_BUFFERS to 16.


IMPORTANT: Because the data buffer size equals the tape I/O size, the value specified in SIZE_DATA_BUFFERS must not exceed the maximum tape I/O size supported by the tape drive or operating system. This is usually 256K or 128K bytes.


In order to configure NetBackup to use 16 x 256KB data buffers, specify 262144 (256 x 1024) in SIZE_DATA_BUFFERS and 16 in NUMBER_DATA_BUFFERS:

# echo "262144" > /usr/openv/netbackup/db/config/SIZE_DATA_BUFFERS
# echo "16" > /usr/openv/netbackup/db/config/NUMBER_DATA_BUFFERS
# cat /usr/openv/netbackup/db/config/SIZE_DATA_BUFFERS
262144
# cat /usr/openv/netbackup/db/config/NUMBER_DATA_BUFFERS
16
#

Care should be taken when changing these values. For example, increasing the tape buffer size can cause some backups to run slower and there have been cases where there have been restore problems.


IMPORTANT: After making any changes, it is vitally important to verify that the following tests can be completed successfully:

1. Run a backup.
2. Restore data from the new backup created in step 1.
3. Restore data from a backup created prior to the changes to SIZE_DATA_BUFFERS and NUMBER_DATA_BUFFERS.


The number and size of the data buffers used by the NetBackup media server can be checked by looking in the "bptm" log file:

12:02:55 <2> io_init: using 32768 data buffer size
12:02:55 <2> io_init: CINDEX 0, sched bytes for monitoring = 2000
12:02:55 <2> io_init: using 8 data buffers

or

15:26:01 <2> mpx_setup_restore_shm: using 12 data buffers, buffer size is 65536


Increasing the size and number of the data buffers will use up more shared memory, which is a limited system resource. The total amount of shared memory used is: (buffer_size * num_buffers) * drives * MPX. So, for two tape drives, each configured with an MPX of 4, and with 16 data buffers of 256k, the total shared memory usage would be:

(16 * 256k) * 2 * 4 = 32MBytes (32768 KB)

Take into consideration the total system resources and the entire network.
The Maximum Transmission Unit (MTU) for the Local Area Network (LAN) may also have to be changed.


NOTE: For Digital Linear Tape (DLT) drives the number that seems to give the best performance for SIZE_DATA_BUFFERS is 65536. Further performance improvements can be achieved by increasing the value in the NUMBER_DATA_BUFFERS file.

Banu_SAHIN
Level 3
Also you must configure your OS shared memory settings too. On Solaris you must set the sharing memory settings min. requirements for Netbackup. You can read this article (Document ID: 238063) http://seer.support.veritas.com/docs/238063.htm

Stumpr2
Level 6
This may be helpful

For same server backups, the use of shared memory needs to be overridden in certain situations.
http://seer.support.veritas.com/docs/186016.htm

Details:
When performing a NetBackup backup where the "CLIENT_NAME" variable on a master/media server matches the system hostname, uses shared memory v.s. opening sockets to transport data. This is normal; however, sometimes situations arise where it is not possible or desired to use shared memory during a backup. Touching the file "NOSHM" in the openv/NetBackup directory will cause the server to not use shared memory for the backup. The backup should proceed using sockets.

NOTE: This is useful both as a workaround while solving a shared memory problem, and also as a test to verify that a problem is being caused by shared memory issues.

When a Master/Media server performs backups of itself, shared memory is used to communicate between NetBackup processes instead of using tcp sockets. Shared memory is used to speed up the backup process.
This is a normal process, however, situations may arise where it is not possible or desirable to use shared memory during a backup. This would be if the Master/Media server hosts some other type of application that uses large amount of shared memory, i.e., Oracle. The shared memory utilization for NetBackup process communication can be shut off by touching a file name NOSHM in the /usr/openv/NetBackup directory. If this file is touched, the backup will progress using tcp sockets for NetBackup process communication.
NOTE: This use of shared memory is not to be confused with the shared memory used by the bptm process to buffer data being written to tape. The shared memory usage by bptm will always occur for any backup, local or otherwise.