xfs
[Top] [All Lists]

write-caching with XFS

To: linux-xfs@xxxxxxxxxxx
Subject: write-caching with XFS
From: Chris Parrott <chris.parrott@xxxxxxxxxxxx>
Date: Mon, 07 Jan 2002 10:29:03 -0700
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011229

Greetings:

I have noticed a very strange phenomenon involving XFS with hardware write-caching being active on Maxtor hard drives. We have seen this on both 80 GB and 120 GB drives, so it's not limited to any one drive model in particular. Maxtor turns on write-caching by default in their hard drives.

We are working on a project which involves streaming live video data to a large (approx. 78-118 GB, depending on the drive) partition formatted with XFS. As the data comes in, it is held in a ring buffer before being dumped to the disk in fixed (approx. 99 KB) chunks. With write-caching turned on, dumping data to the XFS partition causes the ring buffer to eventually overflow, resulting in periodic data loss. However, if we turn off write-caching, the ring buffer never seems to overflow. It seems that the write calls just block longer with write-caching turned on. Unfortunately, the extra blocking time causes us to not be able to process our data promptly enough to prevent buffer overflows.

We had an engineer from Maxtor perform some IDE bus traces while data was being spooled to the drive, and he could not find any indication that drive performance itself was the culprit. All of the I/O requests to the drive itself were completed within the usual, expected durations of time, once the corresponding IDE commands had been issued.

I tried another experiment, in which I replaced the XFS filesystem with ReiserFS, to determine if the problem with filesystem vs. IDE-driver related. The ring buffer did not overflow when writing to the ReiserFS partition. (We cannot use ReiserFS in production, as we depend on some features only available in XFS.)

We are using a 2.4.8 kernel, with the corresponding XFS patch applied. This kernel has been heavily modified to support our product, so we cannot easily upgrade to the very latest kernel revision. Hence, we have not been able to track all the subsequent XFS developments.

Does anyone know what might be going on in XFS to cause this sort of behavior? I am curious as to why the write requests to XFS would take longer to complete with write-caching turned on. I would like to keep write-caching on, if at all possible, due to the overall performance gains.

Many thanks in advance,

+chris


Chris Parrott
Linux Software Engineer
Echostar Technologies Corp.
94 Inverness Terrace East
Englewood, CO 80112
phone: 303 706 5383 / fax: 303 799 6222
e-mail: chris.parrott@xxxxxxxxxxxx



<Prev in Thread] Current Thread [Next in Thread>