Skip to content

Commit ab2e332

Browse files
CookieComputingmeta-codesync[bot]
authored andcommitted
[antlir] Add mkfs.ext4 options to improve build speed
Summary: Playing around with options that should theoretically improve the build creation time for CVM builds. This is on the critical path and I want to make sure that these options are applied, but also safely applied. I'm going to make sure that CVM builds are triggered on the `ext4` packager, since we are the primary and only customer for this anyways. Test Plan: Wait for CVM cogwheel tests to all go green. Then, in a few days, check the build graphs to see if we notice an improvement in build times. Reviewed By: vmagro Differential Revision: D86312712 fbshipit-source-id: 3583715f5dfd17191edb34bc0a080a5a6683e71e
1 parent 3df33ce commit ab2e332

File tree

1 file changed

+5
-0
lines changed
  • antlir/antlir2/antlir2_packager/src

1 file changed

+5
-0
lines changed

antlir/antlir2/antlir2_packager/src/ext4.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ impl PackageFormat for Ext4 {
5858
}
5959
cmd.arg("-d").arg("/__antlir2__/root");
6060
cmd.arg(MAPPED_OUTPUT);
61+
cmd.arg("-O");
62+
// Features derived from https://linux.die.net/man/8/mkfs.ext4
63+
cmd.arg("dir_index,extent,large_file,sparse_super,uninit_bg");
64+
cmd.arg("-E");
65+
cmd.arg("discard,lazy_itable_init=1,lazy_journal_init=1");
6166
if let Some(size_mb) = self.size_mb {
6267
cmd.arg(format!("{}M", size_mb));
6368
run_cmd(&mut cmd).context("failed to build ext4 archive")?;

0 commit comments

Comments
 (0)