Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 3EA392E37D6 for ; Wed, 6 Feb 2008 15:59:43 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 70713-01-10 for ; Wed, 6 Feb 2008 15:59:29 -0400 (AST) Received: from hi-media.com (9.140-14-84.ripe.coltfrance.com [84.14.140.9]) by postgresql.org (Postfix) with ESMTP id 24F422E35C2 for ; Wed, 6 Feb 2008 15:59:11 -0400 (AST) Received: from dalistar.local (cac94-7-82-243-27-82.fbx.proxad.net [82.243.27.82]) by hi-media.com (Postfix) with ESMTP id 32C40F0298; Wed, 6 Feb 2008 20:56:42 +0100 (CET) From: Dimitri Fontaine To: pgsql-performance@postgresql.org Subject: Re: Benchmark Data requested --- pgloader CE design ideas Date: Wed, 6 Feb 2008 20:59:04 +0100 User-Agent: KMail/1.9.7 Cc: Greg Smith References: <1202150236.4252.521.camel@ebony.site> <200802061837.41911.dfontaine@hi-media.com> In-Reply-To: <200802061837.41911.dfontaine@hi-media.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4972429.4m8vBoIAIA"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200802062059.07174.dfontaine@hi-media.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/79 X-Sequence-Number: 28621 --nextPart4972429.4m8vBoIAIA Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Le Wednesday 06 February 2008 18:37:41 Dimitri Fontaine, vous avez =E9crit= =A0: > Le mercredi 06 f=E9vrier 2008, Greg Smith a =E9crit=A0: > > If I'm loading a TB file, odds are good I can split that into 4 or more > > vertical pieces (say rows 1-25%, 25-50%, 50-75%, 75-100%), start 4 > > loaders at once, and get way more than 1 disk worth of throughput > > reading. > > pgloader already supports starting at any input file line number, and lim= it > itself to any number of reads: In fact, the -F option works by having pgloader read the given number of li= nes=20 but skip processing them, which is not at all what Greg is talking about he= re=20 I think. Plus, I think it would be easier for me to code some stat() then lseek() th= en=20 read() into the pgloader readers machinery than to change the code=20 architecture to support a separate thread for the file reader. Greg, what would you think of a pgloader which will separate file reading=20 based on file size as given by stat (os.stat(file)[ST_SIZE]) and number of= =20 threads: we split into as many pieces as section_threads section config=20 value. This behaviour won't be available for sections where type =3D text and=20 field_count(*) is given, cause in this case I don't see how pgloader could= =20 reliably recognize a new logical line beginning and start processing here. In other cases, a logical line is a physical line, so we start after first= =20 newline met from given lseek start position, and continue reading after the= =20 last lseek position until a newline. *:http://pgloader.projects.postgresql.org/#_text_format_configuration_param= eters Comments? =2D-=20 dim --nextPart4972429.4m8vBoIAIA Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBHqhGLlBXRlnbh1bkRAm2dAJ9JI+MnukQbl0L/MgzwPkmL8LBT/QCfar20 l9B6TszFnTTBn80qQ5CKvxI= =8pBO -----END PGP SIGNATURE----- --nextPart4972429.4m8vBoIAIA--