[OpenAFS] OpenAFS failing rmdir performance

Matthias Braun matthias.braun@kit.edu
Fri, 08 Oct 2010 23:03:11 +0200


Hi,

I'm hitting a strange performance problem when I use git with "git gc"
for a project on an openafs volume. I narrowed the problem down to the
following: openafs gets incredibly slow when trying to rmdir lots of
directories which are not empty. I can reproduce the problem easily with
the following Script:

#!/bin/sh
set -e

echo "Creating directories..."
I=0
while [ "$I" != 256 ]; do
    DIR="$(printf "%02x\n" "$I")"
    echo "$DIR"
    mkdir -p "test/$DIR"
    touch "test/$DIR/bla"
    I=$(($I + 1))
done

# The following is horribly on our openafs installation
echo "Try to remov directories"
for I in test/??; do
    ! rmdir "$I"
done





The first few rmdirs are fast after that it takes around a second or so
per rmdir... This does only happen for non-empty directories. Is there a
conceptual problem in AFS for this or is this a strange kind of bug?

Greetings,
	Matthias Braun