Re: disk write barriers

From: Lowell Gilbert (freebsd-questions-local_at_be-well.ilk.org)
Date: 07/07/05

  • Next message: Q=A4=B6=E0=A4=82=E0=A4=A4=E0=A4=A8=E0=A5=81_=28Shantanoo=29?=: "Re: root passwd"
    To: Matthias Buelow <mkb@incubus.de>
    To: freebsd-questions@freebsd.org
    Date: 07 Jul 2005 09:57:08 -0400
    
    

    Matthias Buelow <mkb@incubus.de> writes:

    > Now my question is: Does FreeBSD also implements these barriers, or an
    > equivalent mechanism, as claimed on the above URL?

    Do you have a background in OS design? It affects the answer, because
    you seem to be referring to access barriers and disk cache flushes
    interchangeably, which doesn't make sense, especially on
    multiprocessor systems.

    > If it does, why then
    > the frequent advice to disable write-back caching? Or is that only for
    > the couple drives that ignore any flush cache/disable wb commands?

    The problem with caching has nothing to do with flushing the cache; if
    you flush the cache often, there's no advantage to using it anyway.
    The whole speedup from using on-disk caching comes from the fact that
    the drive reorders the writes at will, and lies to the operating
    system by saying the writes are done when they aren't. Among other
    obvious problems, this negates the careful ordering calculated by
    softupdates.

    > I
    > know my drive doesn't ignore that command (since performance drops
    > sharply, when I disable the cache), so I would be on the safe side.

    This doesn't follow. Just because you know that your drive supports
    disabling the cache does not mean that it is safe to do so.

    > Would it be possible to get an authoritative statement from a FreeBSD
    > developer here on that matter?

    Could depend on how much you're willing to pay them.
    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


  • Next message: Q=A4=B6=E0=A4=82=E0=A4=A4=E0=A4=A8=E0=A5=81_=28Shantanoo=29?=: "Re: root passwd"

    Relevant Pages

    • Re: HD vs. OS problem
      ... You can try disabling Write Caching, ... disable write caching, open Device Manager, ... >>>drives respectively. ...
      (microsoft.public.windowsxp.hardware)
    • Re: IIS 6.0 caching Image Files when we dont want it
      ... Well, your application does not sound like it is cache friendly, so maybe ... the decision to do static file caching works like this: ... IF Static File Caching is not disabled (W3SVC/DisableStaticFileCache is ... Disabling static file cache does indeed solve the problem but affects other ...
      (microsoft.public.inetserver.iis)
    • Re: Slow Hibernate
      ... I had this problem and it was related to my "write cache" settings on ... Enabling or Disabling the Disk Write Caching ... Click the plus sign next to the Disk Drives branch to expand ...
      (microsoft.public.windowsxp.help_and_support)
    • Re: How to flush the disk write cache from userspace
      ... I think we really should have support for doing cache flushes automatically on fsync, ... User space code should not have to worry about this problem, it's pretty silly that for example MySQL has to advise people to use hdparm -W 0 to disable the write cache on their IDE drives in order to get proper data integrity guarantees - and disabling the cache on IDE without command queueing really slaughters the performance, unnecessarily in this case. ... I also think there's no point in disabling disks' write caches, since it slows writes and decreases disks' lifetime, and because there's a better solution. ...
      (Linux-Kernel)
    • Re: Write Caching on DeviceHarddisk0DR0
      ... Write caching is disabled and when you enable it it will ... However I would sugest that you install the latest drivers for the RAID ... Perhaps these disk drives can't be tweeked in this fashion? ... No OS cache and No caching on the buffer built into each hard drive. ...
      (microsoft.public.windows.server.sbs)