重复不变的内存使用(重复)

在所有运行S3服务器的服务器上,Duplicity的内存使用量一直很高。

Duplicity是不是应该运行它的备份任务并在之后终止它的工作,还是我在这里错过了一些东西?

duply -v duply version 2.0.1 (http://duply.net) Using installed duplicity version 0.7.11, python 2.7.6, gpg 1.4.16 (Home: ~/.gnupg), awk 'GNU Awk 4.0.1', grep 'grep (GNU grep) 2.16', bash '4.3.11(1)-release (x86_64-pc-linux-gnu)'. 

我使用Duply来pipe理每个服务器上的configuration文件,这里有一个:

 GPG_KEY='FOO' GPG_PW='FOO' TARGET='s3://s3-eu-central-1.amazonaws.com/foo-bucket/bar-location' export AWS_ACCESS_KEY_ID='FOO' export AWS_SECRET_ACCESS_KEY='FOO' # base directory to backup SOURCE='/' # exclude folders containing exclusion file (since duplicity 0.5.14) # Uncomment the following two lines to enable this setting. FILENAME='.duplicity-ignore' DUPL_PARAMS="$DUPL_PARAMS --exclude-if-present '$FILENAME'" # Time frame for old backups to keep, Used for the "purge" command. # see duplicity man page, chapter TIME_FORMATS) MAX_AGE=2M # Number of full backups to keep. Used for the "purge-full" command. # See duplicity man page, action "remove-all-but-n-full". MAX_FULL_BACKUPS=2 # Number of full backups for which incrementals will be kept for. # Used for the "purge-incr" command. # See duplicity man page, action "remove-all-inc-of-but-n-full". MAX_FULLS_WITH_INCRS=1 # activates duplicity --full-if-older-than option (since duplicity v0.4.4.RC3) # forces a full backup if last full backup reaches a specified age, for the # format of MAX_FULLBKP_AGE see duplicity man page, chapter TIME_FORMATS # Uncomment the following two lines to enable this setting. MAX_FULLBKP_AGE=1M DUPL_PARAMS="$DUPL_PARAMS --full-if-older-than $MAX_FULLBKP_AGE " # sets duplicity --volsize option (available since v0.4.3.RC7) # set the size of backup chunks to VOLSIZE MB instead of the default 25MB. # VOLSIZE must be number of MB's to set the volume size to. # Uncomment the following two lines to enable this setting. VOLSIZE=100 DUPL_PARAMS="$DUPL_PARAMS --volsize $VOLSIZE " # more duplicity command line options can be added in the following way # don't forget to leave a separating space char at the end #DUPL_PARAMS="$DUPL_PARAMS --put_your_options_here " 

以下是运行备份的cronjob:

 12 3 * * * nice -n19 ionice -c2 -n7 duply database backup_verify_purge --force --name foo_database >> /var/log/duplicity.log 2>&1 26 3 * * * nice -n19 ionice -c2 -n7 duply websites backup_verify_purge --force --name foo_websites >> /var/log/duplicity.log 2>&1 53 4 * * * nice -n19 ionice -c2 -n7 duply system backup_verify_purge --force --name foo_system >> /var/log/duplicity.log 2>&1 

下面是一个24小时的内存使用情况图:

在这里输入图像说明

我正在使用几乎相同的configuration,看到非常相似的内存使用情况。 我的python和gpg是稍微新的转,我不使用duply。 重复性是0.7.11。

我testing过的其中一台机器(el6)支持大约350万个文件到s3,最高容量约为3G内存。 从大约3.9G的RAM中恢复这个备份的单个文件:

 29067 root /opt/duplicity/bin/python2 0 3893924 3893957 3894704 

另一台备份大约750万个文件的机器(el5)目前在运行时使用了1.9G的资源。

想知道与你的post有关的两件事情:

  1. 这个内存使用是否正常? 如果备份卷中有大量文件,则认为这可能是正常的。 如果没有,我应该用多less钱来备份大约50G到s3或者swift(如果有的话)的3.5M文件。
  2. 将-volsize参数改为小于200M会有帮助吗? 我在更新日志中注意到.7.11相当多地增加了默认的大小。

还有什么可以减less内存使用的?

对不起,我不能回答你的问题,但我觉得这个post是相关的,因为我们似乎正在处理类似的问题。 我环顾四周,除了与〜2012的bug有关外,没有看到很多关于正常的重复内存使用情况。

谢谢!

看起来我的问题是由通过apt-get安装的Duplicity版本引起的。

安装tarball版本解决了内存问题。

这里有更多的信息: https : //answers.launchpad.net/duplicity/+question/577611

Kenneth也看到这可能与大文件有关:

Kenneth Loafman(kenneth-loafman)在2016-02-26上写道:在巨大的文件上,会生成大量的sig,并保存到文件完成。 为了减轻这个问题,使用“–max-blocksize = 20480”或更高来避免这个问题。

我有同样的问题,有没有人有解决这个问题的运气?

我已经更新了重复性,python-boto,尝试高-max-blocksize,没有运气。 它备份没有任何问题的FTP位置,如果我尝试备份到S3失败与OOM杀死…

这是奇怪的,我有生产和舞台服务器,是相同的,并正常备份正常与S3使用600MB的RAM使用。 生产服务器吃了3GB +,然后失败。