blob: d7b6fb4b2a10de00754c4c40b38996964d58facc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
[ Extents were not enabled]
$ sudo ./test-file-zero-alloc-speed /mnt/ext4
posix-fallocate run time:
seconds:microseconds: 1235977123:542643
seconds:microseconds: 1235977137:673307
(approx 14s)
mmap run time:
seconds:microseconds: 1235977137:673494
seconds:microseconds: 1235977154:435404
(approx 17s)
4096-sized chunk run time:
seconds:microseconds: 1235977155:826068
seconds:microseconds: 1235977173:98883
(approx 18s)
8192-sized chunk run time:
seconds:microseconds: 1235977174:91821
seconds:microseconds: 1235977190:862035
(approx 16s)
$ sudo filefrag /mnt/ext4/*
/mnt/ext4/file-chunk4: 292 extents found, perfection would be 9 extents
/mnt/ext4/file-chunk8: 282 extents found, perfection would be 9 extents
/mnt/ext4/file-mmap: 295 extents found, perfection would be 9 extents
/mnt/ext4/file-pf: 279 extents found, perfection would be 9 extents
-------------------------------------------------------------------
[After enabling extents]
$ sudo ./test-file-zero-alloc-speed /mnt/ext4
posix-fallocate run time:
seconds:microseconds: 1235979104:790662
seconds:microseconds: 1235979104:848372
(approx 0s)
mmap run time:
seconds:microseconds: 1235979105:33407
seconds:microseconds: 1235979118:535711
(approx 13s)
4096-sized chunk run time:
seconds:microseconds: 1235979120:297221
seconds:microseconds: 1235979135:520910
(approx 15s)
8192-sized chunk run time:
seconds:microseconds: 1235979135:639915
seconds:microseconds: 1235979153:502270
(approx 18s)
$ sudo filefrag /mnt/ext4/*
File is stored in extents format
/mnt/ext4/file-chunk4: 29 extents found
File is stored in extents format
/mnt/ext4/file-chunk8: 20 extents found
File is stored in extents format
/mnt/ext4/file-mmap: 38 extents found
File is stored in extents format
/mnt/ext4/file-pf: 1 extent found
-------------------------------------------------------------------
$ sudo ./test-file-zero-alloc-speed /mnt/xfs/
posix-fallocate run time:
seconds:microseconds: 1235977241:411119
seconds:microseconds: 1235977241:469611
(approx 0s)
mmap run time:
seconds:microseconds: 1235977241:469981
seconds:microseconds: 1235977255:687663
(approx 14s)
4096-sized chunk run time:
seconds:microseconds: 1235977256:603450
seconds:microseconds: 1235977274:549963
(approx 18s)
8192-sized chunk run time:
seconds:microseconds: 1235977274:649325
seconds:microseconds: 1235977293:365759
(approx 19s)
$ sudo filefrag /mnt/xfs/*
/mnt/xfs/file-chunk4: 3 extents found
/mnt/xfs/file-chunk8: 4 extents found
/mnt/xfs/file-mmap: 2 extents found
/mnt/xfs/file-pf: 1 extent found
-------------------------------------------------------------------
$ sudo ./test-file-zero-alloc-speed /mnt/ext3/
posix-fallocate run time:
seconds:microseconds: 1235977308:469496
seconds:microseconds: 1235977326:366806
(approx 18s)
mmap run time:
seconds:microseconds: 1235977326:367325
seconds:microseconds: 1235977346:260276
(approx 20s)
4096-sized chunk run time:
seconds:microseconds: 1235977347:161513
seconds:microseconds: 1235977369:771397
(approx 22s)
8192-sized chunk run time:
seconds:microseconds: 1235977369:865221
seconds:microseconds: 1235977393:23403
(approx 24s)
$ sudo filefrag /mnt/ext3/*
/mnt/ext3/file-chunk4: 38 extents found, perfection would be 9 extents
/mnt/ext3/file-chunk8: 9 extents found
/mnt/ext3/file-mmap: 44 extents found, perfection would be 9 extents
/mnt/ext3/file-pf: 9 extents found
-------------------------------------------------------------------
$ sudo ./test-file-zero-alloc-speed /mnt/btrfs/
posix-fallocate run time:
seconds:microseconds: 1235977416:649716
seconds:microseconds: 1235977416:650009
(approx 0s)
mmap run time:
seconds:microseconds: 1235977416:650118
seconds:microseconds: 1235977434:626664
(approx 18s)
4096-sized chunk run time:
seconds:microseconds: 1235977435:634000
seconds:microseconds: 1235977452:208026
(approx 17s)
8192-sized chunk run time:
seconds:microseconds: 1235977452:294473
seconds:microseconds: 1235977471:143672
(approx 19s)
$ sudo /mnt/btrfs/*
FIBMAP: Invalid argument
...
-------------------------------------------------------------------
-------------------------------------------------------------------
|