Comment 11 for bug 1567557

Revision history for this message
Stéphane Graber (stgraber) wrote : Re: Performance degradation of "zfs clone" when under load

Creating 100 clones
Took: 4 seconds (25/s)
Creating 200 clones
Took: 13 seconds (15/s)
Creating 400 clones
Took: 46 seconds (8/s)
Creating 600 clones
Took: 156 seconds (3/s)

```
#!/bin/sh
zfs destroy -R castiana/testzfs
rm -Rf /tmp/testzfs

zfs create castiana/testzfs -o mountpoint=none
zfs snapshot castiana/testzfs@base
mkdir /tmp/testzfs

clone() {
    echo "Creating ${1} clones"
    BASE=$(date +%s)
    for i in $(seq ${1}); do
        UUID=$(uuidgen)
        zfs clone castiana/testzfs@base castiana/testzfs-$UUID -o mountpoint=/tmp/testzfs/${UUID}
    done
    END=$(date +%s)
    TOTAL=$((END-BASE))
    PER=$((${1}/${TOTAL}))
    echo "Took: $TOTAL seconds ($PER/s)"
}

clone 100
clone 200
clone 400
clone 600
```

That's on an up to date artful system. I'll do a similar test on an up to date xenial system.