On Wed, 17 Jul 2002, Sergiy Kudryk wrote:
Is it possible to exclude mixed write/read operations with pktcdvd ?
For example when i move multiple small files from CDRW disk to harddrive mixed read /write transactions occurs. This degrades overall performance and potentially can destroy laser head of CDRW drive.
Can be in pktcdvd code implemented mechanism similar to semaphore: stop write transactions when we have read one and contra ?
This is what I wrote in an earlier mail: I think the speed issue is caused by two things: The udf filesystem seems to be inefficient at handling many small files. I don't know if that's caused by the current implementation or by something in the udf specification that requires such behavior. The pktcdvd module is bypassing the the I/O elevator when creating write requests for the CDRW drive. This can make performance really suffer when there is a mixed read/write load. The 2.5 version of pktcdvd has fixed this problem, but a backport is not easy because it relies heavily on the new bio infrastructure in 2.5. I still think that's true, but I have some more information on the udf filesystem behavior. If I create a new udf filesystem and start adding lots of small files to it, at first (before dirty data writeback starts) the speed at which files are added is limited by how fast data can be *read* from the CD. I haven't looked at the udf code yet, but I would guess the udf filesystem reads a disk block for each file being added. Even if the caches are flushed between mkudf and mount, there should be no reason to read more data than mkudf wrote, so I think either the buffer/page cache doesn't work as intended for this case, or the udf filesystem reads disk blocks containing uninitialized data. The ext2 filesystem doesn't have this property. It adds files at full speed without reading anything from the disk, until all your memory fills up with dirty data. When this happens the system becomes very unresponsive (as in mouse pointer in X freezes for minutes), because every process that tries to allocate memory is put to sleep. So the performance problem in the udf filesystem is hiding another problem in the virtual memory subsystem. The VM should only allow a fraction of the total RAM to be used for dirty data belonging to a slow block device. -- Peter Osterlund - petero2@telia.com http://w1.894.telia.com/~u89404340