Improving prep_buildtree used in VPATH builds - Mailing list pgsql-hackers

From Gurjeet Singh
Subject Improving prep_buildtree used in VPATH builds
Date
Msg-id AANLkTinw0HL+jQmrtwXC9Y2tqhcfHFgFekxyyfYGvQrB@mail.gmail.com
Whole thread Raw
Responses Re: Improving prep_buildtree used in VPATH builds  (Robert Haas <robertmhaas@gmail.com>)
Re: Improving prep_buildtree used in VPATH builds  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Improving prep_buildtree used in VPATH builds  (Greg Smith <greg@2ndquadrant.com>)
List pgsql-hackers
Attached is the patch that tries to speedup prep_buildtree script, which is used in VPATH builds, from our configure script.

The idea is to ask `find` to emit directory listing in depth-first order so that the `mkdir -p` will create the deepest directory first and any subsequent `mkdir -p` on an intermediate directory will not have to do anything.

Currently I am seeing a performance improvement of this script by only about 500 ms; say 11.8 seconds vs. 11.3 secs. But I remember distinctly that yesterday I was able to see an improvement of 11% on the same virtual machine, averaged on multiple runs; 42 sec vs 37 sec. It might be the case that the host OS or my Linux virtual machine were loaded at that time and the filesystem could not cache enough inodes.

Seems like it would improve performance in general, but more so under load conditions when you actually need it. I am not sure if -depth option is supported by all incarnations of 'find'.

I have been away from Postgres development for quite a while, so would appreciate if someone could tell me if such a patch should be submitted for commitfest (since this is not actually a source patch).

Regards,
--
gurjeet.singh
@ EnterpriseDB - The Enterprise Postgres Company
http://www.EnterpriseDB.com

singh.gurjeet@{ gmail | yahoo }.com
Twitter/Skype: singh_gurjeet

Mail sent from my BlackLaptop device
Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: recovery.conf location
Next
From: David Christensen
Date:
Subject: Re: [COMMITTERS] pgsql: Still more tweaking of git_changelog.