Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Nov 2013 21:47:17 +0100
From:      =?ISO-8859-1?Q?Szalai_Andr=E1s?= <szalai.bandi@gmail.com>
To:        freebsd-stable@freebsd.org
Subject:   gmirror: writes are faster than reads
Message-ID:  <5297ABD5.5060504@gmail.com>

next in thread | raw e-mail | index | archive | help
Hi Guys,

Has somebody encountered (significantly) different read/write speeds
when using gmirror?

I have 2xWD WD30EFRX RED drives which are configured as follows:

$ gmirror status
        Name    Status  Components
mirror/root  COMPLETE  ada0p2 (ACTIVE)
                        ada1p2 (ACTIVE)
mirror/data  COMPLETE  ada0p4 (ACTIVE)
                        ada1p4 (ACTIVE)

mirror/root is mounted as the root fs (UFS2).

Doing write:

$ time dd if=/dev/zero of=/IMAGE bs=1024k count=`expr 4 \* 1024`
4096+0 records in
4096+0 records out
4294967296 bytes transferred in 29.326044 secs (146455733 bytes/sec)

Doing read:

$ time dd if=/IMAGE of=/dev/null bs=1024k count=`expr 4 \* 1024`
4096+0 records in
4096+0 records out
4294967296 bytes transferred in 48.821649 secs (87972598 bytes/sec)

As you can see, read is much slower than write (87 vs 146 MB/s). Why?

Any help would be appreciated.

Best regards,
Andrew

PS: Partition layout (partitions are 4k aligned):

$ gpart show ada0 ada1
=>        34  5860533101  ada0  GPT  (2.7T)
           34           6        - free -  (3.0k)
           40        1024     1  freebsd-boot  (512k)
         1064    16777216     2  freebsd-ufs  (8.0G)
     16778280    16777216     3  freebsd-swap  (8.0G)
     33555496  5826977632     4  freebsd-ufs  (2.7T)
   5860533128           7        - free -  (3.5k)

=>        34  5860533101  ada1  GPT  (2.7T)
           34           6        - free -  (3.0k)
           40        1024     1  freebsd-boot  (512k)
         1064    16777216     2  freebsd-ufs  (8.0G)
     16778280    16777216     3  freebsd-swap  (8.0G)
     33555496  5826977632     4  freebsd-ufs  (2.7T)
   5860533128           7        - free -  (3.5k)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5297ABD5.5060504>