Subject: Re: [Fwd: [linux-audio-dev] info point on linux hdr]
From: Paul Barton-Davis (pbd_AT_Op.Net)
Date: Mon Apr 17 2000 - 20:05:12 EEST
>> From: Paul Barton-Davis <pbd_AT_Op.Net>
>> i mentioned in some remarks to benno how important i thought it was to
>> preallocate the files used for hard disk recording under linux.
>
>Preallocation will make little difference. The real issue is that the
>buffer cache is doing write-behind, ie. it is batching up the writes into
>big chunks which get blasted to disk once every five seconds or so,
>causing large IO request queues to accumulate when that happens.
>
>That's great for normal use because it means that trickles of write
>activity don't tie up the spindles the whole time, but it's not ideal
>for audio recording.
Acknowledging your much greater wisdom in this are than me, I don't
understand the above given that, in my experience:
1) pre-allocation takes a *long* time. Allocating 24 203MB files on a
clean ext2 partition of 18GB takes many, many minutes, for example.
Presumably, the same overhead is being incurred when block
allocation happens "on the fly". If so, then even if pre-allocation
doesn't solve the buffer cache write batching problem, it certainly
gets rid of what appears to be an onerous task.
2) Why am I not having any of these problems ? Unlike Benno's code, I
have a working application that runs just fine. I get smooth
throughput from the disk subsystem too. My configuration (there are two):
Kernel 2.3.52 Kernel 2.3.52
Dual PII-450 Dual PII-450
on-board Adaptec 7890 on-board Adaptec 7890
Seagate 4.5GB Cheetah U2W 10K rpm IBM 9GB UltraStar U2W 10K rpm
Quantum 4.5GB Viking U2W 7.5K rpm 3 x IBM 18GB UltraStar
In both cases, without O_SYNC, or anything else but preallocation
and careful design, I seem to be able to get smooth disk throughput
at significantly above the rate I need (9MB/sec; I get up to
17MB/sec from the UltraStar)
In every case, I am doing disk I/O from a dedicated thread to a
single disk.
I'm confused. Is it just that I'm running on a genuine SMP system ?
--p
This archive was generated by hypermail 2b28 : Mon Apr 17 2000 - 20:37:39 EEST