linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* disk throughput
@ 2001-11-05  2:13 Andrew Morton
  2001-11-05  3:20 ` Mohammad A. Haque
                   ` (3 more replies)
  0 siblings, 4 replies; 79+ messages in thread
From: Andrew Morton @ 2001-11-05  2:13 UTC (permalink / raw)
  To: lkml, ext2-devel

I've been taking a look at one particular workload - the creation
and use of many smallish files.  ie: the things we do every day
with kernel trees.

There are a number of things which cause linux to perform quite badly
with this workload.  I've fixed most of them and the speedups are quite
dramatic.  The changes include:

- reorganise the sync_inode() paths so we don't do
  read-a-block,write-a-block,read-a-block, ...

- asynchronous preread of an ext2 inode's block when we
  create the inode, so:

  a) the reads will cluster into larger requests and
  b) during inode writeout we don't keep stalling on
     reads, preventing write clustering.

- Move ext2's bitmap loading code outside lock_super(),
  so other threads can still get in and write to the
  fs while the reader sleeps, thus increasing write
  request merging.  This benefits multithreaded workloads
  (ie: dbench) and needs more thought.

The above changes are basically a search-and-destroy mission against
the things which are preventing effective writeout request merging.
Once they're in place we also need:

- Alter the request queue size and elvtune settings


The time to create 100,000 4k files (10 per directory) has fallen
from 3:09 (3min 9second) down to 0:30.  A six-fold speedup.


All well and good, and still a WIP.  But by far the most dramatic
speedups come from disabling ext2's policy of placing new directories
in a different blockgroup from the parent:

--- linux-2.4.14-pre8/fs/ext2/ialloc.c	Tue Oct  9 21:31:40 2001
+++ linux-akpm/fs/ext2/ialloc.c	Sun Nov  4 17:40:43 2001
@@ -286,7 +286,7 @@ struct inode * ext2_new_inode (const str
 repeat:
 	gdp = NULL; i=0;
 	
-	if (S_ISDIR(mode)) {
+	if (0 && S_ISDIR(mode)) {
 		avefreei = le32_to_cpu(es->s_free_inodes_count) /
 			sb->u.ext2_sb.s_groups_count;
 /* I am not yet convinced that this next bit is necessary.


Numbers.  The machine has 768 megs; the disk is IDE with a two meg cache.
The workload consists of untarring, tarring, diffing and removing kernel
trees. This filesystem is 21 gigs, and has 176 block groups.


After each test which wrote data a `sync' was performed, and was included
in the timing under the assumption that all the data will be written back
by kupdate in a few seconds, and running `sync' allows measurement of the
cost of that.

The filesystem was unmounted between each test - all tests are with
cold caches.

                                stock   patched 
untar one kernel tree, sync:    0:31     0:14
diff two trees:                 3:04     1:12
tar kernel tree to /dev/null:   0:15     0:03
remove 2 kernel trees, sync:    0:30     0:10

A significant thing here is the improvement in read performance as well
as writes.  All of the other speedup changes only affect writes.

We are paying an extremely heavy price for placing directories in
different block groups from their parent.  Why do we do this, and
is it worth the cost?

-

^ permalink raw reply	[flat|nested] 79+ messages in thread
* RE: [Ext2-devel] disk throughput
@ 2001-11-12  6:04 Yan, Noah
  0 siblings, 0 replies; 79+ messages in thread
From: Yan, Noah @ 2001-11-12  6:04 UTC (permalink / raw)
  Cc: linux-kernel

All,

I am new to kernel porting. Just want to know where to find those materials on the programming of AT&T Macro assemble language. I find there are some difference with x86 Macro assemble language programming, such as what is .data, .text, .global, ENTRY, etc.

Best Regards,
Noah Yan

SC/Automation Group 
Shanghai Site Manufacturing Computing/IT
Intel Technology (China) Ltd.

IDD: (86 21) 50481818 - 31579
Fax: (86 21) 50481212
Email: noah.yan@intel.com

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

end of thread, other threads:[~2001-11-12  6:03 UTC | newest]

Thread overview: 79+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-05  2:13 disk throughput Andrew Morton
2001-11-05  3:20 ` Mohammad A. Haque
2001-11-05  3:31   ` Andrew Morton
2001-11-05  3:32 ` [Ext2-devel] " Mike Fedyk
2001-11-05  3:45   ` Andrew Morton
2001-11-05  4:39     ` Mike Fedyk
2001-11-05  7:06     ` Jens Axboe
2001-11-05  7:14       ` Andrew Morton
2001-11-05  7:26         ` Jens Axboe
2001-11-05  7:14       ` Mike Fedyk
2001-11-05  7:18         ` Jens Axboe
2001-11-05  7:18       ` Jens Axboe
2001-11-05  9:14         ` Mike Fedyk
2001-11-05  9:20           ` Jens Axboe
2001-11-05  5:54   ` Albert D. Cahalan
2001-11-05  8:04     ` Andrew Morton
2001-11-05 12:28       ` Matthias Andree
2001-11-05 14:23       ` Alexander Viro
2001-11-05 22:22         ` Andrew Morton
2001-11-05 22:41           ` Andreas Dilger
2001-11-05 22:53             ` Andrew Morton
2001-11-08 15:28               ` Constantin Loizides
2001-11-05 23:14             ` Dan Hollis
2001-11-06 10:52           ` Daniel Phillips
2001-11-06 16:17           ` Jeremy Fitzhardinge
2001-11-08 15:24             ` Constantin Loizides
2001-11-08 16:46             ` Jeremy Fitzhardinge
2001-11-09  6:08               ` Andrew Morton
2001-11-09  8:49               ` Jeremy Fitzhardinge
2001-11-06 21:45           ` Stephen Tweedie
2001-11-05 20:16       ` Andreas Dilger
2001-11-05 20:28         ` m
2001-11-05 21:39           ` Andrew Morton
2001-11-05 22:59             ` Linus Torvalds
2001-11-05 23:36               ` Alexander Viro
2001-11-05 23:50                 ` Linus Torvalds
2001-11-06  0:03                   ` Linus Torvalds
2001-11-06  1:33                     ` Alexander Viro
2001-11-06  2:10                       ` Linus Torvalds
2001-11-06  3:02                         ` Alexander Viro
2001-11-06  8:39                           ` Alan Cox
2001-11-06  8:37                             ` Alexander Viro
2001-11-06  8:48                               ` Andrew Morton
2001-11-06  3:49                         ` Alexander Viro
2001-11-06  4:01                           ` Linus Torvalds
2001-11-06  4:21                             ` Alexander Viro
2001-11-06  5:01                               ` Linus Torvalds
2001-11-06  5:31                                 ` Andrew Morton
2001-11-06  5:48                                   ` Linus Torvalds
2001-11-06  7:34                                     ` Mike Castle
2001-11-06  7:10                                   ` Kai Henningsen
2001-11-09 22:35                       ` Riley Williams
2001-11-06  1:28                   ` Alexander Viro
2001-11-06  9:16                     ` Wojtek Pilorz
2001-11-06  9:58                       ` Alexander Viro
2001-11-08 12:51                   ` Pavel Machek
2001-11-06 21:48           ` Stephen Tweedie
2001-11-06 23:17             ` ext2/ialloc.c cleanup Alexander Viro
2001-11-07 19:34               ` [Ext2-devel] " Andreas Dilger
2001-11-07 20:02                 ` Alexander Viro
2001-11-08  2:06                   ` Andrew Morton
2001-11-08 20:45                     ` Andrew Morton
2001-11-08 22:16                       ` Alexander Viro
2001-11-08 22:43                         ` Andreas Dilger
2001-11-08 23:08                           ` Alexander Viro
2001-11-09  6:15                             ` Andrew Morton
2001-11-09  6:56                               ` Andreas Dilger
2001-11-09  7:09                                 ` Andrew Morton
2001-11-09  7:12                                 ` Alexander Viro
2001-11-09  7:18                                   ` Andrew Morton
2001-11-05  9:45     ` [Ext2-devel] disk throughput Alex Bligh - linux-kernel
2001-11-05  9:58       ` Alex Bligh - linux-kernel
2001-11-05  8:47 ` Jan Kara
2001-11-05  8:50   ` [Ext2-devel] " Mike Fedyk
2001-11-05  9:01     ` Jan Kara
2001-11-05 12:23 ` Matthias Andree
2001-11-05 22:39   ` Andrew Morton
2001-11-05 23:41     ` Matthias Andree
2001-11-12  6:04 [Ext2-devel] " Yan, Noah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).