免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 7190 | 回复: 16
打印 上一主题 下一主题

[Veritas NBU] [原创]NBU 的tune [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-10-23 14:36 |只看该作者 |倒序浏览
这几天user的nbu很慢,想作些tune,我也做了些准备和试验,和大家分享一下.
Nbu tune 从大的说很复杂


一 硬件


主要是架构,机器的选型(这个先不说,环境要求不同,差距很大)

二 软件

1 nbu软件

主要从几个方面分别介绍下:

TCP/IP Network Buffer Size.

/usr/openv/netbackup/NET_BUFFER_SZ is a file containing a number indicating the TCP/IP socket buffer size that should be used for data transfers between the NetBackup media server and its clients. If the file does not exist, the default value used is 32032 bytes.

The default value can be changed by creating the file /usr/openv/netbackup/NET_BUFFER_SZ on the NetBackup media server and client systems.

The /usr/openv/netbackup/NET_BUFFER_SZ file is a text file containing a single line specifying the value of the Network Buffer Size in bytes in decimal format.

For example, a Network Buffer Size of 64KB could be configured and checked like this:

# echo "65536" > /usr/openv/netbackup/NET_BUFFER_SZ
# cat /usr/openv/netbackup/NET_BUFFER_SZ
65536
#

Specifying a larger value in the NET_BUFFER_SZ file may improve the performance of backups and restores. It is recommended that if NET_BUFFER_SZ is used, the same value should be set on all the NetBackup media servers and clients.



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 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 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 "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 [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.


NUMBER_DATA_BUFFERS_DISK

和 NUMBER_DATA_BUFFERS
的用法相似,但,一般瓶颈不会再这里,所以不在重复



2 Os kernel tune(unix)

Os 这里主要以solaris为例(比较熟)
Tune 也主要是 share memory
下面是一些参数和推荐tune


Message queues

set msgsys:msginfo_msgmax = maximum message size
set msgsys:msginfo_msgmnb = maximum length of a message queue in
bytes. The length of the message queue is the sum of the lengths of all the
messages in the queue.
set msgsys:msginfo_msgmni = number of message queue identifiers
set msgsys:msginfo_msgtql = maximum number of outstanding messages
system-wide that are waiting to be read across all message queues.

Semaphores

set semsys:seminfo_semmap = number of entries in semaphore map
set semsys:seminfo_semmni = maximum number of semaphore identifiers
system-wide
set semsys:seminfo_semmns = number of semaphores system-wide
set semsys:seminfo_semmnu = maximum number of undo structures in
system
set semsys:seminfo_semmsl = maximum number of semaphores per id

set semsys:seminfo_semopm = maximum number of operations per semop
call
set semsys:seminfo_semume = maximum number of undo entries per
process

Shared memory

set shmsys:shminfo_shmmin = minimum shared memory segment size
set shmsys:shminfo_shmmax = maximum shared memory segment size
set shmsys:shminfo_shmseg = maximum number of shared memory
segments that can be attached to a given process at one time
set shmsys:shminfo_shmmni = maximum number of shared memory



*BEGIN NetBackup with the following recommended minimum settings in a
Solaris /etc/system file
*Message queues
set msgsys:msginfo_msgmap=512
set msgsys:msginfo_msgmax=8192
set msgsys:msginfo_msgmnb=65536
set msgsys:msginfo_msgmni=256
set msgsys:msginfo_msgssz=16
set msgsys:msginfo_msgtql=512
set msgsys:msginfo_msgseg=8192
*Semaphores
set semsys:seminfo_semmap=64
set semsys:seminfo_semmni=1024
set semsys:seminfo_semmns=1024
set semsys:seminfo_semmnu=1024
set semsys:seminfo_semmsl=300
set semsys:seminfo_semopm=32
set semsys:seminfo_semume=64
*Shared memory
set shmsys:shminfo_shmmax=16777216
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=220
set shmsys:shminfo_shmseg=100
*END NetBackup recommended minimum settings

以上只一部 nbu的tune 还是很多,很复杂的.

论坛徽章:
0
2 [报告]
发表于 2006-10-23 19:40 |只看该作者
顶一下子哦!

论坛徽章:
0
3 [报告]
发表于 2006-10-23 19:43 |只看该作者
嘿嘿,,很懒的写东西,,,,,,,,,,

论坛徽章:
0
4 [报告]
发表于 2006-10-24 21:28 |只看该作者
搂主 是veritas的手册吗? 能告诉是哪一本?

论坛徽章:
0
5 [报告]
发表于 2006-10-25 09:37 |只看该作者
原帖由 liwenguo 于 2006-10-24 21:28 发表
搂主 是veritas的手册吗? 能告诉是哪一本?

不是..谢谢.

论坛徽章:
0
6 [报告]
发表于 2006-10-28 18:38 |只看该作者
请楼主继续,写更好的帖子。

论坛徽章:
0
7 [报告]
发表于 2006-10-30 10:29 |只看该作者
原帖由 maping 于 2006-10-28 18:38 发表
请楼主继续,写更好的帖子。

其实不想写
老大,逼着写report啊。。。

应该会有后续吧。。。不确定了

论坛徽章:
0
8 [报告]
发表于 2006-10-30 11:10 |只看该作者
请问问,nbu能把备份的数据还原的吗?
有没有还原的功能的呢。还是要自己写上脚本去还原的??

论坛徽章:
0
9 [报告]
发表于 2006-10-30 12:12 |只看该作者
原帖由 filwy 于 2006-10-30 11:10 发表
请问问,nbu能把备份的数据还原的吗?
有没有还原的功能的呢。还是要自己写上脚本去还原的??

论坛徽章:
0
10 [报告]
发表于 2006-10-30 14:09 |只看该作者
备份的数据当然可以还原.
也可以用tar把磁带中的数据读出来.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP