微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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,而更新也没有用.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐