summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJin Qian <jinqian@google.com>2017-04-14 17:55:45 -0700
committerJin Qian <jinqian@google.com>2017-04-14 18:05:42 -0700
commitcdc4f9bed9996a9ded39301b6b4a84e6b46220b2 (patch)
treed3805c2d32842756db0742bf13f4b83fa25326a5
parent512904129a074a056150e707dec638ca8e47f4e2 (diff)
downloadextras-cdc4f9bed9996a9ded39301b6b4a84e6b46220b2.tar.gz
ext4_utils: update default conf from e2fsprogs
Build server machines are using a conf file optimized for google data center. We should use the default version from upstream e2fsprogs. Keep reserved_ratio at 1% to get more free space. Bug: 37361511 Change-Id: I2638df72cfd3b9404981ef227651d38025a8053c
-rw-r--r--ext4_utils/mke2fs.conf209
1 files changed, 41 insertions, 168 deletions
diff --git a/ext4_utils/mke2fs.conf b/ext4_utils/mke2fs.conf
index 3d18c00e..b6a05c17 100644
--- a/ext4_utils/mke2fs.conf
+++ b/ext4_utils/mke2fs.conf
@@ -1,180 +1,53 @@
-# mkfs defaults.
-#
-# In conjunction with these defaults mkfs needs to be issued with the
-# following arguments:
-#
-# mkfs -m 1 -i 20480 -t <fs> <device>
-#
-# -m reserved-blocks-percentage
-#
-# Specify the percentage of the filesystem blocks reserved for the
-# super-user. This avoids fragmentation, and allows root-owned daemons,
-# such as syslogd(8), to continue to function correctly after non-privileged
-# processes are prevented from writing to the filesystem. The default
-# percentage is 5%.
-#
-# Conclusion: Set to 1%
-#
-#
-# -i bytes-per-inode
-# Specify the bytes/inode ratio. mke2fs creates an inode for every
-# bytes-per-inode bytes of space on the disk. The larger the bytes-per-inode
-# ratio, the fewer inodes will be created. This value generally shouldn't
-# be smaller than the blocksize of the filesystem, since in that case
-# more inodes would be made than can ever be used. Be warned that it
-# is not possible to expand the number of inodes on a filesystem after it
-# is created, so be careful deciding the correct value for this parameter.
-#
-# Conclusion: Set to 20480
-
-
-#
-# mke2fs.conf defaults
-#
-
[defaults]
+ base_features = sparse_super,large_file,filetype,resize_inode,dir_index,ext_attr
+ default_mntopts = acl,user_xattr
+ enable_periodic_fsck = 0
blocksize = 4096
-
- # All inodes in production are 128 bytes. This conserves memory and
- # maintains compatibility between ext2 and ext4
- inode_size = 128
- # Default inode_ratio (-i) in production is 20480
- inode_ratio = 20480
- # Default reserved_ratio (-m) in production is 1%
+ inode_size = 256
+ inode_ratio = 16384
reserved_ratio = 1.0
- lazy_itable_init = false
[fs_types]
- # Features for ext2 & ext4
- #
- # ext_attrs - Extended Attributes. This is the ability to associate
- # metadata not interpreted by the file system with
- # a file. This is not stored in the inode when the
- # inodes are 128 bytes. So we would have to store them in
- # another allocated block.
- #
- # Conclusion: DISABLE We don't need these attributes
- # today and they will only create a performance hit.
- # So we disable them. Note: If we ever do enable this
- # feature make sure the kernel config is enabled also.
- #
- # resize_inode - Reserve space so the block group descriptor
- # table may grow in the future. Useful for
- # online resizing using resize2fs. By default
- # mke2fs will attempt to reserve enough space so
- # that the filesystem may grow to 1024 times its
- # initial size. This can be changed using the
- # resize extended option.
- # Conclusion: DISABLE This is a waste of space
- # for production.
- #
- # dir_index - Enabling the HTree (invented by Dan Phillips) to make
- # directory lookups faster.
- #
- # Conclusion: EXT2 DISABLED (no testing yet)
- # EXT4 ENABLED (by default)
- #
- # large_file/huge_file - Larger than 2TB support
- # Conclusion: EXT2 DISABLED No need in prod for files this big.
- # Conclusion: EXT4 ENABLED Since we get this for free
- #
- # filetype - FileType. Records the type of file (Regular, directory,
- # character, block, fifo, socket, link) in the directory
- # structure.
- # Conclusion: EXT2 ENABLED, EXT4 PENDING
- #
- # sparse_super - Reduces the number of redundant super blocks.
- # Conclusion: ENABLE
-
- ext2 = {
- features = ext_attr,^resize_inode,^dir_index,^large_file,filetype,sparse_super
- hash_alg = tea
+ ext3 = {
+ features = has_journal
}
-
- # Features for ext4 only
- # has_journal - Enable the ext4 journal. Since we don't have enough
- # testing and are not sure if we need it yet. We are
- # not enabling the journal.
- # Conclusion: EXT4 DISABLED
- #
- # extents - Using extents instead of indirect blocks to manage metadata.
- # Conclusion: EXT4 ENABLED This is a big performance win.
- #
- # flex_bg - This feature relaxes check restrictions on where each
- # block groups meta data is located within the storage
- # media. This allows for the allocation of bitmaps or
- # inode tables outside the block group boundaries in cases
- # where bad blocks forces us to look for new blocks which
- # the owning block group can not satisfy. This will also
- # allow for new meta-data allocation schemes to improve
- # performance and scalability.
- # Conclusion: ENABLE It allows us to make performance
- # gaining modifications for ext4.
- #
- # uninit_bg - Unitialized Block Groups. In pass1 of e2fsck, every
- # inode table in the filesystem is scanned and checked,
- # regardless of whether it is in use. This is this the
- # most time consuming part of the filesystem check.
- # The uninitialized block group feature can greatly reduce
- # e2fsck time by eliminating checking of uninitialized inodes.
- #
- # With this feature, there is a a high water mark of
- # used inodes for each block group. Block and inode bitmaps
- # can be uninitialized on disk via a flag in the group
- # descriptor to avoid reading or scanning them at e2fsck time.
- # A checksum of each group descriptor is used to ensure that
- # corruption in the group descriptor's bit flags does not
- # cause incorrect operation.
- #
- # Conclusion: ENABLE While the speed up is dependent on
- # fs age it may be variable but we should not drop the fsck
- # perf on the floor.
- #
- # dir_nlink - Allows for more than 64000 files in a directory.
- # Conclusion: ENABLED This is on by default for ext4.
- # This is useful too.
-
ext4 = {
- features = ext_attr,^resize_inode,^has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,sparse_super
- hash_alg = half_md4
+ features = has_journal,extent,huge_file,flex_bg,64bit,dir_nlink,extra_isize
+ inode_size = 256
}
- hugefiles = {
- features = extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,^resize_inode,sparse_super2
- hash_alg = half_md4
- reserved_ratio = 0.0
- num_backup_sb = 0
- packed_meta_blocks = 1
- make_hugefiles = 1
- inode_ratio = 4194304
- hugefiles_dir = /storage_d/pre-block
- hugefiles_name = data-
- hugefiles_digits = 5
- hugefiles_size = 1028M
- hugefiles_slack = 2G
- num_hugefiles = 0
- zero_hugefiles = false
- flex_bg_size = 262144
+ ext4dev = {
+ features = has_journal,extent,huge_file,flex_bg,inline_data,64bit,dir_nlink,extra_isize
+ inode_size = 256
+ options = test_fs=1
}
- hugefile = {
- features = extent,huge_file,bigalloc,flex_bg,uninit_bg,dir_nlink,extra_isize,^resize_inode,sparse_super2
- cluster_size = 32768
- hash_alg = half_md4
- reserved_ratio = 0.0
- num_backup_sb = 0
- packed_meta_blocks = 1
- make_hugefiles = 1
+ small = {
+ blocksize = 1024
+ inode_size = 128
+ inode_ratio = 4096
+ }
+ floppy = {
+ blocksize = 1024
+ inode_size = 128
+ inode_ratio = 8192
+ }
+ big = {
+ inode_ratio = 32768
+ }
+ huge = {
+ inode_ratio = 65536
+ }
+ news = {
+ inode_ratio = 4096
+ }
+ largefile = {
+ inode_ratio = 1048576
+ blocksize = -1
+ }
+ largefile4 = {
inode_ratio = 4194304
- hugefiles_dir = /storage_d
- hugefiles_name = huge-data
- hugefiles_digits = 0
- hugefiles_size = 0
- hugefiles_align = 256M
- hugefiles_align_disk = true
- num_hugefiles = 1
- zero_hugefiles = false
+ blocksize = -1
}
- small = {
- blocksize = 1024
- inode_size = 128
- inode_ratio = 4096
+ hurd = {
+ blocksize = 4096
+ inode_size = 128
}