All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4 v3] ext4: Speedup orphan file handling
@ 2021-06-16 10:56 Jan Kara
  2021-06-16 10:56 ` [PATCH 1/4] ext4: Support for checksumming from journal triggers Jan Kara
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Jan Kara @ 2021-06-16 10:56 UTC (permalink / raw)
  To: Ted Tso; +Cc: linux-ext4, Jan Kara

  Hello,

After six years, prompted by recent 0-day reports of performance issues with
orphan list handling [1], I'm sending a third revision of my series to speed up
orphan inode handling in ext4.

Orphan inode handling in ext4 is a bottleneck for workloads which heavily
excercise truncate / unlink of small files as they contend on global
s_orphan_mutex (when you have fast enough storage). This patch set implements
new way of handling orphan inodes - instead of using a linked list, we store
inode numbers of orphaned inodes in a file which is possible to implement in a
more scalable manner than linked list manipulations. See description of patch
3/4 for more details.

The patch set achieves significant gains both for a micro benchmark stressing
orphan inode handling (truncating file byte-by-byte, several threads in
parallel) and for reaim creat_clo workload. I'm happy for any review, thoughts,
ideas about the patches. I have also implemented full support in e2fsprogs
which I'll send separately.

								Honza

[1] https://lore.kernel.org/lkml/20210227120804.GB22871@xsang-OptiPlex-9020/

Changes since v2:
* Updated some comments
* Rebased onto 5.13-rc5
* Change orphan file inode from a fixed inode number to inode number stored
  in the superblock

Changes since v1:
* orphan blocks have now magic numbers
* split out orphan handling to a separate source file
* some smaller updates according to review

^ permalink raw reply	[flat|nested] 19+ messages in thread
* [PATCH 0/3 v2] ext4: Speedup orphan file handling
@ 2015-05-22 11:21 Jan Kara
  2015-05-22 11:21 ` [PATCH 3/4] ext4: Speedup ext4 orphan inode handling Jan Kara
  0 siblings, 1 reply; 19+ messages in thread
From: Jan Kara @ 2015-05-22 11:21 UTC (permalink / raw)
  To: linux-ext4; +Cc: Jan Kara

  Hello,

This is the second version of my patches to speed up orphan inode handling
in ext4.

Orphan inode handling in ext4 is a bottleneck for workloads which heavily
excercise truncate / unlink of small files as they contend on global
s_orphan_mutex (when you have fast enough storage). This patch set implements
new way of handling orphan inodes - instead of using a linked list, we store
inode numbers of orphaned inodes in a file which is possible to implement in a
more scalable manner than linked list manipulations. See description of patch
2/3 for more details.

The patch set achieves significant gains both for a micro benchmark stressing
orphan inode handling (truncating file byte-by-byte, several threads in
parallel) and for reaim new_fserver workload. As a highlight, microbenchmark
runtime for 128 threads is reduced from original 160 s down to 71 s, which
is also the time it takes the benchmark to run when orphan inode handling
is completely disabled. For full numbers you can check commit logs of
patches 2/3 and 3/3. You can also check my presentation from Vault at
http://events.linuxfoundation.org/sites/events/files/slides/ext4-scaling.pdf
for graphs from tests.

I'm happy for any review, thoughts, ideas about the patches.

The kernel part of the feature is complete, I have also implemented full
support in e2fsprogs. That still needs some debugging (especially the e2fsck
part) but support in mke2fs or tune2fs is fine. I'll post these as a separate
patch so that people can try this out.

For now I'm using inode 9 for orphan file. I know that is reserved as
EXT2_EXCLUDE_INO but at least for the sake of testing that should be fine.

								Honza

Changes since v1:
* orphan blocks have now magic numbers
* split out orphan handling to a separate source file
* some smaller updates according to review

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-07-08 18:30 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 10:56 [PATCH 0/4 v3] ext4: Speedup orphan file handling Jan Kara
2021-06-16 10:56 ` [PATCH 1/4] ext4: Support for checksumming from journal triggers Jan Kara
2021-06-16 19:56   ` Andreas Dilger
2021-06-17  8:24     ` Jan Kara
2021-06-16 10:56 ` [PATCH 2/4] ext4: Move orphan inode handling into a separate file Jan Kara
2021-06-17  3:24   ` Andreas Dilger
2021-06-17  6:56   ` kernel test robot
2021-06-17  6:56     ` kernel test robot
2021-06-17 12:40   ` kernel test robot
2021-06-17 12:40     ` kernel test robot
2021-06-16 10:56 ` [PATCH 3/4] ext4: Speedup ext4 orphan inode handling Jan Kara
2021-06-17  7:44   ` Andreas Dilger
2021-06-17  8:22     ` Jan Kara
2021-06-30 13:25   ` Lukas Czerner
2021-06-30 15:54   ` Darrick J. Wong
2021-06-16 10:56 ` [PATCH 4/4] ext4: Improve scalability of ext4 orphan file handling Jan Kara
2021-06-30 13:46   ` Lukas Czerner
2021-07-08 18:30     ` Jan Kara
  -- strict thread matches above, loose matches on Subject: below --
2015-05-22 11:21 [PATCH 0/3 v2] ext4: Speedup " Jan Kara
2015-05-22 11:21 ` [PATCH 3/4] ext4: Speedup ext4 orphan inode handling Jan Kara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.