Please enter search query.
Search <product_name> all support & community content...
NET_BUFFER_SZ, SIZE_DATA_BUFFERS and NUMBER_DATA_BUFFERS on UNIX - how they work and how to configure them
Article: 100000498
Last Published: 2018-07-26
Ratings: 6 0
Product(s): NetBackup & Alta Data Protection
Problem
NET_BUFFER_SZ, SIZE_DATA_BUFFERS and NUMBER_DATA_BUFFERS on UNIX/Linux - how they work and how to configure them
Solution
Here is some information on undocumented features for setting the Network Buffer Size, Data Buffer Size, and Number of Data Buffers used by NetBackup (tm) on UNIX/Linux platforms.
Note: These settings can be used to tune the performance of NetBackup in some configurations.
TCP/IP Network Buffer Size.
/usr/openv/netbackup/NET_BUFFER_SZ is a file containing a number indicating the size of the TCP/IP socket send and receive space that should be used for data transfers between the NetBackup media server and remote clients. The default value varies depending on NetBackup process and platform.
The default value can be changed by creating the file /usr/openv/netbackup/NET_BUFFER_SZ on the NetBackup media server and UNIX/Linux client hosts.
For example, 256KB could be configured and checked like this:
Most modern TCP stacks such as Linux and Windows auto-tune the TCP memory size based on network speed, network latency, and host memory pressure. So it is recommended to use a value of 0 to allow the OS to Auto tune the value for the environment. In this case to make the changes
to the NetBackup media server and Unix clients, the commands would be:
$ echo "0" > /usr/openv/netbackup/NET_BUFFER_SZ
$ cat /usr/openv/netbackup/NET_BUFFER_SZ
0
Note: See the related articles for best practices and Windows platform considerations.
Note: These settings can be used to tune the performance of NetBackup in some configurations.
TCP/IP Network Buffer Size.
/usr/openv/netbackup/NET_BUFFER_SZ is a file containing a number indicating the size of the TCP/IP socket send and receive space that should be used for data transfers between the NetBackup media server and remote clients. The default value varies depending on NetBackup process and platform.
The default value can be changed by creating the file /usr/openv/netbackup/NET_BUFFER_SZ on the NetBackup media server and UNIX/Linux client hosts.
For example, 256KB could be configured and checked like this:
$ echo "262144" > /usr/openv/netbackup/NET_BUFFER_SZ
$ cat /usr/openv/netbackup/NET_BUFFER_SZ
262144
Most modern TCP stacks such as Linux and Windows auto-tune the TCP memory size based on network speed, network latency, and host memory pressure. So it is recommended to use a value of 0 to allow the OS to Auto tune the value for the environment. In this case to make the changes
to the NetBackup media server and Unix clients, the commands would be:
$ echo "0" > /usr/openv/netbackup/NET_BUFFER_SZ
$ cat /usr/openv/netbackup/NET_BUFFER_SZ
0
Note: See the related articles for best practices and Windows platform considerations.
Data Buffer Size and 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 used exclusively for media servers, and have no effect 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 1024.
It is common to increase SIZE_DATA_BUFFERS to 256KB and NUMBER_DATA_BUFFERS to 128 or 256.
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 256 KB or 128 KB.
In order to configure NetBackup to use 16 x 256 KB 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 "256" > /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
256
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 [28551] <2> io_init: using 32768 data buffer size
12:02:55 [28551] <2> io_init: CINDEX 0, sched bytes for monitoring = 2000
12:02:55 [28551] <2> io_init: using 8 data buffers
or
15:26:01 [21544] <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 256 KB, the total shared memory usage would be:
(16 * 256k) * 2 * 4 = 32 MB (32768 KB)
Take into consideration the total system resources and the entire network.
The Maximum Transmission Unit (MTU) for the 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.
REFERENCE:
Best practices for NET_BUFFER_SZ and Buffer_size, why can't NetBackup change the TCP send/receive space
https://www.veritas.com/content/support/en_US/article.100016112
https://www.veritas.com/content/support/en_US/article.100016112