Mailinglist Archive: packet-writing (10 mails)

< Previous Next >
Re: Performance of packet writing: Blocksize matters
  • From: Johannes Niess <linux@xxxxxxxxxxxxxxxxx>
  • Date: Wed, 13 Dec 2006 00:26:39 +0100
  • Message-id: <200612130026.46985.linux@xxxxxxxxxxxxxxxxx>
Am Dienstag 12 Dezember 2006 17:03 schrieb Phillip Susi:
> Johannes Niess wrote:
> > The classical mkisofs route works as expected. Feeding the packet driver
> > with 4k blocks (mbuffer -s 4096) results in the full advertised 8x DVD
> > writing speed:
> >
> > tar -cvM -L4500000 -f - /mnt/data/backup/debian-2005-02-06.tar.gz
> > /mnt/data/backup/snapshots/daily.0/ | mbuffer -m 1000k -s4096 -P 10 >
> > /dev/pktcdvd/dvdrw
> >
> > Without the -s 4096 option I get the same low performance behavior. I
> > also tried different buffer sizes in the kernel module and the
> > experimental write caching.
>
> I have no idea what mbuffer is or what it is doing, but if you just dd a
> file to the pktcdvd device, you can use any block size you want and it
> works fine because the pktcdvd driver merges the small writes into full
> packets.

Hi Phillip,

mbuffer does two things in this example. First it makes sure that pktcdvd
always has data to write. Second is that it feeds this data in 4k chunks
(reblocking).

These results from the dd approach are consistant with my earlier testing:

stingray ~ # dd if=/dev/zero of=/dev/hdc bs=32768 count=25000
25000+0 records in
25000+0 records out
819200000 bytes (819 MB) copied, 92.2253 seconds, 8.9 MB/s

stingray ~ # dd if=/dev/zero of=/dev/hdc bs=32769 count=25000
2643+0 records in
2643+0 records out
86608467 bytes (87 MB) copied, 223.764 seconds, 387 kB/s

stingray ~ # pktsetup dvdrw /dev/hdc
stingray ~ # dd if=/dev/zero of=/dev/pktcdvd/dvdrw bs=32768 count=25000
25000+0 records in
25000+0 records out
819200000 bytes (819 MB) copied, 86.3305 seconds, 9.5 MB/s

stingray ~ # dd if=/dev/zero of=/dev/pktcdvd/dvdrw bs=32769 count=25000
25000+0 records in
25000+0 records out
819225000 bytes (819 MB) copied, 1312.45 seconds, 624 kB/s

Basically this tells me that pktcdvd does no or inefficient merging of
incoming data (at least in my case). Or pktcdvd is slowed down for a
different (internal) reason.

For the slow performance cases I see a initial peak of good write speed
followed by "noisy" and slow write speeds. What other data do you need to
diagnose this strange problem?

Thank you very much fot your help!

Johannes Nieß

< Previous Next >
List Navigation