我的 Bacula 传输率非常低。我如何配置导演来改善这一点?
My Bacula Transfer rate it's extremely low. How can i configure the director to improve this?
我正在使用 bacula 创建一个基于云的解决方案来备份我们所有的服务器。我们有很多本地服务器,还有一些服务器在 AWS 和 OPENCLOUD 等云上。
我看到备份的传输速率非常低(我说的是 400kbps/s),小型文件系统每个大约 5/6GB...这让我很担心,因为我们正在测试这个客户端,使备份完整,最后2 小时完成,稍后我们将添加一些非常大的客户端(每个大约 500GB/1TB)以对它们进行完整备份
这是备份此客户端后打印的消息:
09-Nov 03:43 bacula-dir JobId 37: Start Backup JobId 37, Job=Backup-
mailserverp.2018-11-08_22.15.00_13
09-Nov 06:08 bacula-sd JobId 37: Elapsed time=02:24:57, Transfer rate=580
Bytes/second
Scheduled time: 08-Nov-2018 22:15:00
Start time: 09-Nov-2018 03:43:51
End time: 09-Nov-2018 06:08:52
Elapsed time: 2 hours 25 mins 1 sec
FD Bytes Written: 5,039,356 (5.039 MB)
SD Bytes Written: 5,048,922 (5.048 MB)
09-Nov 01:09 bacula-dir JobId 36: Start Backup JobId 36, Job=Backup-
nagios.2018-11-08_22.15.00_12
09-Nov 03:43 bacula-sd JobId 36: Elapsed time=02:34:39, Transfer rate=386.9 K
Bytes/second
Elapsed time: 2 hours 34 mins 47 secs
FD Bytes Written: 3,590,358,216 (3.590 GB)
SD Bytes Written: 3,590,441,488 (3.590 GB)
09-Nov 00:38 bacula-dir JobId 35: Start Backup JobId 35, Job=Backup-
bapuppet01.2018-11-08_21.25.00_11
09-Nov 00:38 bacula-sd JobId 34: Elapsed time=02:11:17, Transfer rate=35.68 K Bytes/second
Scheduled time: 08-Nov-2018 21:05:00
Start time: 08-Nov-2018 22:27:30
End time: 09-Nov-2018 00:38:52
Elapsed time: 2 hours 11 mins 22 secs
此消息显示了三台服务器,两台在本地,一台在 OpenCloud Cloudbased 主机上。鉴于结构,我们假设本地客户端将是所有备份中最慢的。但是在我们使用 iperf 命令测试连接后,我们看到以下内容:
FROM SERVER TO CLIENT
[root@otc-bacula ~]# iperf -c 172.xx.xx.xxx -p 9102 -i 2 -t 60
------------------------------------------------------------
Client connecting to 172.xx.xx.xxx, TCP port 9102
TCP window size: 45.0 KByte (default)
------------------------------------------------------------
[ 3] local 172.xx.xx.xxx port 33902 connected with 172.xx.xx.xxx port 9102
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 2.0 sec 95.9 MBytes 402 Mbits/sec
[ 3] 2.0- 4.0 sec 180 MBytes 754 Mbits/sec
[ 3] 4.0- 6.0 sec 132 MBytes 554 Mbits/sec
[ 3] 6.0- 8.0 sec 70.6 MBytes 296 Mbits/sec
FROM CLIENT TO SERVER ################################
[root@v-nagios ~]# iperf -c 172.xx.xxx.xxx -p 9102 -i 2 -t 60
------------------------------------------------------------
Client connecting to 172.xx.xxx.xxx, TCP port 9102
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[ 3] local 172.xx.xxx.xxx port 41538 connected with 172.xxx.xxx.xxx port 9102
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 2.0 sec 3.75 MBytes 15.7 Mbits/sec
[ 3] 2.0- 4.0 sec 4.00 MBytes 16.8 Mbits/sec
[ 3] 4.0- 6.0 sec 2.50 MBytes 10.5 Mbits/sec
[ 3] 6.0- 8.0 sec 4.38 MBytes 18.4 Mbits/sec
[ 3] 8.0-10.0 sec 3.50 MBytes 14.7 Mbits/sec
[ 3] 10.0-12.0 sec 2.12 MBytes 8.91 Mbits/sec
我已经尝试过 despooling 选项,但我没有看到任何改进。有谁知道测试 bacula 性能的方法或脚本以及如何改进它?我可以尝试尽可能减少 FileSets 来备份我们真正需要的东西,但仍然有很多文件/gygas。
这就是 Bacula-Dir.conf 如果有帮助:
Director { # define myself
Name = bacula-dir
DIRport = 9101 # where we listen for UA connections
DirAddress = 172.19.120.106
QueryFile = "/etc/bacula/query.sql"
WorkingDirectory = "/var/spool/bacula"
PidDirectory = "/var/run"
Maximum Concurrent Jobs = 10
Password = "123456" # Console password
Messages = Daemon
Heartbeat Interval = 1
}
Storage {
Name = File
# Do not use "localhost" here
Address = 172.19.120.106 # N.B. Use a fully qualified name here
SDPort = 9103
Password = "123456"
Device = FileStorage
Media Type = File
}
Pool {
Name = File
Pool Type = Backup
Label Format = OpenCloud-
Recycle = yes # Bacula can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # one year
Maximum Volume Bytes = 100G # Limit Volume size to something reasonable
Maximum Volumes = 350 # Limit number of Volumes in Pool
}
我认为此信息很有用,但如果您需要某些服务的更多信息或需要我做某事,我很乐意提供所需的数据...我真的需要增加此解决方案的传输速率。
我意识到我正在使用 MySql 作为数据库后端,并且在处理大量插入数据时遇到了麻烦。所以我再次进行了全新安装,但这次使用 Postgresql 作为数据库,并且达到了将近 40 mb/s 作为传输率。大进步
我会将自己的答案标记为正确
这里有一些关于 Bacula 调整的建议:
Bacula 也支持 MySQL,但几乎总是需要根据您的发现进行调整。自动 mysql 调整脚本在这里非常有用。
https://github.com/major/MySQLTuner-perl
PostgreSQL 的扩展性似乎更好,尤其是对于 Bacula,但仍需要调整。佩德罗在这里写了一个很好的指南:http://www.pedroliveira.pt/index.php/bacula-performance-tunnig-with-postgresql/
而且,如果您还没有,加入 Bacula 用户邮件列表也是一个好主意,您可以在其中搜索档案并获得有关其他 Bacula 问题的帮助。 https://www.bacula.org/support/email-lists/
最后,如果您有订阅,Bacula Systems 可以提供调整指导。
注意:我在 Bacula Systems 担任 CDMO。
我正在使用 bacula 创建一个基于云的解决方案来备份我们所有的服务器。我们有很多本地服务器,还有一些服务器在 AWS 和 OPENCLOUD 等云上。 我看到备份的传输速率非常低(我说的是 400kbps/s),小型文件系统每个大约 5/6GB...这让我很担心,因为我们正在测试这个客户端,使备份完整,最后2 小时完成,稍后我们将添加一些非常大的客户端(每个大约 500GB/1TB)以对它们进行完整备份
这是备份此客户端后打印的消息:
09-Nov 03:43 bacula-dir JobId 37: Start Backup JobId 37, Job=Backup-
mailserverp.2018-11-08_22.15.00_13
09-Nov 06:08 bacula-sd JobId 37: Elapsed time=02:24:57, Transfer rate=580
Bytes/second
Scheduled time: 08-Nov-2018 22:15:00
Start time: 09-Nov-2018 03:43:51
End time: 09-Nov-2018 06:08:52
Elapsed time: 2 hours 25 mins 1 sec
FD Bytes Written: 5,039,356 (5.039 MB)
SD Bytes Written: 5,048,922 (5.048 MB)
09-Nov 01:09 bacula-dir JobId 36: Start Backup JobId 36, Job=Backup-
nagios.2018-11-08_22.15.00_12
09-Nov 03:43 bacula-sd JobId 36: Elapsed time=02:34:39, Transfer rate=386.9 K
Bytes/second
Elapsed time: 2 hours 34 mins 47 secs
FD Bytes Written: 3,590,358,216 (3.590 GB)
SD Bytes Written: 3,590,441,488 (3.590 GB)
09-Nov 00:38 bacula-dir JobId 35: Start Backup JobId 35, Job=Backup-
bapuppet01.2018-11-08_21.25.00_11
09-Nov 00:38 bacula-sd JobId 34: Elapsed time=02:11:17, Transfer rate=35.68 K Bytes/second
Scheduled time: 08-Nov-2018 21:05:00
Start time: 08-Nov-2018 22:27:30
End time: 09-Nov-2018 00:38:52
Elapsed time: 2 hours 11 mins 22 secs
此消息显示了三台服务器,两台在本地,一台在 OpenCloud Cloudbased 主机上。鉴于结构,我们假设本地客户端将是所有备份中最慢的。但是在我们使用 iperf 命令测试连接后,我们看到以下内容:
FROM SERVER TO CLIENT
[root@otc-bacula ~]# iperf -c 172.xx.xx.xxx -p 9102 -i 2 -t 60
------------------------------------------------------------
Client connecting to 172.xx.xx.xxx, TCP port 9102
TCP window size: 45.0 KByte (default)
------------------------------------------------------------
[ 3] local 172.xx.xx.xxx port 33902 connected with 172.xx.xx.xxx port 9102
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 2.0 sec 95.9 MBytes 402 Mbits/sec
[ 3] 2.0- 4.0 sec 180 MBytes 754 Mbits/sec
[ 3] 4.0- 6.0 sec 132 MBytes 554 Mbits/sec
[ 3] 6.0- 8.0 sec 70.6 MBytes 296 Mbits/sec
FROM CLIENT TO SERVER ################################
[root@v-nagios ~]# iperf -c 172.xx.xxx.xxx -p 9102 -i 2 -t 60
------------------------------------------------------------
Client connecting to 172.xx.xxx.xxx, TCP port 9102
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[ 3] local 172.xx.xxx.xxx port 41538 connected with 172.xxx.xxx.xxx port 9102
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 2.0 sec 3.75 MBytes 15.7 Mbits/sec
[ 3] 2.0- 4.0 sec 4.00 MBytes 16.8 Mbits/sec
[ 3] 4.0- 6.0 sec 2.50 MBytes 10.5 Mbits/sec
[ 3] 6.0- 8.0 sec 4.38 MBytes 18.4 Mbits/sec
[ 3] 8.0-10.0 sec 3.50 MBytes 14.7 Mbits/sec
[ 3] 10.0-12.0 sec 2.12 MBytes 8.91 Mbits/sec
我已经尝试过 despooling 选项,但我没有看到任何改进。有谁知道测试 bacula 性能的方法或脚本以及如何改进它?我可以尝试尽可能减少 FileSets 来备份我们真正需要的东西,但仍然有很多文件/gygas。
这就是 Bacula-Dir.conf 如果有帮助:
Director { # define myself
Name = bacula-dir
DIRport = 9101 # where we listen for UA connections
DirAddress = 172.19.120.106
QueryFile = "/etc/bacula/query.sql"
WorkingDirectory = "/var/spool/bacula"
PidDirectory = "/var/run"
Maximum Concurrent Jobs = 10
Password = "123456" # Console password
Messages = Daemon
Heartbeat Interval = 1
}
Storage {
Name = File
# Do not use "localhost" here
Address = 172.19.120.106 # N.B. Use a fully qualified name here
SDPort = 9103
Password = "123456"
Device = FileStorage
Media Type = File
}
Pool {
Name = File
Pool Type = Backup
Label Format = OpenCloud-
Recycle = yes # Bacula can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # one year
Maximum Volume Bytes = 100G # Limit Volume size to something reasonable
Maximum Volumes = 350 # Limit number of Volumes in Pool
}
我认为此信息很有用,但如果您需要某些服务的更多信息或需要我做某事,我很乐意提供所需的数据...我真的需要增加此解决方案的传输速率。
我意识到我正在使用 MySql 作为数据库后端,并且在处理大量插入数据时遇到了麻烦。所以我再次进行了全新安装,但这次使用 Postgresql 作为数据库,并且达到了将近 40 mb/s 作为传输率。大进步
我会将自己的答案标记为正确
这里有一些关于 Bacula 调整的建议:
-
Bacula 也支持
MySQL,但几乎总是需要根据您的发现进行调整。自动 mysql 调整脚本在这里非常有用。 https://github.com/major/MySQLTuner-perl
PostgreSQL 的扩展性似乎更好,尤其是对于 Bacula,但仍需要调整。佩德罗在这里写了一个很好的指南:http://www.pedroliveira.pt/index.php/bacula-performance-tunnig-with-postgresql/
而且,如果您还没有,加入 Bacula 用户邮件列表也是一个好主意,您可以在其中搜索档案并获得有关其他 Bacula 问题的帮助。 https://www.bacula.org/support/email-lists/
最后,如果您有订阅,Bacula Systems 可以提供调整指导。
注意:我在 Bacula Systems 担任 CDMO。