From owner-freebsd-fs@FreeBSD.ORG Sat Oct 20 18:01:40 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6EEE5879 for ; Sat, 20 Oct 2012 18:01:40 +0000 (UTC) (envelope-from prvs=1640634f34=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id E5FE08FC18 for ; Sat, 20 Oct 2012 18:01:39 +0000 (UTC) Received: from r2d2 ([188.220.16.49]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50000769861.msg for ; Sat, 20 Oct 2012 19:01:31 +0100 X-Spam-Processed: mail1.multiplay.co.uk, Sat, 20 Oct 2012 19:01:31 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 188.220.16.49 X-Return-Path: prvs=1640634f34=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-fs@freebsd.org Message-ID: <225C2989B8B94BE8BCA4BD437055DFA7@multiplay.co.uk> From: "Steven Hartland" To: "David Wimsey" , References: Subject: Re: gptzfsboot very slow Date: Sat, 20 Oct 2012 19:01:25 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_030C_01CDAEF5.4DC6FF00" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Oct 2012 18:01:40 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_030C_01CDAEF5.4DC6FF00 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit ----- Original Message ----- From: "David Wimsey" > My file server is configured with zfs root based on http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/Mirror > > When booting, after it gets past the BIOS drive C: is > disk0 (one line for each of the 6 drives as expected) > part, drops to a new line and the rotating twiddle > starts its bit. At first it moves a long at a almost > normal looking speed, then it starts only ticking away > slowly, maybe once or twice a minute. > ... You don't say what version your running but we had the same issue and the attached patch fixes it for us by reducing the amount of slices tasted during the boot process. I believe there's some on going work to improve the boot process which includes reduction in the amount of tastes of disks / partitions which may be a better option but the patch works for us on 8.3-RELEASE. In addition if you have a large amount of memory setting the following in /boot/loader.conf can also significantly reduced your boot time. hw.memtest.tests="0" Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. ------=_NextPart_000_030C_01CDAEF5.4DC6FF00 Content-Type: text/plain; format=flowed; name="zfs-slice-boot.txt"; reply-type=original Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="zfs-slice-boot.txt" --- sys/boot/zfs/zfs.c.orig 2011-10-20 18:15:29.966685430 +0000=0A= +++ sys/boot/zfs/zfs.c 2011-10-20 18:18:22.291033636 +0000=0A= @@ -45,6 +45,12 @@=0A= =0A= #include "zfsimpl.c"=0A= =0A= +/*=0A= + * For GPT this should be 128 but leads to 50+ second delay in BTX = loader so=0A= + * we use the original 4 pre r198420 by default for the boot process=0A= + */=0A= +#define ZFS_MAX_SLICES 4=0A= +=0A= static int zfs_open(const char *path, struct open_file *f);=0A= static int zfs_write(struct open_file *f, void *buf, size_t size, = size_t *resid);=0A= static int zfs_close(struct open_file *f);=0A= @@ -415,7 +421,7 @@=0A= if (vdev_probe(vdev_read, (void*) (uintptr_t) fd, 0))=0A= close(fd);=0A= =0A= - for (slice =3D 1; slice <=3D 128; slice++) {=0A= + for (slice =3D 1; slice <=3D ZFS_MAX_SLICES; slice++) {=0A= sprintf(devname, "disk%dp%d:", unit, slice);=0A= fd =3D open(devname, O_RDONLY);=0A= if (fd =3D=3D -1) {=0A= ------=_NextPart_000_030C_01CDAEF5.4DC6FF00--