Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Very slow performance under UEK with ext3 on virtual disk image

Dude!Jan 13 2017 — edited Jan 29 2017

I'm experimenting with file systems on virtual disk images and see over 10 x times slower performance with ext3 compared to ext2 when using the UEK kernel. The problem however does not exist with the older RHCK kernel, and does also not occur with the UEK kernel when using normal block devices (not virtual).

It's probably not something that would bother many people, if anyone else, but I find it irritating and have no explanation, nor did I find anything on the web. The system is OL 7.3 under VirtualBox, running on a Mac-Mini with SSD and OSX Mavericks.

Last Updates:

The problem does not occur  with ext4 or using oflag=direct

#  dd if=/dev/zero of=/ext3/test bs=64k count=16k conv=fdatasync

1073741824 bytes (1.1 GB) copied, 27.0939 s, 39.6 MB/s

#  dd if=/dev/zero of=/ext3/test bs=64k count=16k conv=fdatasync oflag=direct

1073741824 bytes (1.1 GB) copied, 3.77267 s, 285 MB/s

#  dd if=/dev/zero of=/ext4test bs=64k count=16k conv=fdatasync

1073741824 bytes (1.1 GB) copied, 2.17404 s, 494 MB/s

#  dd if=/dev/zero of=/ext4/test bs=64k count=16k conv=fdatasync oflag=direct

1073741824 bytes (1.1 GB) copied, 4.786 s, 224 MB/s

Solution:

@"Avi Miller-Oracle" 's suggestion to disable ext3 journaling was spot on!

[root@ol1 ~]# uname -r

4.1.12-61.1.25.el7uek.x86_64

umount /home3

[root@ol1 ~]# tune2fs -O^has_journal /home/vdisk03

tune2fs 1.42.9 (28-Dec-2013)

[root@ol1 ~]# mount -o loop /home/vdisk03 /home3

[root@ol1 ~]# dd if=/dev/zero of=/home3/test bs=64k count=16k conv=fdatasync

1073741824 bytes (1.1 GB) copied, 2.26801 s, 473 MB/s

Let's turn it off again to see if we can reproduce the performance drop.

[root@ol1 ~]# umount /home3

[root@ol1 ~]# tune2fs -j /home/vdisk03

tune2fs 1.42.9 (28-Dec-2013)

Creating journal inode: done

[root@ol1 ~]# mount -o loop /home/vdisk03 /home3

[root@ol1 ~]# dd if=/dev/zero of=/home3/test bs=64k count=16k conv=fdatasync

1073741824 bytes (1.1 GB) copied, 28.9155 s, 37.1 MB/s

Following how to reproduce the problem and results:

Creating virtual disks on a home volume (XFS) and initializing /home2 (ext2) and /home3 (ext3)

umount /home

mkfs.xfs -f /dev/mapper/ol-home

mount /dev/mapper/ol-home /home

dd if=/dev/zero of=/home/vdisk02 bs=1M count=14000

14680064000 bytes (15 GB) copied, 19.8297 s, 740 MB/s

dd if=/dev/zero of=/home/vdisk03 bs=1M count=14000

14680064000 bytes (15 GB) copied, 20.0603 s, 732 MB/s

mkfs.ext2 /home/vdisk02

mkfs.ext3 /home/vdisk03

mkdir /home2

mkdir /home3

mount -o loop /home/vdisk02 /home2

mount -o loop /home/vdisk03 /home3

Here are the performance results under different kernels. /home2 is ext2, home3 is ext3.

uname -r

3.10.0-514.el7.x86_64

dd if=/dev/zero of=/home2/test bs=64k count=16k conv=fdatasync

1073741824 bytes (1.1 GB) copied, 2.40242 s, 447 MB/s

dd if=/dev/zero of=/home3/test bs=64k count=16k conv=fdatasync

1073741824 bytes (1.1 GB) copied, 3.19537 s, 336 MB/s

mount | grep home

/dev/mapper/ol-home on /home type xfs (rw,relatime,seclabel,attr2,inode64,noquota)

/home/vdisk02 on /home2 type ext2 (rw,relatime,seclabel)

/home/vdisk03 on /home3 type ext3 (rw,relatime,seclabel,data=ordered)

4.1.12-61.1.18.el7uek.x86_64

dd if=/dev/zero of=/home2/test bs=64k count=16k conv=fdatasync

1073741824 bytes (1.1 GB) copied, 2.37319 s, 452 MB/s

dd if=/dev/zero of=/home3/test bs=64k count=16k conv=fdatasync

1073741824 bytes (1.1 GB) copied, 31.3929 s, 34.2 MB/s

mount | grep home

/dev/mapper/ol-home on /home type xfs (rw,relatime,seclabel,attr2,inode64,noquota)

/home/vdisk02 on /home2 type ext2 (rw,relatime,seclabel,errors=continue,user_xattr,acl)

/home/vdisk03 on /home3 type ext3 (rw,relatime,seclabel,errors=continue,user_xattr,acl,barrier=1,data=ordered)

mount -o remount,loop,barrier=0 /home/vdisk03

mount  | grep home3

/home/vdisk03 on /home3 type ext3 (rw,relatime,seclabel,errors=continue,user_xattr,acl,barrier=0,data=ordered)

dd if=/dev/zero of=/home3/test bs=64k count=16k conv=fdatasync

1073741824 bytes (1.1 GB) copied, 19.4577 s, 55.2 MB/s

uname -r

4.1.12-61.1.25.el7uek.x86_64

dd if=/dev/zero of=/home3/test bs=64k count=16k conv=fdatasync

1073741824 bytes (1.1 GB) copied, 19.9201 s, 53.9 MB/s

uname -r

3.8.13-118.16.2.el7uek.x86_64

[root@ol1 ~]# dd if=/dev/zero of=/home3/test bs=64k count=16k conv=fdatasync

1073741824 bytes (1.1 GB) copied, 8.85429 s, 121 MB/s

The following however shows nothing unusual between the UEK and RHCK kernel when testing ext3 performance with a normal block device.

umount /home

mkfs.ext3 /dev/mapper/ol-home

mount /dev/mapper/ol-home /home

uname -r

3.10.0-514.el7.x86_64

dd if=/dev/zero of=/home/test bs=64k count=16k conv=fdatasync

1073741824 bytes (1.1 GB) copied, 2.01367 s, 533 MB/s

uname -r

4.1.12-61.1.18.el7uek.x86_64

dd if=/dev/zero of=/home/test bs=64k count=16k conv=fdatasync

1073741824 bytes (1.1 GB) copied, 2.0195 s, 532 MB/s

This post has been answered by Avi Miller-Oracle on Jan 13 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 13 2017
Added on Jan 13 2017
8 comments
699 views