🎥 Make videos programmatically with React
multiple cores on linux
Jonny Burger9adda68bddd9
diff --git a/packages/docs/docs/miscellaneous/linux-single-process.md b/packages/docs/docs/miscellaneous/linux-single-process.mdnew file mode 100644index 0000000000..0ef27dd65d--- /dev/null+++ b/packages/docs/docs/miscellaneous/linux-single-process.md@@ -0,0 +1,37 @@+---+sidebar_label: Multiple cores on Linux+title: Multiple cores on Linux+crumb: "Server-side rendering"+---++By default, Remotion starts the Chromium browser on Linux with the `--single-process` flag. This is because:++- The sandboxing feature of Chromium is not supported on all Linux distributions+- Older versions of Chromium used to crash when starting headlessly with multiple processes+- If some desktop libraries are missing, Chromium could crash on startup on some Distros.++This can lead to degraded rendering performance, especially when trying to leverage high-core CPUs and high Remotion concurrency.++## Enable multi-process rendering on Linux++_available from v4.0.42_++For now, this option is opt-in. To enable multi-process mode for Chromium during rendering on Linux:++- **renderMedia()** / **openBrowser()** / **renderFrames()**: Use the [`chromiumOptions.enableMultiProcessOnLinux`](/docs/renderer/render-media#enablemultiprocessonlinux) option.+- **CLI**: Use the [`--enable-multi-process-on-linux`](/docs/cli/render#--enable-multiprocess-on-linux) flag.+- **Config file**: Use the [`Config.setChromiumMultiProcessInLinux()`](/docs/config#setchromiummultiprocessonlinux) option.+- **Remotion Studio**: Check the toggle in the advanced settings.+- **Cloud Run**: From v4.0.42, this option is automatically enabled.+- **Lambda**: This option is disabled with no option to enable it because on Amazon Linux, Chrome will crash if the `--single-process` flag is not used. We recommend using more Lambdas instead of more concurrency per Lambda.++## Should I enable multi-process mode?++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.++Our recommended [Docker](/docs/docker) image is confirmed working with multi-process mode enabled.++## See also++- [Chromium flags](/docs/chromium-flags)+- [Dockerizing a Remotion app](/docs/docker)diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.jsindex ac8d0621c7..2f98b22f9f 100644--- a/packages/docs/sidebars.js+++ b/packages/docs/sidebars.js@@ -662,6 +662,7 @@ module.exports = {"miscellaneous/vercel-functions","miscellaneous/render-on-edge","miscellaneous/thorium-browser",+ "miscellaneous/linux-single-process","compare/motion-canvas","gl-options","bun",