From owner-freebsd-ports@FreeBSD.ORG Tue May 28 20:24:17 2013 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BA9913AC for ; Tue, 28 May 2013 20:24:17 +0000 (UTC) (envelope-from lars@e-new.0x20.net) Received: from mail.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) by mx1.freebsd.org (Postfix) with ESMTP id 3C496362 for ; Tue, 28 May 2013 20:24:17 +0000 (UTC) Received: from e-new.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.0x20.net (Postfix) with ESMTPS id 5FAAC6A6023; Tue, 28 May 2013 22:24:16 +0200 (CEST) Received: from e-new.0x20.net (localhost [127.0.0.1]) by e-new.0x20.net (8.14.5/8.14.5) with ESMTP id r4SKOG9B045750; Tue, 28 May 2013 22:24:16 +0200 (CEST) (envelope-from lars@e-new.0x20.net) Received: (from lars@localhost) by e-new.0x20.net (8.14.5/8.14.5/Submit) id r4SKOF1B044570; Tue, 28 May 2013 22:24:15 +0200 (CEST) (envelope-from lars) Date: Tue, 28 May 2013 22:24:15 +0200 From: Lars Engels To: Michael Gmelin Subject: Re: The vim port needs a refresh Message-ID: <20130528202415.GC9788@e-new.0x20.net> References: <20130524212318.B967FE6739@smtp.hushmail.com> <51A4ADCC.4070204@marino.st> <20130528151600.4eb6f028@gumby.homeunix.com> <20130528195137.312c58d9@bsd64.grem.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nmemrqcdn5VTmUEE" Content-Disposition: inline In-Reply-To: <20130528195137.312c58d9@bsd64.grem.de> X-Editor: VIM - Vi IMproved 7.3 X-Operation-System: FreeBSD 8.3-RELEASE-p5 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: ports@freebsd.org, RW X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 May 2013 20:24:17 -0000 --nmemrqcdn5VTmUEE Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 28, 2013 at 07:51:37PM +0200, Michael Gmelin wrote: > On Tue, 28 May 2013 15:16:00 +0100 > RW wrote: >=20 > > On Tue, 28 May 2013 15:14:52 +0200 > > John Marino wrote: > >=20 > > > All > > > patches only take 74 seconds to download[2] so there is no sympathy > > > for your obviously single data point anecdote,=20 > >=20 > > Well at the point you provided one data-point there was only one data > > point. And it was like pulling teeth to get you to eliminate the > > alternative explanations. Was it really too much to ask that you > > provided some actual evidence.=20 > >=20 > > > you're clearly doing > > > something wrong. You need to stop complaining and start think about > > > folks with slow connections[3] who also rebuild Vim frequently.=20 > >=20 > > Don't make things up. I never said anything about frequent rebuilds, > > the patches all get redownloaded on the next rebuild.=20 >=20 > The real issue is not the number of patches, but the fact that every > single patch is downloaded by invoking the fetch(1) command, creating > lots of overhead not limited to the fetch command itself. The ports > system wasn't designed for such an amount of distfiles in a single > port I guess. >=20 > I just timed fetching the patches through ports vs. fetching over > HTTP/1.1 using ftp/curl vs calling fetch directly. The VIM tarball was > already downloaded, so this is really just the patches (plus > downloading 6mb is barely noticeable on a fast line). It's a slow > machine on a fast line. >=20 > Fetch: > [user@server /usr/ports/editors/vim]$ time sudo make fetch > .... > real 4m57.327s > user 0m17.010s > sys 0m39.588s >=20 > Curl: > [user@server /tmp]$ longcurlcommandline=20 > .... > real 0m15.291s > user 0m0.026s > sys 0m0.272s >=20 > Fetch on the command line (after initial make fetch, so this is only > measuring transmission of the files): > cd /usr/ports/editors/distfiles > time for name in 7.3.*; do > fetch http://artfiles.org/vim.org/patches/7.3/$name > done > .... > real 1m25.329s > user 0m0.660s > sys 0m3.174s >=20 > So just the fact we're invoking fetch for every file costs us about one > minute - I assume the time lost is much bigger on a slow line with > long latency. The remaining 3.5 minutes are spent somewhere in the > ports infrastructure and clearly depend on the performance of the > machine used. For comparison I timed "make fetch" on a reasonably fast > server (good IO, fast datacenter connection), make fetch still took > about 120 seconds(!). >=20 > So the bottomline is: > - Using HTTP/1.1 and keepalive could safe a lot of time > - The ports infrastructure creates a lot of overhead per patch file >=20 > Maybe there's something we can do to improve the situation. >=20 > Cheers, > Michael >=20 > PS: I don't use vim myself and have no stake in this discussion > whatsoever. Someone in this thread proposed to change the port to use phttpget, so I gave it a try using a German mirror nearby with 6 Mbit/s downlink: $ time /usr/libexec/phttpget ftp.vim.ossmirror.de $(eval echo /pub/vim/patc= hes/7.3/{$(make -C /usr/ports/editors/vim -VPATCHFILES | sed 's/\ /,/g')}) http://ftp.vim.ossmirror.de//pub/vim/patches/7.3/7.3.001: 200 OK http://ftp.vim.ossmirror.de//pub/vim/patches/7.3/7.3.002: 200 OK http://ftp.vim.ossmirror.de//pub/vim/patches/7.3/7.3.003: 200 OK http://ftp.vim.ossmirror.de//pub/vim/patches/7.3/7.3.004: 200 OK http://ftp.vim.ossmirror.de//pub/vim/patches/7.3/7.3.005: 200 OK [...] http://ftp.vim.ossmirror.de//pub/vim/patches/7.3/7.3.974: 200 OK http://ftp.vim.ossmirror.de//pub/vim/patches/7.3/7.3.984: 200 OK http://ftp.vim.ossmirror.de//pub/vim/patches/7.3/7.3.985: 200 OK http://ftp.vim.ossmirror.de//pub/vim/patches/7.3/7.3.1000: 200 OK real 0m12.509s user 0m0.154s sys 0m0.089s That's really nice!=20 Compare this to the current version using fetch(1): time make PATCH_SITES=3Dhttp://ftp.vim.ossmirror.de/pub/vim/patches/7.3/ f= etch =3D=3D=3D> Found saved configuration for vim-7.3.669_1 =3D=3D=3D> vim-7.3.1014 depends on file: /usr/local/sbin/pkg - found =3D> 7.3.002 doesn't seem to exist in /usr/ports/distfiles/vim. =3D> Attempting to fetch http://ftp.vim.ossmirror.de/pub/vim/patches/7.3/7.= 3.002 7.3.002 100% of 1610 B 16 MBps 00m= 00s =3D> 7.3.003 doesn't seem to exist in /usr/ports/distfiles/vim. =3D> Attempting to fetch http://ftp.vim.ossmirror.de/pub/vim/patches/7.3/7.= 3.003 7.3.003 100% of 1299 B 1281 kBps 00m= 00s =3D> 7.3.004 doesn't seem to exist in /usr/ports/distfiles/vim. [...] =3D> 7.3.984 doesn't seem to exist in /usr/ports/distfiles/vim. =3D> Attempting to fetch http://ftp.vim.ossmirror.de/pub/vim/patches/7.3/7.= 3.984 7.3.984 100% of 1706 B 2852 kBps 00m= 00s =3D> 7.3.985 doesn't seem to exist in /usr/ports/distfiles/vim. =3D> Attempting to fetch http://ftp.vim.ossmirror.de/pub/vim/patches/7.3/7.= 3.985 7.3.985 100% of 1691 B 14 MBps 00m= 00s =3D> 7.3.1000 doesn't seem to exist in /usr/ports/distfiles/vim. =3D> Attempting to fetch http://ftp.vim.ossmirror.de/pub/vim/patches/7.3/7.= 3.1000 7.3.1000 100% of 1637 B 1715 kBps 00m= 00s =3D=3D=3D> Fetching all distfiles required by vim-7.3.1014 for building Total time : 3:48.55s CPU utilisation (percentage) : 54.5% That's much slower using the same mirror. --nmemrqcdn5VTmUEE Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlGlEm8ACgkQKc512sD3afhN9QCgllxb6HHneys+65No3FHoDFe6 vhAAoIp6ciekLeaSIdArhC4Gxr+QwbT5 =+Xvf -----END PGP SIGNATURE----- --nmemrqcdn5VTmUEE--