[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

cpio to ext4 seems much slower than to ext2, ext3 or xfs



Create a 128 MB input file:

  cd /tmp
  dd if=/dev/zero of=input bs=1024k count=128

and then create a cpio file from that to various target filesystems:

  echo input | time cpio --quiet -o -H newc > /path/to/fs/output

I created ext2, ext3, ext4, xfs and tmpfs filesystems and mounted them
(all default options).  All timings on baremetal, quiet machine, with
a hot cache, and then averaged over three runs:

  tmpfs      0.77 s    x 1.0
  ext2       1.12 s    x 1.5
  xfs        1.66 s    x 2.1
  ext3       2.58 s    x 3.4
  ext4       5.59 s    x 7.3    <----

You can see that ext4 seems to do significantly worse than the others.

I looked at the strace of cpio and it does 512 byte writes.  I'm going
to try to fix that so it does larger writes, but I'm not sure if that
matters (shouldn't the kernel combine these writes?)  The reason I'm
concentrating on cpio (instead of cp) is that it was while creating a
cpio format archive that I noticed the ext4 was performing very
poorly.

Rich.

kernel 2.6.31.1-56.fc12.x86_64
cpio-2.10-3.fc12.x86_64

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]