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.
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 testzfs@ base
zfs snapshot castiana/
mkdir /tmp/testzfs
clone() {
UUID=$ (uuidgen) testzfs@ base castiana/ testzfs- $UUID -o mountpoint= /tmp/testzfs/ ${UUID} $((END- BASE)) $((${1} /${TOTAL} ))
echo "Creating ${1} clones"
BASE=$(date +%s)
for i in $(seq ${1}); do
zfs clone castiana/
done
END=$(date +%s)
TOTAL=
PER=
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.