← Documents Documentation/ABI/testing/sysfs-fs-ext4 GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

Ext4 filesystem sysfs ABI

Ext4 multiblock allocation, inode readahead, delayed allocation, write counters, extent zeroout와 journal-thread visibility를 설명합니다.

Source pathDocumentation/ABI/testing/sysfs-fs-ext4
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

Multiblock and inode allocation

sysfs-fs-ext4:1-58

Allocator scan bounds, buddy-cache threshold, small-file packing, group preallocation과 inode-table readahead를 조정합니다.

Delayed allocation and write accounting

sysfs-fs-ext4:59-82

아직 location이 없는 dirty blocks와 filesystem lifetime·current mount 기준 write kilobytes를 read-only counters로 확인합니다.

Debug goals, writeback and zeroout

sysfs-fs-ext4:83-112

Debug inode goal과 per-inode writeback batch, extent zeroout threshold는 placement와 random-write latency에 직접 영향을 줍니다.

Journal task visibility

sysfs-fs-ext4:113-118

Current PID namespace에서 journal thread가 보이면 PID를, 도달할 수 없으면 0을 반환합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 What: /sys/fs/ext4/<disk>/mb_stats
2 Date: March 2008
3 Contact: "Theodore Ts'o" <[email protected]>
4 Description:
5 Controls whether the multiblock allocator should
6 collect statistics, which are shown during the unmount.
7 1 means to collect statistics, 0 means not to collect
8 statistics
9
10 What: /sys/fs/ext4/<disk>/mb_group_prealloc
11 Date: March 2008
12 Contact: "Theodore Ts'o" <[email protected]>
13 Description:
14 The multiblock allocator will round up allocation
15 requests to a multiple of this tuning parameter if the
16 stripe size is not set in the ext4 superblock
17
18 What: /sys/fs/ext4/<disk>/mb_max_to_scan
19 Date: March 2008
20 Contact: "Theodore Ts'o" <[email protected]>
21 Description:
22 The maximum number of extents the multiblock allocator
23 will search to find the best extent
24
25 What: /sys/fs/ext4/<disk>/mb_min_to_scan
26 Date: March 2008
27 Contact: "Theodore Ts'o" <[email protected]>
28 Description:
29 The minimum number of extents the multiblock allocator
30 will search to find the best extent
31
32 What: /sys/fs/ext4/<disk>/mb_order2_req
33 Date: March 2008
34 Contact: "Theodore Ts'o" <[email protected]>
35 Description:
36 Tuning parameter which controls the minimum size for
37 requests (as a power of 2) where the buddy cache is
38 used
39
40 What: /sys/fs/ext4/<disk>/mb_stream_req
41 Date: March 2008
42 Contact: "Theodore Ts'o" <[email protected]>
43 Description:
44 Files which have fewer blocks than this tunable
45 parameter will have their blocks allocated out of a
46 block group specific preallocation pool, so that small
47 files are packed closely together. Each large file
48 will have its blocks allocated out of its own unique
49 preallocation pool.
50
51 What: /sys/fs/ext4/<disk>/inode_readahead_blks
52 Date: March 2008
53 Contact: "Theodore Ts'o" <[email protected]>
54 Description:
55 Tuning parameter which controls the maximum number of
56 inode table blocks that ext4's inode table readahead
57 algorithm will pre-read into the buffer cache
58
59 What: /sys/fs/ext4/<disk>/delayed_allocation_blocks
60 Date: March 2008
61 Contact: "Theodore Ts'o" <[email protected]>
62 Description:
63 This file is read-only and shows the number of blocks
64 that are dirty in the page cache, but which do not
65 have their location in the filesystem allocated yet.
66
67 What: /sys/fs/ext4/<disk>/lifetime_write_kbytes
68 Date: March 2008
69 Contact: "Theodore Ts'o" <[email protected]>
70 Description:
71 This file is read-only and shows the number of kilobytes
72 of data that have been written to this filesystem since it was
73 created.
74
75 What: /sys/fs/ext4/<disk>/session_write_kbytes
76 Date: March 2008
77 Contact: "Theodore Ts'o" <[email protected]>
78 Description:
79 This file is read-only and shows the number of
80 kilobytes of data that have been written to this
81 filesystem since it was mounted.
82
83 What: /sys/fs/ext4/<disk>/inode_goal
84 Date: June 2008
85 Contact: "Theodore Ts'o" <[email protected]>
86 Description:
87 Tuning parameter which (if non-zero) controls the goal
88 inode used by the inode allocator in preference to
89 all other allocation heuristics. This is intended for
90 debugging use only, and should be 0 on production
91 systems.
92
93 What: /sys/fs/ext4/<disk>/max_writeback_mb_bump
94 Date: September 2009
95 Contact: "Theodore Ts'o" <[email protected]>
96 Description:
97 The maximum number of megabytes the writeback code will
98 try to write out before move on to another inode.
99
100 What: /sys/fs/ext4/<disk>/extent_max_zeroout_kb
101 Date: August 2012
102 Contact: "Theodore Ts'o" <[email protected]>
103 Description:
104 The maximum number of kilobytes which will be zeroed
105 out in preference to creating a new uninitialized
106 extent when manipulating an inode's extent tree. Note
107 that using a larger value will increase the
108 variability of time necessary to complete a random
109 write operation (since a 4k random write might turn
110 into a much larger write due to the zeroout
111 operation).
112
113 What: /sys/fs/ext4/<disk>/journal_task
114 Date: February 2019
115 Contact: "Theodore Ts'o" <[email protected]>
116 Description:
117 This file is read-only and shows the pid of journal thread in
118 current pid-namespace or 0 if task is unreachable.
119

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Ext4 multiblock allocator statistics

1-9
항목한국어 전문 번역
What/sys/fs/ext4/<disk>/mb_stats
Date2008년 3월
Contact"Theodore Ts'o" <[email protected]>
DescriptionMultiblock allocator가 unmount할 때 표시할 statistics를 수집할지 제어합니다. `1`은 statistics를 수집하고 `0`은 수집하지 않습니다.
AccessRead/write

Ext4 block-group preallocation rounding

10-17
항목한국어 전문 번역
What/sys/fs/ext4/<disk>/mb_group_prealloc
Date2008년 3월
Contact"Theodore Ts'o" <[email protected]>
DescriptionExt4 superblock에 stripe size가 설정되지 않은 경우 multiblock allocator가 allocation requests를 이 tuning parameter의 배수로 올림합니다.
AccessRead/write

Maximum allocator extent scan

18-24
항목한국어 전문 번역
What/sys/fs/ext4/<disk>/mb_max_to_scan
Date2008년 3월
Contact"Theodore Ts'o" <[email protected]>
DescriptionMultiblock allocator가 가장 좋은 extent를 찾기 위해 검색할 extents의 최대 수입니다.
AccessRead/write

Minimum allocator extent scan

25-31
항목한국어 전문 번역
What/sys/fs/ext4/<disk>/mb_min_to_scan
Date2008년 3월
Contact"Theodore Ts'o" <[email protected]>
DescriptionMultiblock allocator가 가장 좋은 extent를 찾기 위해 검색할 extents의 최소 수입니다.
AccessRead/write

Buddy-cache request threshold

32-39
항목한국어 전문 번역
What/sys/fs/ext4/<disk>/mb_order2_req
Date2008년 3월
Contact"Theodore Ts'o" <[email protected]>
DescriptionBuddy cache를 사용하는 allocation request의 최소 크기를 2의 거듭제곱으로 정하는 tuning parameter입니다.
AccessRead/write

Small-file preallocation threshold

40-50
항목한국어 전문 번역
What/sys/fs/ext4/<disk>/mb_stream_req
Date2008년 3월
Contact"Theodore Ts'o" <[email protected]>
DescriptionBlock 수가 이 tunable parameter보다 적은 files는 block-group-specific preallocation pool에서 blocks를 할당받아 small files가 서로 가깝게 배치됩니다. 각 large file은 자신만의 unique preallocation pool에서 blocks를 할당받습니다.
AccessRead/write
Ext4 multiblock allocator controls
AttributeAllocator effect
mb_statsCollect unmount-time statistics when set to 1
mb_group_preallocRound requests when superblock stripe size is unset
mb_min_to_scanMinimum extents searched
mb_max_to_scanMaximum extents searched
mb_order2_reqPower-of-two buddy-cache threshold
mb_stream_reqSmall-file block-count threshold

Statistics, scan bounds, request threshold와 preallocation policy입니다.

Ext4 inode-table readahead

51-58
항목한국어 전문 번역
What/sys/fs/ext4/<disk>/inode_readahead_blks
Date2008년 3월
Contact"Theodore Ts'o" <[email protected]>
DescriptionExt4 inode-table readahead algorithm이 buffer cache로 미리 읽을 inode table blocks의 최대 수를 제어하는 tuning parameter입니다.
AccessRead/write
Ext4 inode-table readahead limit
AttributeUnitTarget
inode_readahead_blksInode-table blocksBuffer cache

Attribute의 단위와 대상입니다.

Ext4 delayed-allocation block count

59-66
항목한국어 전문 번역
What/sys/fs/ext4/<disk>/delayed_allocation_blocks
Date2008년 3월
Contact"Theodore Ts'o" <[email protected]>
DescriptionPage cache에서 dirty 상태지만 filesystem 안의 physical location이 아직 할당되지 않은 blocks의 수를 표시합니다.
AccessRead-only
Ext4 delayed-allocation state
Data becomes dirty in page cacheBlock has no filesystem location yetCount in delayed_allocation_blocksAllocator assigns a physical location later

Counter가 나타내는 write lifecycle 구간입니다.

Ext4 lifetime write counter

67-74
항목한국어 전문 번역
What/sys/fs/ext4/<disk>/lifetime_write_kbytes
Date2008년 3월
Contact"Theodore Ts'o" <[email protected]>
DescriptionFilesystem이 생성된 뒤 지금까지 이 filesystem에 쓴 data의 kilobytes 수를 표시합니다.
AccessRead-only

Ext4 mounted-session write counter

75-82
항목한국어 전문 번역
What/sys/fs/ext4/<disk>/session_write_kbytes
Date2008년 3월
Contact"Theodore Ts'o" <[email protected]>
DescriptionFilesystem을 mount한 뒤 현재 session 동안 이 filesystem에 쓴 data의 kilobytes 수를 표시합니다.
AccessRead-only
Ext4 write counters
AttributeStarts countingUnit
lifetime_write_kbytesFilesystem creationKiB
session_write_kbytesCurrent mountKiB

Filesystem lifetime과 current mount session의 기준점이 다릅니다.

Ext4 debug inode allocation goal

83-92
항목한국어 전문 번역
What/sys/fs/ext4/<disk>/inode_goal
Date2008년 6월
Contact"Theodore Ts'o" <[email protected]>
Description값이 0이 아니면 inode allocator가 다른 모든 allocation heuristics보다 우선해서 사용할 goal inode를 정하는 tuning parameter입니다. Debugging 전용이므로 production systems에서는 `0`이어야 합니다.
AccessRead/write
Ext4 inode_goal policy
ValueAllocator behaviorRecommended use
0Use normal allocation heuristicsProduction
Non-zeroPrefer the specified goal inodeDebugging only

Zero와 non-zero values의 의도된 사용 범위입니다.

Ext4 per-inode writeback limit

93-99
항목한국어 전문 번역
What/sys/fs/ext4/<disk>/max_writeback_mb_bump
Date2009년 9월
Contact"Theodore Ts'o" <[email protected]>
DescriptionWriteback code가 다른 inode로 넘어가기 전에 현재 inode에서 write하려고 시도할 최대 megabytes 수입니다.
AccessRead/write

Ext4 extent-tree zeroout threshold

100-112
항목한국어 전문 번역
What/sys/fs/ext4/<disk>/extent_max_zeroout_kb
Date2012년 8월
Contact"Theodore Ts'o" <[email protected]>
DescriptionInode extent tree를 조작할 때 새 uninitialized extent를 만드는 대신 zero-out할 최대 kilobytes 수입니다. 값을 크게 하면 4 KiB random write도 zeroout 때문에 훨씬 큰 write로 바뀔 수 있어 random write 완료 시간의 variability가 증가합니다.
AccessRead/write
Ext4 writeback and zeroout limits
AttributeBoundTradeoff
max_writeback_mb_bumpMiB before moving to another inodePer-inode writeback batching
extent_max_zeroout_kbKiB zeroed instead of new uninitialized extentLarger values increase random-write latency variability

Throughput batching과 random-write latency variability의 tuning 지점입니다.

Ext4 journal thread PID

113-118
항목한국어 전문 번역
What/sys/fs/ext4/<disk>/journal_task
Date2019년 2월
Contact"Theodore Ts'o" <[email protected]>
DescriptionCurrent PID namespace에서 journal thread의 PID를 표시합니다. 해당 task에 도달할 수 없으면 `0`을 표시합니다.
AccessRead-only
Ext4 journal_task values
ValueMeaning
Positive PIDJournal thread visible in current PID namespace
0Journal task is unreachable

PID namespace visibility에 따른 반환값입니다.