加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

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

发布时间:2020-12-15 18:38:15 所属栏目:安全 来源:网络整理
导读:我们使用yum存储库将我们的软件分发到我们的生产实例.不幸的是,createrepo正在成为一个瓶颈,我们在存储库中只有469个包. $time createrepo /opt/tm-yum-repoSpawning worker 0 with 469 pkgsWorkers FinishedGathering worker resultsSaving Primary metadat
我们使用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,而更新也没有用.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读