Re: Performance of packet writing: Blocksize matters

Johannes Niess <[email protected]> Wed, 13 Dec 2006 00:26:39 +0100
Newsgroups gmane.linux.suse.packet-writing
Message-ID <[email protected]>
--nextPart2586192.bp1C9WQhUX
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

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=20
always has data to write. Second is that it feeds this data in 4k chunks=20
(reblocking).

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

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

stingray ~ # dd if=3D/dev/zero of=3D/dev/hdc bs=3D32769 count=3D25000
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=3D/dev/zero of=3D/dev/pktcdvd/dvdrw bs=3D32768 count=3D2=
5000
25000+0 records in
25000+0 records out
819200000 bytes (819 MB) copied, 86.3305 seconds, 9.5 MB/s

stingray ~ # dd if=3D/dev/zero of=3D/dev/pktcdvd/dvdrw bs=3D32769 count=3D2=
5000
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=20
incoming data (at least in my case). Or pktcdvd is slowed down for a=20
different (internal) reason.

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

Thank you very much fot your help!

Johannes Nie=DF


--nextPart2586192.bp1C9WQhUX
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQBFfzq2Z86b9aw2E+0RAnhkAJ42Cy7ivV1K+WqNfV7/J0q27tuudwCgxBR9
TGcmj27xmKd3qiaEjzhwP/M=
=XnC+
-----END PGP SIGNATURE-----

--nextPart2586192.bp1C9WQhUX--