Skip to main content

Linux上的多核

info

此文档已过时。截至 4.0.137,默认行为是使用多进程模式。该设置仍然存在,但默认值为 true

默认情况下,Remotion 在 Linux 上使用 --single-process 标志启动 Chromium 浏览器。这是因为:

🌐 By default, Remotion starts the Chromium browser on Linux with the --single-process flag. This is because:

  • Chromium 的沙盒功能并不支持所有 Linux 发行版
  • 较旧版本的 Chromium 在以多进程无头模式启动时会崩溃
  • 如果某些桌面库缺失,Chromium 在某些发行版上启动时可能会崩溃。

这可能导致渲染性能下降,尤其是在尝试利用高核心 CPU 和高 Remotion 并发时。

🌐 This can lead to degraded rendering performance, especially when trying to leverage high-core CPUs and high Remotion concurrency.

在 Linux 上启用多进程渲染

🌐 Enable multi-process rendering on Linux

可从 v4.0.42 获取

🌐 available from v4.0.42

默认启用。在 Linux 上渲染时,如果要禁用 Chromium 的多进程模式:

🌐 Enabled by default. To disable multi-process mode for Chromium during rendering on Linux:

我应该启用多进程模式吗?

🌐 Should I enable multi-process mode?

答案取决于 Linux 环境。如果你在服务器上运行 Remotion,你应该尝试启用多进程模式,看看是否有效。

🌐 The answer depends on the Linux environment. If you are running Remotion on a server, you should try to enable multi-process mode and see if it works.

我们推荐的 Docker 镜像已确认在启用多进程模式下可正常工作。

🌐 Our recommended Docker image is confirmed working with multi-process mode enabled.

另请参阅

🌐 See also