So far at my work I've seen two cases where zfs is slow at creating files. The first time was where the SAN device accepted cache flushing from the O/S as explained in my old post.
The other case has been when a zfs file system just had too many files. Although zfs can have almost an unlimited amount of files, it does take performance hits when it gets up high enough. Here was the setup:
- Solaris 10
- zpool was 97% full at 2TB
- two zfs file system in the zpool
- 22 million files in zfs file system A
- hundreds of files in zfs file system B
- 15 snapshots total, where oldest one was over 40GB
- Touching a file in zfs file system A was not instant. Made me think that everything in the zpool was slow until…
- Touching a file in zfs file system B was instant. Now I was confused since I figured everything in the zpool was affected. This was a mistake considering that the zpool is just the root of the zfs file systems.
- Destroying the oldest snapshot (also the biggest) managed to bring the usage down to 93% or so and also got rid of the slow creation of files.