misc/145395: [nanobsd] [patch] Extremely slow nanobsd disk image creation and 100% disk load on zfs

Warner Losh imp at bsdimp.com
Wed May 25 18:00:25 UTC 2011


The following reply was made to PR misc/145395; it has been noted by GNATS.

From: Warner Losh <imp at bsdimp.com>
To: Alex Bakhtin <alex.bakhtin at gmail.com>
Cc: bug-followup at FreeBSD.org, imp at FreeBSD.org
Subject: Re: misc/145395: [nanobsd] [patch] Extremely slow nanobsd disk image creation and 100% disk load on zfs
Date: Wed, 25 May 2011 11:47:17 -0600

 Can you rebase your changes on the latest nanobsd.sh and resend?
 
 On May 25, 2011, at 11:33 AM, Alex Bakhtin wrote:
 
 > I made some additional performance testing.
 >=20
 > Original 9-current nanobsd.sh:
 >> sudo ./create.sh
 > 00:00:00 # NanoBSD image amtkit build starting
 > 00:00:00 ## Skipping buildworld (as instructed)
 > 00:00:00 ## Skipping buildkernel (as instructed)
 > 00:00:00 ## Clean and create world directory =
 (/mnt/system/obj/amtkit/_.w)
 > 00:00:09 ## Construct install make.conf
 > (/mnt/system/obj/amtkit/make.conf.install)
 > 00:00:09 ## installworld
 > 00:00:09 ### log: /mnt/system/obj/amtkit/_.iw
 > 00:02:55 ## install /etc
 > 00:02:55 ### log: /mnt/system/obj/amtkit/_.etc
 > 00:02:56 ## configure nanobsd /etc
 > 00:02:56 ## install kernel (GENERIC_FWD)
 > 00:02:56 ### log: /mnt/system/obj/amtkit/_.ik
 > 00:03:00 ## run customize scripts
 > 00:03:00 ## customize "cust_allow_ssh_root"
 > 00:03:00 ### log: /mnt/system/obj/amtkit/_.cust.cust_allow_ssh_root
 > 00:03:00 ## customize "cust_install_files"
 > 00:03:00 ### log: /mnt/system/obj/amtkit/_.cust.cust_install_files
 > 00:03:00 ## customize "cust_ld32_cfg"
 > 00:03:00 ### log: /mnt/system/obj/amtkit/_.cust.cust_ld32_cfg
 > 00:03:00 ## customize "cust_install_packages"
 > 00:03:00 ### log: /mnt/system/obj/amtkit/_.cust.cust_install_packages
 > 00:04:00 ## customize "cust_etc_cfg"
 > 00:04:00 ### log: /mnt/system/obj/amtkit/_.cust.cust_etc_cfg
 > 00:04:00 ## configure nanobsd setup
 > 00:04:00 ### log: /mnt/system/obj/amtkit/_.dl
 > 00:04:05 ## run late customize scripts
 > 00:04:05 ## late customize "cust_dir_cfg"
 > 00:04:05 ### log: /mnt/system/obj/amtkit/_.late_cust.cust_dir_cfg
 > 00:04:05 ## late customize "copy_sources"
 > 00:04:05 ### log: /mnt/system/obj/amtkit/_.late_cust.copy_sources
 > 00:04:57 ## build diskimage
 > 00:04:57 ### log: /mnt/system/obj/amtkit/_.di
 > Gzipping disk image.
 > 00:41:02 # NanoBSD image amtkit completed
 >=20
 >=20
 > The same nanobsd, my patch applied to 9-current nanobsd.sh and =
 NANO_MD_ASYNC=3D1:
 >=20
 > 00:00:00 # NanoBSD image amtkit build starting
 > 00:00:00 ## Skipping buildworld (as instructed)
 > 00:00:00 ## Skipping buildkernel (as instructed)
 > 00:00:00 ## Clean and create world directory =
 (/mnt/system/obj/amtkit/_.w)
 > 00:00:18 ## Construct install make.conf
 > (/mnt/system/obj/amtkit/make.conf.install)
 > 00:00:18 ## installworld
 > 00:00:18 ### log: /mnt/system/obj/amtkit/_.iw
 > 00:02:26 ## install /etc
 > 00:02:26 ### log: /mnt/system/obj/amtkit/_.etc
 > 00:02:28 ## configure nanobsd /etc
 > 00:02:28 ## install kernel (GENERIC_FWD)
 > 00:02:28 ### log: /mnt/system/obj/amtkit/_.ik
 > 00:02:30 ## run customize scripts
 > 00:02:30 ## customize "cust_allow_ssh_root"
 > 00:02:30 ### log: /mnt/system/obj/amtkit/_.cust.cust_allow_ssh_root
 > 00:02:30 ## customize "cust_install_files"
 > 00:02:30 ### log: /mnt/system/obj/amtkit/_.cust.cust_install_files
 > 00:02:30 ## customize "cust_ld32_cfg"
 > 00:02:30 ### log: /mnt/system/obj/amtkit/_.cust.cust_ld32_cfg
 > 00:02:30 ## customize "cust_install_packages"
 > 00:02:30 ### log: /mnt/system/obj/amtkit/_.cust.cust_install_packages
 > 00:03:23 ## customize "cust_etc_cfg"
 > 00:03:23 ### log: /mnt/system/obj/amtkit/_.cust.cust_etc_cfg
 > 00:03:23 ## configure nanobsd setup
 > 00:03:23 ### log: /mnt/system/obj/amtkit/_.dl
 > 00:03:26 ## run late customize scripts
 > 00:03:26 ## late customize "cust_dir_cfg"
 > 00:03:26 ### log: /mnt/system/obj/amtkit/_.late_cust.cust_dir_cfg
 > 00:03:26 ## late customize "copy_sources"
 > 00:03:26 ### log: /mnt/system/obj/amtkit/_.late_cust.copy_sources
 > 00:04:56 ## build diskimage
 > 00:04:56 ### log: /mnt/system/obj/amtkit/_.di
 > Gzipping disk image.
 > 00:09:34 # NanoBSD image amtkit completed
 >=20
 >    4.5 minutes to buld and gzip disk image with patched nanobsd.sh
 > and 36 minutes to build and gzip disk image with original.
 >=20
 > Alex Bakhtin
 >=20
 > 2011/5/25 Alex Bakhtin <alex.bakhtin at gmail.com>:
 >> Hello,
 >>=20
 >>=20
 >>> From-To:open->closed
 >>> By:imp When:Fri May 13 13:44:33 MDT 2011
 >>> Why:We've been doing async for a while now. Bug OBE.
 >>=20
 >>   I'm really sorry, but today I have tested the nanobsd.sh from
 >> 9-CURRENT and I'm completely sure that the problem WAS NOT fixed. I
 >> discovered that building image is still extremelly slow and produces
 >> great disk load. After checking deeply, I found that image is not
 >> mounted in async mode.
 >>=20
 >> /dev/md2s1a on /mnt/system/obj/amtkit/_.mnt (ufs, local, =
 soft-updates)
 >>=20
 >>   I tried to mout in async manually - and it seems that async option
 >> is ignored for MD-backed filesystem:
 >>=20
 >> bakhtin at tarzan(14) /mnt/system/nanobsd/amtkit
 >>> sudo umount /mnt/system/obj/amtkit/_.mnt
 >>=20
 >> bakhtin at tarzan(14) /mnt/system/nanobsd/amtkit
 >>> sudo mount -o async /dev/md2s1a //mnt/system/obj/amtkit/_.mnt
 >>=20
 >>> mount | grep md
 >> /dev/md0 on /etc (ufs, local)
 >> /dev/md1 on /var (ufs, local)
 >> /dev/md2s1a on /mnt/system/obj/amtkit/_.mnt (ufs, local, =
 soft-updates)
 >>=20
 >> As you can see - md2s1a is not mounted in async mode, and this causes
 >> extremely bad performance on ZFS.
 >>=20
 >> I'm pretty sure that attaching MD in async mode fixes this problem.
 >> Please review my patch and this bug.
 >>=20
 >>=20
 >> --
 >> ---
 >> Alex Bakhtin
 >>=20
 >=20
 >=20
 >=20
 > --=20
 > ---
 > Alex Bakhtin
 >=20
 >=20
 


More information about the freebsd-bugs mailing list