BSD

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Massive read/write performance problems with 3.0

    13 answers - 740 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Salut,
    It seems that disk I/ is massively slow under NetBSD 3.0 on amd64. I am
    running it on a DualCore 175 machine with 2G RAM (Sun Fire X2100),
    and when I e.g. dd if=/dev/zero of=/some/ffsv2/path bs=16k count=16k, the
    average write speed is around 5 MB/s on a 7.2krpm SATA disk.
    Is this a tuning problem or some known bug or do we have to track the
    problem down? (It doesn't behave much better on 3.99.18 with the new
    BUFQ stuff enabled either) It doesn't appear to be a problem of processing
    power, since the processing power used is usually around 1.5% of one CPU.
    Tonnerre
    PGP SIGNATURE
    Version: GnuPG v1.4.3 (NetBSD)
    47Mq+k70uZY=
    =yg/q
    PGP SIGNATURE
  • No.1 | | 831 bytes | |

    Sun, May 07, 2006 at 05:57:43PM +0200, Tonnerre LMBARD wrote:
    Salut,

    It seems that disk I/ is massively slow under NetBSD 3.0 on amd64. I am
    running it on a DualCore 175 machine with 2G RAM (Sun Fire X2100),
    and when I e.g. dd if=/dev/zero of=/some/ffsv2/path bs=16k count=16k, the
    average write speed is around 5 MB/s on a 7.2krpm SATA disk.

    Is this a tuning problem or some known bug or do we have to track the
    problem down? (It doesn't behave much better on 3.99.18 with the new
    BUFQ stuff enabled either) It doesn't appear to be a problem of processing
    power, since the processing power used is usually around 1.5% of one CPU.

    What is your disk system ? Maybe your SATA controller isn't properly
    supported.
    Also, you may have better speed using 64k blocks with dd
  • No.2 | | 598 bytes | |

    Salut,

    Mon, May 08, 2006 at 12:15:12AM +0200, Manuel Bouyer wrote:
    What is your disk system ? Maybe your SATA controller isn't properly
    supported.

    It's NVidia NForce, using the viaide driver.

    Also, you may have better speed using 64k blocks with dd

    Shouldn't the scheduler accumulate 4 operations with some kind of
    "Nagle's Algorithm for I/ schedulers"?

    Anyway, I attached dmesg and sysctl -a this time.

    Tonnerre

    PGP SIGNATURE
    Version: GnuPG v1.4.3 (NetBSD)

    pg39W88CpRo=
    =7a2/
    PGP SIGNATURE
  • No.3 | | 810 bytes | |

    Mon, May 08, 2006 at 06:22:43AM +0200, Tonnerre LMBARD wrote:
    Salut,

    Mon, May 08, 2006 at 12:15:12AM +0200, Manuel Bouyer wrote:
    What is your disk system ? Maybe your SATA controller isn't properly
    supported.

    It's NVidia NForce, using the viaide driver.

    Also, you may have better speed using 64k blocks with dd

    Shouldn't the scheduler accumulate 4 operations with some kind of
    "Nagle's Algorithm for I/ schedulers"?

    It should, and it does on my system at last (in my case, bs=16k was even
    a little faster )

    Can you try the attached program ? It will benchmark the IDE bus's bandwidth:
    /tst /dev/rwd0d 10000

    it should run for a few seconds to give usefull results; if it doesn't
    use something larger than 10000
  • No.4 | | 1283 bytes | |

    Salut,

    Mon, May 08, 2006 at 01:23:22PM +0200, Manuel Bouyer wrote:
    Can you try the attached program ? It will benchmark the IDE bus's bandwidth:
    ./tst /dev/rwd0d 10000

    it should run for a few seconds to give usefull results; if it doesn't
    use something larger than 10000

    I added the SYNC parameter to your open() and it sanitized the output
    quite a bit:

    vic# ./tst /dev/rwd0d 10000
    5409749 us, 115.532162 MB/s
    vic#

    Bonnie gives the following output:

    Input--
    -Per Char- -Rewrite-- -Per Char-
    MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU
    256 4802 3.5 5217 1.8 6430 1.8 105399 75.6 627604 100.0 5970.5 31.6

    The worst thing is that sometimes disk I/ operations hang for quite a
    while during heavy disk I/ (especially when the I/ takes place from two
    or more programs, so it seems that the I/ bandwidth isn't really
    distributed equally). I might bring up more test cases on that tonight.

    It looks to me that either the VM can't stand much parallel I/ or that
    there is a speed issue in the file system layer.

    Tonnerre

    PGP SIGNATURE
    Version: GnuPG v1.4.3 (NetBSD)

    /

    uNkgorFsTjg=
    =YnwX
    PGP SIGNATURE
  • No.5 | | 2367 bytes | |

    Tue, May 09, 2006 at 07:31:35AM +0200, Tonnerre LMBARD wrote:
    Salut,

    Mon, May 08, 2006 at 01:23:22PM +0200, Manuel Bouyer wrote:
    Can you try the attached program ? It will benchmark the IDE bus's bandwidth:
    ./tst /dev/rwd0d 10000

    it should run for a few seconds to give usefull results; if it doesn't
    use something larger than 10000

    I added the SYNC parameter to your open() and it sanitized the output
    quite a bit:

    As the tool is using the raw device it shouldn't matter. What problem did
    you notice ?

    vic# ./tst /dev/rwd0d 10000
    5409749 us, 115.532162 MB/s
    vic#

    Bonnie gives the following output:

    Input--
    -Per Char- -Rewrite-- -Per Char-
    MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU
    256 4802 3.5 5217 1.8 6430 1.8 105399 75.6 627604 100.0 5970.5 31.6

    The worst thing is that sometimes disk I/ operations hang for quite a
    while during heavy disk I/ (especially when the I/ takes place from two
    or more programs, so it seems that the I/ bandwidth isn't really
    distributed equally). I might bring up more test cases on that tonight.

    It looks to me that either the VM can't stand much parallel I/ or that
    there is a speed issue in the file system layer.

    I don't have such issues with others disk subsystems:
    tango# /tmp/tst /dev/rwd0d 10000
    5175742 us, 120.755633 MB/s
    tango# bonnie -c 256
    Input--
    -Per Char- -Rewrite-- -Per Char-
    MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU
    256 43852 28.9 42751 8.2 28485 6.5 60864 42.9 1057795 100.0 34763.0 71.0
    The same with -s 1024 (the box has 512Mb RAM):
    Input--
    -Per Char- -Rewrite-- -Per Char-
    MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU
    1024 46547 32.0 46896 8.8 20691 4.3 44786 32.4 47385 5.7 146.6 0.5

    So the problem is probably with either the disk or the controller.
    It seems that the controller can read from disk at full speed, so
    it's probably setup properly, at last for communications with the disk.
    You don't have the disk's write cache turned off, do you ?

    BTW, you could also try to benchmark raw write speed: boot single user and
    use:
    dd if=/dev/zero of=/dev/rwd0b bs=64k (assuming your swap partition is wd0b)
  • No.6 | | 959 bytes | |

    Tue, May 09, 2006 at 11:55:43PM +0200, Tonnerre LMBARD wrote:
    Well, I figured that SATA write caching was disabled in the BIS. I enabled
    it but now the thing won't boot up:

    Internet Software Consortium DHCP Client V3.0.1rc11
    Copyright 1995-2002 Internet Software Consortium.
    All rights reserved.
    For info, please visit http://www.iscbge0: block failed to stop: reg 0x1400, bi2
    .org/products/DHCP

    Listening on BPF/bge0/00:e0:81:5c:a2:18
    Sending on BPF/bge0/00:e0:81:5c:a2:18
    Sending on Socket/fallback
    DHCPREQUEST on buvm_fault(0xffff80000ec48420, 0x0, 0, 1) -e
    fatal page fault in supervisor mode
    trap type 6 code 0 rip ffffffff804207ba cs 8 rflags 10246 cr2 b8 cpl 0 rsp fff0
    syncing disks

    Not nice!

    I don't get thrown to the DDB like I would expect to. Also, the CMS
    checksum is wrong on the next boot every time:

    do you have sysctl ddb.onpanic=1 ?

    Pavel
  • No.7 | | 836 bytes | |

    Salut,

    Tue, May 09, 2006 at 12:06:42PM +0200, Manuel Bouyer wrote:
    I added the SYNC parameter to your open() and it sanitized the output
    quite a bit:

    As the tool is using the raw device it shouldn't matter. What problem did
    you notice ?

    The read speed was around 4000MB/s, which was unreasonable.

    BTW, you could also try to benchmark raw write speed: boot single user and
    use:
    dd if=/dev/zero of=/dev/rwd0b bs=64k (assuming your swap partition is wd0b)

    There appears to be a significant problem in write speed:

    vic# dd if=/dev/zero of=/dev/rwd0b bs=64k count=1536
    100663296 bytes transferred in 41.410 secs (2430893 bytes/sec)
    vic#

    Tonnerre

    PGP SIGNATURE
    Version: GnuPG v1.4.3 (NetBSD)

    /

    sS+hJbsNqfs=
    =V
    PGP SIGNATURE
  • No.8 | | 334 bytes | |

    Tue, May 09, 2006 at 11:36:51PM +0200, Tonnerre LMBARD wrote:
    There appears to be a significant problem in write speed:

    vic# dd if=/dev/zero of=/dev/rwd0b bs=64k count=1536
    100663296 bytes transferred in 41.410 secs (2430893 bytes/sec)

    Do you have write cache enabled? (dkctl wd0 getcache)

    Pavel
  • No.9 | | 1071 bytes | |

    Tue, May 09, 2006 at 11:36:51PM +0200, Tonnerre LMBARD wrote:
    Salut,

    Tue, May 09, 2006 at 12:06:42PM +0200, Manuel Bouyer wrote:
    I added the SYNC parameter to your open() and it sanitized the output
    quite a bit:

    As the tool is using the raw device it shouldn't matter. What problem did
    you notice ?

    The read speed was around 4000MB/s, which was unreasonable.

    Hum, then I guess you used the block device instead of the raw device

    BTW, you could also try to benchmark raw write speed: boot single user and
    use:
    dd if=/dev/zero of=/dev/rwd0b bs=64k (assuming your swap partition is wd0b)

    There appears to be a significant problem in write speed:

    vic# dd if=/dev/zero of=/dev/rwd0b bs=64k count=1536
    100663296 bytes transferred in 41.410 secs (2430893 bytes/sec)

    That's way to slow. So it looks like the issue is really somewhere
    between the disk and the controller.
    I would blame the controller, or more probably the way we use it (but without
    doc it's hard to fix this :/
  • No.10 | | 1418 bytes | |

    Salut,

    vic# dd if=/dev/zero of=/dev/rwd0b bs=64k count=1536
    100663296 bytes transferred in 41.410 secs (2430893 bytes/sec)

    That's way to slow. So it looks like the issue is really somewhere
    between the disk and the controller.
    I would blame the controller, or more probably the way we use it (but without
    doc it's hard to fix this :/

    Well, I figured that SATA write caching was disabled in the BIS. I enabled
    it but now the thing won't boot up:

    Internet Software Consortium DHCP Client V3.0.1rc11
    Copyright 1995-2002 Internet Software Consortium.
    All rights reserved.
    For info, please visit http://www.iscbge0: block failed to stop: reg 0x1400, bi2
    .org/products/DHCP

    Listening on BPF/bge0/00:e0:81:5c:a2:18
    Sending on BPF/bge0/00:e0:81:5c:a2:18
    Sending on Socket/fallback
    DHCPREQUEST on buvm_fault(0xffff80000ec48420, 0x0, 0, 1) -e
    fatal page fault in supervisor mode
    trap type 6 code 0 rip ffffffff804207ba cs 8 rflags 10246 cr2 b8 cpl 0 rsp fff0
    syncing disks

    Not nice!

    I don't get thrown to the DDB like I would expect to. Also, the CMS
    checksum is wrong on the next boot every time:

    CMS checksum error - Defaults loaded

    Not any nicer.

    Any ideas?

    Tonnerre

    PGP SIGNATURE
    Version: GnuPG v1.4.3 (NetBSD)

    PwKJ49If2a0=
    =9JYL
    PGP SIGNATURE
  • No.11 | | 694 bytes | |

    Salut,

    Tue, May 09, 2006 at 11:55:43PM +0200, Tonnerre LMBARD wrote:
    Well, I figured that SATA write caching was disabled in the BIS. I enabled
    it but now the thing won't boot up:

    , this error doesn't seem to be directly related to the setting.

    * SATA write cache enabled:
    -guaranteed fault on bootup
    * SATA write cache disabled:
    -occasional fault on bootup

    At any rate, the problem always turns up when the DHCP offer is received
    it seems. Maybe it has something to do with writing the lease file.

    Tonnerre

    PGP SIGNATURE
    Version: GnuPG v1.4.3 (NetBSD)

    +
    etHF5gxqA+0=
    =qWeq
    PGP SIGNATURE
  • No.12 | | 1390 bytes | |

    Tue, 9 May 2006, Manuel Bouyer wrote:

    Tue, May 09, 2006 at 11:36:51PM +0200, Tonnerre LMBARD wrote:
    [snip]
    >vic# dd if=/dev/zero of=/dev/rwd0b bs=64k count=1536
    >100663296 bytes transferred in 41.410 secs (2430893 bytes/sec)
    >

    That's way to slow. So it looks like the issue is really somewhere
    between the disk and the controller.
    I would blame the controller, or more probably the way we use it (but without
    doc it's hard to fix this :/

    my previous amd64 box (athlon64 3500+, MSI K8N Neo4 Platinum (Nforce4
    ultra chipset), Seagate barracuda SATA disks) running 3.0 I saw great
    variations in disk speed with dd, depending on block size.

    Utilizing ram was a bad idea: 64M blocksize yielded me something like your
    figures (~28MB/s). Too small (8-16K) of course had a similar effect. I got
    a peak rate of 59M/s using a block size of 512K. I got about the same
    results when dd:ing one disk to another and when wiping the old ones with
    dd from /dev/zero. Not sure what I *should* be able to squeeze out of it
    in linear raw-device writes though -- I somehow expected more from a new
    sata disk.

    Awaiting the arrical of my new box (x2 4400+, nforce4 sli x16 chipset,
    sata2 barracudas). Will be interesting to see if performance differs.

    Regards,
    ali:)
  • No.13 | | 1060 bytes | |

    Salut,

    Wed, May 10, 2006 at 12:02:21AM +0200, Tonnerre LMBARD wrote:
    Salut,

    Tue, May 09, 2006 at 11:55:43PM +0200, Tonnerre LMBARD wrote:
    Well, I figured that SATA write caching was disabled in the BIS. I enabled
    it but now the thing won't boot up:

    , this error doesn't seem to be directly related to the setting.

    * SATA write cache enabled:
    -guaranteed fault on bootup
    * SATA write cache disabled:
    -occasional fault on bootup

    At any rate, the problem always turns up when the DHCP offer is received
    it seems. Maybe it has something to do with writing the lease file.

    I got at least a tiny fraction of a stack trace out of the problem:

    Stopped in pid 241.1 (ifconfig) at netbsd:Xintr_legacy7+0x1b3: movq 0x50(%rsp), %r14
    db{0}bt
    Xintr_legacy7() at netbsd:Xintr_legacy7+0x1b3
    interrupt
    0x29d:
    db{0}>

    Not overly useful though

    Tonnerre

    PGP SIGNATURE
    Version: GnuPG v1.4.3 (NetBSD)

    frrHx3N6p9I=
    =0iCP
    PGP SIGNATURE

Re: Massive read/write performance problems with 3.0


max 4000 letters.
Your nickname that display:
In order to stop the spam: 4 + 3 =
QUESTION ON "BSD"

EMSDN.COM