Wednesday, August 18, 2010

GSoC is over!

The Google Summer Of Code 2010 is over since August the 16th.
Fortunately, my project is completed :
We can now create a set of package, aka. a complete package via the pkg_complete(1) utility.
pkg_add(1) and pkg_info(1) support this new format of package.
These two tools also now use libarchive(3) instead of extracting the packages archives in a temporary directory so one can expect performances improvements.

If you want to test it, here is the patch:
pkg_complete.diff.gz

Caution: test it on a sandbox jail, just in case ;)
I'd like to have bug reports, especially about files permissions, symlink creations, etc

Sunday, July 18, 2010

pkg_add with libarchive: some quick benchmarks

For my GSoC, I modified pkg_add(1) to use libarchive(3) instead calling tar(1) via system(3).
The benefit is a faster execution time.

Here are the numbers (old vs new):
  • for bash (a 896K archive): 0.40s vs 0.25s
  • for emacs (a 28M archive): 25s vs 15s
The old code extracted the archive in a temporary folder and moved the files to their final destination later in the installation process, while the new code extract the files directly to their final destination. As expected, it is faster with libarchive.

It is also interesting to bench the "failure" of pkg_add when the package is already installed (old vs new)
  • for bash: 0.33s vs 0.09s
  • for emacs: 10s vs 0.5s
The difference is huge, especially for big packages. That's because the new code doesn't have to extract the whole archive to check if the package is already installed (as well as checking  for conflicts and missing dependencies): it extracts the package manifest in memory and process it before continuing the installation.

Monday, May 24, 2010

Google Summer Of Code 2010

I've been accepted by Google to participate in Google Summer Of Code 2010.
I'll work for The FreeBSD Project on the package management tool.