yum – 我该怎么做才能加速createrepo?

我们使用yum存储库将我们的软件分发到我们的生产实例.不幸的是,createrepo正在成为一个瓶颈,我们在存储库中只有469个包.
$time createrepo /opt/tm-yum-repo
Spawning worker 0 with 469 pkgs
Workers Finished
Gathering worker results

Saving Primary Metadata
Saving file lists Metadata
Saving other Metadata
Generating sqlite DBs
sqlite DBs complete

real    0m43.188s
user    0m37.798s
sys 0m1.296s

我该怎么做才能让它更快?

dmourati在他的回答中给出的–cachedir选项对你有帮助,但是你也应该使用–update,特别是如果你不是一次替换所有469个包.
--update
              If Metadata already exists  in  the  outputdir  and  an  rpm  is
              unchanged  (based on file size and mtime) since the Metadata was
              generated,reuse the existing Metadata rather than recalculating
              it.  In  the  case  of a large repository with only a few new or
              modified rpms this can significantly reduce I/O  and  processing
              time.

此外,如果以这种方式部署它是真正时间敏感的,那么考虑为这个包创建一个单独的repo,而更新也没有用.

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...