LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1324|回复: 6

portage新参数 --keep-going --jobs和--load-average

[复制链接]
发表于 2008-7-26 03:50:48 | 显示全部楼层 |阅读模式
http://planet.gentoo.org/develop ... age_parallel_builds

Portage now supports building multiple packages in parallel

In >=portage-2.2_rc2 there are a few new emerge options that many Gentoo users will probably be interested in:

--jobs JOBS
    Specifies the number of packages to build simultaneously.
    Also see the related --load-average option.

--keep-going
    Continue as much as possible after an error. When an error
    occurs, dependencies are recalculated for remaining packages
    and any with unsatisfied dependencies are automatically
    dropped. Also see the related --skipfirst option.

--load-average LOAD
    Specifies that no new builds should be started if there are
    other builds running and the load average is at least LOAD (a
    floating-point number). This option is recommended for use in
    combination with --jobs in order to avoid excess load. See
    make(1) for information about analogous options that should
    be configured via MAKEOPTS in make.conf(5).

Here is some sample parallel build output from a catalyst stage2 build, with emerge's new --jobs option enabled:

>>> Building (1 of 10) sys-devel/gettext-0.17 for /
>>> Building (2 of 10) sys-libs/zlib-1.2.3-r1 for /
>>> Building (3 of 10) virtual/libintl-0 for /
>>> Building (4 of 10) dev-util/unifdef-1.20 for /
>>> Installing virtual/libintl-0 to /
>>> Installing dev-util/unifdef-1.20 to /
>>> Building (5 of 10) sys-kernel/linux-headers-2.6.23-r3 for /
>>> Installing sys-libs/zlib-1.2.3-r1 to /
>>> Jobs: 3 of 10 complete, 2 running
发表于 2008-7-26 09:30:58 | 显示全部楼层
好像不错。这个特性似乎只对多核心cpu有好处,可惜我的单核p4编译时基本都是满载的(大多80%、%90以上)。
回复 支持 反对

使用道具 举报

发表于 2008-7-26 09:31:06 | 显示全部楼层
已经出来了啊。版主夜猫子,3点发言……要是昨天出来,我昨天夜里编译 octave 就不会因为出问题浪费大段时间了。

-j 是个好东西。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-7-26 19:41:07 | 显示全部楼层
--keep-going对所有人都有好处
这个参数我前段时间就提到过了
当时需要使用svn portage
现在不用了,用>=portage-2.2_rc2 即可,已经有ebuld了
回复 支持 反对

使用道具 举报

发表于 2008-8-10 01:08:32 | 显示全部楼层
今天升级的时候用了,确实不错
我的CPU是双核的,在make.conf中设了MAKEOPTS="-j3",--load-average设成多少合适啊?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-8-10 03:45:41 | 显示全部楼层
这个你可以自己试试
--load-average选项是设置上限的
load average的数值表示的是过去1/5/15分钟内处于running的状态的进程数量
可以在top的第一行里看到
回复 支持 反对

使用道具 举报

发表于 2008-11-14 05:00:35 | 显示全部楼层
新的是不是又没有了?我现在用的是2.2_RC12
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表