From owner-freebsd-fs@FreeBSD.ORG Fri Oct 5 00:46:57 2007 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5291C16A421 for ; Fri, 5 Oct 2007 00:46:57 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from cp65.agava.net (cp65.agava.net [89.108.66.215]) by mx1.freebsd.org (Postfix) with ESMTP id 0F34713C45D for ; Fri, 5 Oct 2007 00:46:57 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from [213.148.20.85] (helo=nexii.panopticon) by cp65.agava.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.44 (FreeBSD)) id 1IdbLD-0005r3-69 for freebsd-fs@freebsd.org; Fri, 05 Oct 2007 04:46:55 +0400 Received: from hades.panopticon (hades.panopticon [192.168.0.2]) by nexii.panopticon (Postfix) with ESMTP id 2553917041 for ; Fri, 5 Oct 2007 04:48:15 +0400 (MSD) Received: by hades.panopticon (Postfix, from userid 1000) id B15324122; Fri, 5 Oct 2007 04:48:20 +0400 (MSD) Date: Fri, 5 Oct 2007 04:48:20 +0400 From: Dmitry Marakasov To: freebsd-fs@freebsd.org Message-ID: <20071005004820.GA29814@hades.panopticon> Mail-Followup-To: freebsd-fs@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cp65.agava.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [26 6] X-AntiAbuse: Sender Address Domain - amdmi3.ru X-Source: X-Source-Args: X-Source-Dir: Subject: Very slow writes on flash + msdosfs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2007 00:46:57 -0000 Hi! I have USB flash: da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-2 device da0: 40.000MB/s transfers da0: 1999MB (4095998 512 byte sectors: 255H 63S/T 254C) It attaches to ehci and I get pretty good read/write speed: % dd if=/dev/zero of=/dev/da0 bs=1m dd: /dev/da0: short write on character device dd: /dev/da0: end of device 2000+0 records in 1999+1 records out 2097150976 bytes transferred in 178.132363 secs (11772993 bytes/sec) % dd if=/dev/da0 of=/dev/zero bs=1m count=100 100+0 records in 100+0 records out 104857600 bytes transferred in 7.240738 secs (14481618 bytes/sec) But newfs_msdos ran on it is very slow: % time newfs_msdos -F32 -LAMDmi3 -k 0xffff /dev/da0s1 /dev/da0s1: 4072456 sectors in 509057 FAT32 clusters (4096 bytes/cluster) bps=512 spc=8 res=32 nft=2 mid=0xf0 spt=63 hds=255 hid=0 bsec=4080447 bspf=3978 rdcl=2 infs=1 bkbs=0xffff newfs_msdos -F32 -LAMDmi3 -k 0xffff /dev/da0s1 0,02s user 0,21s system 0% cpu 2:54,37 total when it runs, gkrellm shows 23kb/s writes. Writing a 1.0Mb directory with 340 files takes 1.5 minutes (up to 300k/sec writes => seems like much more data is actually written that it's needed). Larger files behave somewhat better (up to 3 MB/s). Btw, dd if=/dev/zero of=/dev/da0 bs=512 show the same 23k/s speed as newfs_msdosfs. So where is the problem? Why's there no caching and why's there 1 sector writes? PS. I use 6.1, has the situation changed in -CURRENT? -- Best regards, Dmitry Marakasov mailto:amdmi3@amdmi3.ru