Hmmm. The board doesn't allow nested quotes, so apologies if the context is quite heavily snipped.
QUOTE(Mike Giacomelli @ Apr 21 2006, 10:17 PM)

I'm confused. With the second test, what exactly did you do? Record 1 file at a time with HT enabled?
I repeated the first test with the process affinity for FB2K set to CPU0 and CPU1, rather than just CPU0. This means FB2K did exactly the same set of conversions as before (four FLAC files to WAV files), but ran two simultaneous conversion processes at once for two pairs of files, rather than one at a time for four files.
QUOTE
What does that show exactly?
I think it shows that with I/O bound conversions the new behaviour in FB2K results in reduced performance. The later tests showed that in CPU bound operations the new behaviour results in increased performance, by (possibly just by chance) a similar percentage.
QUOTE
I said constant number of seeks. Not constant running time.
OK, fair enough; so do you have any thoughts on why the running time is variable if disc activity should be equivalent either way? There must surely be
some extra activity to account for the longer running time in the I/O bound case not seen in the CPU bound case (unless it's not I/O bound at all - the significantly less than 100% CPU utilisation during higher bitrate output from the converter could be due to something else I suppose).
QUOTE
Blocks are always written out in integer multiples because the file system caches MBs worth of data and then flushes it when the disk is idle (since reads but not writes block).
One might expect this, however, the target disc indicator LED shows nothing before the conversion process starts, then lights up immediately and stays illuminated more or less continuously while the conversion process runs. The disc itself is noisy then, but all activity ceases as soon as the conversion window closes; the LED goes out and the disc goes quiet. If there's any write-behind cacheing happening, it's over such small amounts of data that the delays involved are imperceptible to the user. Perhaps the cacheing strategy in WinXP is not what you expect it to be, or does not work as effectively as you hope.
I converting two FLAC files to WAVs on a freshly defragmented 250GB/4K cluster NTFS drive a moment ago using FB2K 0.9.1 beta 1 with its default behaviour of two concurrent conversions. For the 43MB and 35MB WAV files, I get 225 and 168 fragments respectively - around 200K per fragment, but this is not constant; converting other files, including WAV back to FLAC, resulted in average fragment sizes of 76 to 250K (with a FLAC file holding both the largest average and smallest average size, so it doesn't seem to be a function of the rate of conversion, which might have indicated some fine grained time-based write cache flushing). On this 1GB machine there is over 470MB presently allocated to the system cache according to the Task Manager (though AIUI this includes VM allocation) and the conversion operation to WAV took less than 10 seconds, so it looks as if there was plenty of opportunity to collate the write operations in the cache and flush them (much) later on. But that didn't happen.
QUOTE
I think you're confusing a few issues here. First, if you're using HT, there are no additional context switches at all (which is the whole point of HT).
Well the OS still switches to
other processes, such as the FB2K UI thread which updates the progress bar. Assuming XP does not hold exclusive use of the virtual CPU for one of the conversion processes while this goes on, but instead uses a general switching policy, then there should still be two context switches going on when the two conversion threads are switched out (the state of two threads must be stored, even though when those two threads were running concurrently it wasn't necessary to switch between them). In that context for simplicity we might consider them one big thread that's twice as expensive to switch.
You're right that mentioning switching in the original context was misleading since even if there's only one thread running to convert each file, there still need to be 'n' threads in total to convert 'n' files whether run all at once or one at a time. Perhaps the HT case does even better because the two threads do get allocated to CPUs in a less general fashion (e.g. a priority change; in effect the time slice gets longer). In any event I'm way out of my depth when it comes to such specific details of WinXP process scheduling and its interaction with HT virtual CPUs and the fragment size being reported by the Diskeeper trial I'm using to get the fragment data doesn't seem to be directly related to any obvious factors such as file size, conversion type (WAV to FLAC or FLAC to WAV) or conversion time.
QUOTE
Second, the process it self is just handing off data to the OS and then to the driver. The driver then collects all writes from all processes into a large buffer and then flushes them when the disk is idle. I don't remember how Windows does this, but its probably similar to LInux where you can cache for up to 30 seconds and hundreds of MBs worth of data (assuming you have that much RAM).
There is clearly not anywhere near as large a collection of data prior to flushing since the delay before disc activity commences during conversion, and the time until disc activity ceases after conversion, is imperceptible. Or am I misinterpreting the activity indications from the HDD?
QUOTE
(I wrote: "A disc that is online for a given number of hours but idle will last longer than disc online for the same period but constantly seeking between tracks.")
Clearly false. The time to failure is a random vairable. You can't say when it will fail, only the odds that it will fail. Odds that you don't know anything about.
Hmmm, of course failure at a particular time can only be expressed as a probability, but are you saying that the (average) time to hardware failure in a moving parts device is not influenced by how much that hardware is used? I find that hard to accept, but would welcome a pointer to documentation to the contrary to further my understanding of modern HDDs. It could be that in modern designs the MTBF of the head assemblies is equal to or greater than that of the motor so that there is no difference between the drive running idle, and the drive running while continuously reading and writing data from (say) random sectors. Is this the case?
QUOTE
(I wrote quoting
http://support.microsoft.com/?kbid=174619)
What does MFT fragmentation have to do with writing FLAC files?
You asked, generally, why anyone would care about NTFS fragmentation. I picked out that example as I happened to be reading the article at the time.
Now, perhaps I want to write those FLAC files to DVD. They'll be read at high speed. The DVD writing speed may be reduced (assuming buffer underrun protection, otherwise we'll make drinks coasters) if the FLAC file fragmentation slows data transfer sufficiently. I might just want to copy the files to a backup HDD as quickly as possible. Or I might delete various FLAC files some time later; perhaps I don't like the track, or it is a compilation album track and I buy the original album, deciding to keep that version instead of the compilation one. Who's to say what data will end up being written into the mess of free space holes that get left behind by deletions? Who's to say what purpose it will be used for? Who can say whether it will be performance critical? The MFT could end up extending into that space - Microsoft seem to think this would matter.
I'd like to measure the time taken to copy fragmented converted WAV files to a clean drive and compare with copying unfragmented files, but the read cache gets in the way. I need some copying/benchmarking tool which bypasses or invalidates the cache contents for, ideally, both read and write. Do you know of any? Then we could put some real numbers to this debate and see whether or not it really
is a problem. I'm happy either way because of the CPU affinity work-around posted earlier, but it'd be nice to know whether or not I'm just completely deluded...

QUOTE
You're telling me that you go through and delete every other song whenever you encode FLAC files. Do you really do this on a regular basis? Can I ask why?
No, indeed I don't do that, but it's not quite what I suggested. Hopefully the examples I gave above are useful to see where I'm coming from. But like I say, at this point I think we need to get some real numbers down.