Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Oct 2012 19:01:25 +0100
From:      "Steven Hartland" <killing@multiplay.co.uk>
To:        "David Wimsey" <dwimsey@rtsz.com>, <freebsd-fs@freebsd.org>
Subject:   Re: gptzfsboot very slow
Message-ID:  <225C2989B8B94BE8BCA4BD437055DFA7@multiplay.co.uk>
References:  <D5C49DEE-EAC6-4D2A-8E46-CD1BF6830151@rtsz.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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" <dwimsey@rtsz.com>


> 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--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?225C2989B8B94BE8BCA4BD437055DFA7>