Re: libata in 2.4.24?

From: Jeff Garzik (jgarzik_at_pobox.com)
Date: 12/02/03

  • Next message: Arnaldo Carvalho de Melo: "Re: Linux 2.4 future"
    Date:	Tue, 2 Dec 2003 15:16:49 -0500
    To: Greg Stark <gsstark@mit.edu>
    
    

    On Tue, Dec 02, 2003 at 03:10:19PM -0500, Greg Stark wrote:
    > Jeff Garzik <jgarzik@pobox.com> writes:
    >
    > > So, today, no acknowledgement occurs until the data _really_ is in the
    > > drive's buffers.
    >
    > The drive's buffers isn't good enough. If power is lost the write will be lost
    > and the database corrupt. It needs to be on the platters.

    Certainly agreed.

    > > > This doesn't happen with SCSI disks where multiple requests can be pending so
    > > > there's no urgency to reporting a false success. The request doesn't complete
    > > > until the write hits disk. As a result SCSI disks are reliable for database
    > > > operation and IDE disks aren't unless write caching is disabled.
    > >
    > > This is not really true.
    > >
    > > Regardless of TCQ, if the OS driver has not issued a FLUSH CACHE (IDE)
    > > or SYNCHRONIZE CACHE (SCSI), then the data is not guaranteed to be on
    > > the disk media. Plain and simple.
    >
    > That doesn't agree with people's experience. People seem to find that SCSI
    > drives never cache writes. This sort of makes sense since there's just not
    > much reason to report a write success before the write can be performed.
    > There's no performance advantage as long as more requests can be queued up.

    Some IDE _and/or_ SCSI drives do not cache writes. For these drives,
    the _absence_ of an OS flush-cache command still means your data gets
    to the platter.

    The core problem is not issuing a flush-cache command, it sounds like.
    The drive technology (wcache, or no) is largely irrelevant.

    > > If fsync(2) returns without a flush-cache, then your data is not
    > > guaranteed to be on the disk. And as you noted, flush-cache destroys
    > > performance.
    >
    > It's my understanding that it doesn't. There was some discussion in the past

    eh? flush-cache very definitely hurts performance, on both IDE and
    SCSI, for drives that support write caching.

    > > There are three levels:
    > >
    > > a) Data is successfully transferred to the controller/drive queue (TCQ).
    > > b) Data is successfully transferred to the drive's internal buffers.
    > > c) The drive successfully transfers data to the media.
    >
    > Only the third is of interest to Postgres or other databases. In fact, I

    Certainly.

    > suspect only the third is of interest to other systems that are supposed to be
    > reliable like MTAs etc. I think Wietse and others would be shocked if they
    > were told fsync wasn't guaranteed to have waited until the writes had actually
    > hit the media.

    As well he should be :)

            Jeff

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Arnaldo Carvalho de Melo: "Re: Linux 2.4 future"

    Relevant Pages

    • Re: Representing futuristic English
      ... >>the real world while I'm sure some technology has been lost, ... the problem seems to assume a bunch of drives and no power ...
      (rec.arts.sf.composition)
    • USB hangon hard discdrives lose letter designations
      ... With all updates except IE7 ). ... several of my hang-on USB hdds disappear from Windows Explorer (windows file manager). ... Additionally, I replaced one of the drives, so one is brand new, and still gets itself lost. ... Most of them never get lost, and one has lost its letter designation three times. ...
      (microsoft.public.windowsxp.help_and_support)
    • Re: Seagate Barracuda 160 GB IDE becomes corrupted. RMA?
      ... I've never lost a HD before, ... I used it mainly for backup and temporary work. ... I've had drives go flaky on me due to intermittent low voltage coming out of ... My backup strategy is pretty good and in fact, ...
      (comp.sys.ibm.pc.hardware.storage)
    • Re: deleted files and folders
      ... What happened when you restarted the pc was chkdsk ran and found broken chains/ lost clusters, then created *.chk files of them so you can delete them and regain the otherwise lost drive space. ... I looked in the folder that was suggested by Dave P., ... After scanning the drives (C and ... I created .pst files for>>> each ...
      (microsoft.public.win2000.general)
    • Re: Please Help Lost Files! URGENT
      ... I have Lost all my pictures ... I have 2 drives a c and a d ... > can go to Performance Settings User Profiles Settings, ... I went to User Profiles, ...
      (microsoft.public.windowsxp.perform_maintain)