From owner-freebsd-usb@FreeBSD.ORG Mon Aug 14 06:57:33 2006 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D61D316A4DD for ; Mon, 14 Aug 2006 06:57:33 +0000 (UTC) (envelope-from admin@intron.ac) Received: from intron.ac (unknown [210.51.165.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1DEB43D49 for ; Mon, 14 Aug 2006 06:57:32 +0000 (GMT) (envelope-from admin@intron.ac) Received: from localhost (localhost [127.0.0.1]) (uid 1003) by intron.ac with local; Mon, 14 Aug 2006 14:57:31 +0800 id 00102C04.44E01EDB.00000942 References: <44DF8308.9080700@fernuni-hagen.de> <6.2.3.4.0.20060813170759.12be7730@64.7.153.2> <44E00CFE.5090806@fernuni-hagen.de> In-Reply-To: <44E00CFE.5090806@fernuni-hagen.de> From: "Intron" To: Marc van Woerkom Date: Mon, 14 Aug 2006 14:57:31 +0800 Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312"; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Cc: freebsd-usb@freebsd.org Subject: Re: SD card speed X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Aug 2006 06:57:34 -0000 Marc van Woerkom wrote: > I did some more tests. > > Using smaller blocksizes (newfs_msdosfs -b 4096) yields even slower write > transfer rates. It looks like there are only 7 transfers per seconds, thus > if > the blocksize is smaller, less data is shoveled over. > > tty da2 cpu > tin tout KB/t tps MB/s us ni sy in id > 0 65 4.00 7 0.03 14 0 6 2 78 > 0 181 4.00 7 0.03 11 0 7 2 80 > 0 89 4.00 7 0.03 13 0 8 4 75 > 0 69 4.00 7 0.03 9 0 9 2 80 > 0 76 4.00 6 0.02 16 0 4 4 77 > 0 71 4.00 7 0.03 12 0 10 3 75 > 0 132 4.00 7 0.03 6 0 16 3 75 > 0 76 4.00 7 0.03 34 0 8 4 54 > 0 78 4.00 7 0.03 8 0 5 2 86 > 0 152 4.00 7 0.03 14 0 5 1 80 > 0 87 4.00 6 0.02 12 0 6 1 81 > 0 80 4.00 7 0.03 9 0 7 3 80 > > It doesn't seem to matter if it is FAT or FAT32. > > However if I format the SD card as UFS2 system, the card is fast: > > [root@hokage /]# fdisk /dev/da2 > ******* Working on device /dev/da2 ******* > parameters extracted from in-core disklabel are: > cylinders=472 heads=64 sectors/track=32 (2048 blks/cyl) > > parameters to be used for BIOS calculations are: > cylinders=472 heads=64 sectors/track=32 (2048 blks/cyl) > > Media sector size is 512 > Warning: BIOS sector numbering starts with sector 1 > Information from DOS bootblock is: > The data for partition 1 is: > sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > start 32, size 966624 (471 Meg), flag 80 (active) > beg: cyl 0/ head 1/ sector 1; > end: cyl 471/ head 63/ sector 32 > The data for partition 2 is: > > The data for partition 3 is: > > The data for partition 4 is: > > > tty da2 cpu > tin tout KB/t tps MB/s us ni sy in id > 27 55 1.45 1 0.00 12 0 7 2 79 > 0 162 128.00 20 2.50 8 0 9 4 80 > 0 70 128.00 23 2.87 5 0 9 3 83 > 0 66 128.00 21 2.62 12 0 7 1 80 > 0 44 128.00 24 3.00 9 0 8 1 83 > 0 72 128.00 22 2.75 7 0 5 1 87 > 0 127 128.00 23 2.87 12 0 13 3 71 > 0 66 128.00 23 2.87 5 0 7 4 84 > 0 81 128.00 23 2.87 17 0 8 4 71 > 0 66 128.00 23 2.87 7 0 9 4 80 > 0 70 128.00 22 2.75 12 0 11 3 74 > 0 90 128.00 23 2.87 10 0 8 2 80 > 136 81 128.00 20 2.50 9 0 9 2 80 > > Thus the slowdown seems to be related to using a FAT filesystem on > that SD card. > > Last thing I have to test is what happens, if I partition/format that > SD card under Windows. > > Regards, > Marc > > _______________________________________________ > freebsd-usb@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-usb > To unsubscribe, send any mail to "freebsd-usb-unsubscribe@freebsd.org" Due to the asynchronous transmission mechanism and somewhat long delay on line, USB requires device to transfer data in as large block as possible to gain high transmission rate. Have you tested your card reader on Microsoft Windows? FreeBSD's FAT module probably isn't optimized enough. ------------------------------------------------------------------------ From Beijing, China