From owner-freebsd-questions@freebsd.org Sat Sep 26 14:11:51 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE857A092C9 for ; Sat, 26 Sep 2015 14:11:51 +0000 (UTC) (envelope-from wam@hiwaay.net) Received: from fly.hiwaay.net (fly.hiwaay.net [216.180.54.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F990AA2 for ; Sat, 26 Sep 2015 14:11:51 +0000 (UTC) (envelope-from wam@hiwaay.net) Received: from kabini1.local (dynamic-216-186-213-32.knology.net [216.186.213.32] (may be forged)) (authenticated bits=0) by fly.hiwaay.net (8.13.8/8.13.8/fly) with ESMTP id t8QEBneK004840 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Sat, 26 Sep 2015 09:11:50 -0500 Subject: Re: dd question To: FreeBSD Questions !!!! References: <5606A4FF.4090105@hiwaay.net> From: "William A. Mahaffey III" Message-ID: <5606A7A4.5000301@hiwaay.net> Date: Sat, 26 Sep 2015 09:17:18 -0453.75 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <5606A4FF.4090105@hiwaay.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Sep 2015 14:11:52 -0000 On 09/26/15 09:05, William A. Mahaffey III wrote: > > > I am preparing a USB stick for use to install FreeBSD 9.3R on 2 new > boxen I am bringing online. I already had the FreeBSD 9.3R img dd'ed > to that stick last year when I provisioned this box, but for some > reason, when I plugged the stick into my USB port today to copy some > additional files to it (scripts to be used during installs to > partition & slice up HDD's), I got errors in my syslog file & couldn't > mount the drive for the copies. No problema, I'll just re-dd the image > to the device & start over, all I would lose is output from the > previous install (this box, last year this time). However, I notice > the dd is proceeding *VERY* slowly: > > > [root@kabini1, /etc, 8:47:59am] 508 % ll /dev/da0* > crw-r----- 1 root operator 0xd2 Sep 26 08:29 /dev/da0 > crw-r----- 1 root operator 0xcd Sep 26 08:29 /dev/da0a > [root@kabini1, /etc, 8:48:09am] 509 % ll > /net/q6600/home/ISOs/BSDs/FreeBSD/9.3/ > total 1530556 > -rw-r--r-- 1 wam users 178749440 Jul 26 2014 > FreeBSD-9.3-RELEASE-amd64-bootonly.iso > -rw-r--r-- 1 wam users 671152128 Jul 26 2014 > FreeBSD-9.3-RELEASE-amd64-disc1.iso > -rw-r--r-- 1 wam users 717373440 Jul 26 2014 > FreeBSD-9.3-RELEASE-amd64-memstick.img > -rw------- 1 wam users 811 Jul 26 2014 checksum.MD5.txt > [root@kabini1, /etc, 8:48:19am] 510 % dd > if=/net/q6600/home/ISOs/BSDs/FreeBSD/9.3/FreeBSD-9.3-RELEASE-amd64-memstick.img > of=/dev/da0 > 94834+0 records in > 94834+0 records out > 48555008 bytes transferred in 542.035379 secs (89579 bytes/sec) > 101599+0 records in > 101599+0 records out > 52018688 bytes transferred in 580.466607 secs (89615 bytes/sec) > > I got that output by sending the SIGINFO signal to the dd process from > another shell window. My question is: Why so slow (89-ish KB/s) ? I > have gigabit switched LAN (125 MB/s theoretical speed), & most other > file copies or rsyncs across the LAN go at about 1/3 - 1/2 of > theoretical speeds, which is AOK by me. Any ideas ? TIA & have a nice > weekend. Update: I got tired of waiting & just copied the img files over from the other box to do the dd in case the interaction of dd & NFS were a problem: [root@kabini1, /etc, 9:12:23am] 511 % cp /net/q6600/home/ISOs/BSDs/FreeBSD/9.3/FreeBSD-9.3-RELEASE-amd64-memstick.img . [root@kabini1, /etc, 9:12:39am] 512 % dd if=FreeBSD-9.3-RELEASE-amd64-memstick.img of=/dev/da0 3049+0 records in 3049+0 records out 1561088 bytes transferred in 17.511796 secs (89145 bytes/sec) ^C9584+0 records in 9583+0 records out 4906496 bytes transferred in 54.403733 secs (90187 bytes/sec) [root@kabini1, /etc, 9:13:51am] 513 % [root@kabini1, /etc, 9:13:51am] 513 % [root@kabini1, /etc, 9:13:52am] 513 % [root@kabini1, /etc, 9:13:52am] 513 % uname -a FreeBSD kabini1.local 9.3-RELEASE-p24 FreeBSD 9.3-RELEASE-p24 #0: Sat Aug 22 01:54:44 UTC 2015 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 [root@kabini1, /etc, 9:13:55am] 514 % Note that the cp happened pretty quick, 717-ish MiB in about 15 sec., or around 45-ish MB/s, about 1/3 of max, quite acceptable to me. Obviously, the dd is still excruciatingly slow .... What gives ? TIA & have a nice weekend .... -- William A. Mahaffey III ---------------------------------------------------------------------- "The M1 Garand is without doubt the finest implement of war ever devised by man." -- Gen. George S. Patton Jr.