phdeniel/nfs-ganesha — Issue #15: FSAL_XFS - memory leak when in looping mkdir
Author: leoleung
Created: 2011-10-25 02:16:09+00:00
State: open

This should be in all other FSAL. (current 1.1.0 - HEAD)
see below shell script to reproduce.
Use another screen / tty connection to monitor memory usage.
[shell]$ dstat -c -y -p --fs -m -n -r -d --output dstat.csv 10

====================== CUT ==============
#!/bin/sh
# Test script to create
# - 100 level 1 directory
# - 100 level 2 directory (under each level 1)
# - total 10,000 directory
# - remove them
# start over again

MAXLOOP=1000

for i in `seq 1 $MAXLOOP`;
do
echo "loop -- $i -- `date`";
for j in `seq 1 100`;
do
mkdir -p /testdirleak/level1.dir$j;
for k in `seq 1 100`;
do
mkdir -p /level1.dir$j/level2.dir$k;
done;
done;
sleep 5;
rm -rf /testdirleak/*;
done

# EOF