net rpc vampire performance

Stefan Gohmann gohmann at
Thu Jul 7 05:05:39 GMT 2005

Am Mittwoch, 6. Juli 2005 23:11 schrieb Jim McDonough:
> Stefan and Don,
> I've committed a version of Don's code to svn.  Please take a look.  Some
> changes I made:
>  - Removed a number of index parms sent to functions, where a full array+an
> index was passed in, when really we only wanted that one indexed item from
> the array, and instead only sent the array element itself.
>  - eliminated the smb.conf structure, since much of this just duplicated
> the existing smb.conf parms.
>  - simplified the "ldif_file" filename logic (removed allocation/free,
> since we already have the data and just can reassign the pointer to the
> appropriate name)
>  - Added help text in "net rpc help vampire"
> Stefan, do you think you could autodetect the xml libs instead of requiring
> the extra ./configure parm?

The extra ./configure parm isn't required:

$ ./configure --cache-file=/dev/null  | grep "checking for xml2-config"
checking for xml2-config... /home/stegoh/kde3.4.1/bin/xml2-config
$ rgrep HAVE_XML include/*.h
include/config.h:#define HAVE_XML2 1
$ mv /home/stegoh/kde3.4.1/bin/xml2-config \
$ ./configure --cache-file=/dev/null  | grep "checking for xml2-config"
checking for xml2-config... no
$ rgrep HAVE_XML include/*.h
include/config.h:/* #undef HAVE_XML2 */
$ ./configure --cache-file=/dev/null  --enable-vampire-xml | grep "checking 
for xml2-config"
checking for xml2-config... no
configure: error: xml2 support required but xml2-config not located.  Make 
sure xml2-devel related files are installed.

> Changes I'd like to see still:
>  - Improve the parsing of the commandline...perhaps pull "ldif" "xml" and
> "help" out one level and pass in a la the net command table functions.
>  - Better detection of suffix parms...right now you can get some funky
> output if your "ldap suffix" is included in your "ldap user suffix" parm,
> for example.  We already can handle this in smbd, so it should be possible
> here too (in fact, the user records themselves work just fine, it's only
> the containers that get hosed).
>  - elimination of the "cat" command in the code...perhaps we can be smarter
> about how we process the deltas and do all the adds first, then all the
> modifies, so we don't have to concatenate separate output later
> I didn't think these were enough to stop inclusion in the source tree,
> because they don't break any existing code and don't take you out of
> just might hit a bump or to on the way.  However, I've
> been able to do some migrations that took 8+ hours in just 5 minutes using
> this code.
> ----------------------------
> Jim McDonough
> IBM Linux Technology Center
> Samba Team
> 6 Minuteman Drive
> Scarborough, ME 04074
> jmcd at us dot ibm dot com
> jmcd at samba dot org
> Phone: 1-877-228-1846
> IBM tie-line: 349-5335

Stefan Gohmann     <gohmann at>       fon: +49 421 22 232- 0
Entwicklung        Linux for Your Business
Univention GmbH     fax: +49 421 22 232-99

More information about the samba-technical mailing list