EMERGE DEFAULT OPTS/zh-cn

EMERGE_DEFAULT_OPTS 变量条目用于附加到 emerge 命令行. 它通常用于通过  和   允许并发的 emerge 操作> 选项，它告诉 Portage 可以使用多少并行包构建以及可以使用并行性的系统负载（平均负载）.

Parallel builds
With  (short form:  ),  runs N jobs at a time (without an argument,   will flood the processor with as many jobs as possible, and is not recommended). A typical value for N would be equal to the number of cores.

For example, to run up to three jobs in parallel:

For more information, see the EMERGE_DEFAULT_OPTS article.

When used with  (short form:  ), emerge will try to keep the load average of the system less than X.Y, a floating point number. If  is set as well, then it will run up to the limit indicated by that parameter.

The load average value is the same as displayed by or, and for an N -core system, a load average of   would be a 100% load. Another rule of thumb here is to set  which will limit the load to 90%, thus maintaining responsiveness.

These two settings are suited for long emerges which include multiple source code files to make the most of the  parameter. They can also cause emerge errors in some cases, so use with caution and be prepared to comment these out if problems arise.