misc/145395: [nanobsd] [patch] Extremely slow nanobsd disk image
creation and 100% disk load on zfs
Alex Bakhtin
alex.bakhtin at gmail.com
Wed May 25 17:40:11 UTC 2011
The following reply was made to PR misc/145395; it has been noted by GNATS.
From: Alex Bakhtin <alex.bakhtin at gmail.com>
To: bug-followup at freebsd.org, imp at freebsd.org
Cc:
Subject: Re: misc/145395: [nanobsd] [patch] Extremely slow nanobsd disk image
creation and 100% disk load on zfs
Date: Wed, 25 May 2011 21:33:23 +0400
I made some additional performance testing.
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
The same nanobsd, my patch applied to 9-current nanobsd.sh and NANO_MD_ASYN=
C=3D1:
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
4.5 minutes to buld and gzip disk image with patched nanobsd.sh
and 36 minutes to build and gzip disk image with original.
Alex Bakhtin
2011/5/25 Alex Bakhtin <alex.bakhtin at gmail.com>:
> Hello,
>
>
>>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.
>
> =C2=A0 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.
>
> /dev/md2s1a on /mnt/system/obj/amtkit/_.mnt (ufs, local, soft-updates)
>
> =C2=A0 I tried to mout in async manually - and it seems that async option
> is ignored for MD-backed filesystem:
>
> bakhtin at tarzan(14) /mnt/system/nanobsd/amtkit
>> sudo umount /mnt/system/obj/amtkit/_.mnt
>
> bakhtin at tarzan(14) /mnt/system/nanobsd/amtkit
>> sudo mount -o async /dev/md2s1a //mnt/system/obj/amtkit/_.mnt
>
>> 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)
>
> As you can see - md2s1a is not mounted in async mode, and this causes
> extremely bad performance on ZFS.
>
> I'm pretty sure that attaching MD in async mode fixes this problem.
> Please review my patch and this bug.
>
>
> --
> ---
> Alex Bakhtin
>
--=20
---
Alex Bakhtin
More information about the freebsd-bugs
mailing list