# zfs poor performance with a lot of small files



## ro (Oct 19, 2012)

Hi all

My zfs version/pool status is:

```
# zpool upgrade -v | grep curr
This system is currently running ZFS pool version 28.
# zpool status v0zstorage
  pool: v0zstorage
 state: ONLINE
 scan: none requested
config:

        NAME           STATE     READ WRITE CKSUM
        v0zstorage     ONLINE       0     0     0
          mirror-0     ONLINE       0     0     0
            gpt/disk1  ONLINE       0     0     0
            gpt/disk2  ONLINE       0     0     0

errors: No known data errors
#
```
My host has amd64 kernel with 8Gb memory.

My problem is whery poor performance with a lot of small files.
I've few billions files in few thousands directories in one FS and can't change it. I've approximately 40Kbps speed on find access.
Is some tuning exists for this situation?

10x


----------



## User23 (Oct 19, 2012)

First, backup your data.

Read http://docs.oracle.com/cd/E19082-01/817-2271/ghbxt/index.html

Set the primarycache to cache only the metadata.

Buy a SSD and use it as L2ARC read cache.

Try out compression, it should give some boost too in your case, if you have enough CPU power.


----------



## ro (Nov 21, 2012)

I've try change different zfs settings like cache, block size etc - no effect.
I solved the problem attaching physical disks into pool.


----------



## singhsukhwinder (Nov 24, 2012)

ro said:
			
		

> I've try change different zfs settings like cache, block size etc - no effect.
> I solved the problem attaching physical disks into pool.



what is meant by "Attaching physical disks into pool" ?


----------



## Beeblebrox (Nov 24, 2012)

Was the pool near or over 75% - 80% full?


----------



## ro (Nov 25, 2012)

singhsukhwinder said:
			
		

> what is meant by "Attaching physical disks into pool" ?



I've create zraid



			
				Beeblebrox said:
			
		

> Was the pool near or over 75% - 80% full?



Yes, it was about 95% full


----------



## Beeblebrox (Nov 25, 2012)

> Yes, it was about 95% full


ZFS performance starts degrading severely if the pool gets > 80% full.


----------



## ro (Nov 27, 2012)

Beeblebrox said:
			
		

> ZFS performance starts degrading severely if the pool gets > 80% full.


10x for admonition.
Could you give any links to read about it?


----------



## Beeblebrox (Nov 27, 2012)

1. http://www.solarisinternals.com/wiki/index.php/ZFS_Best_Practices_Guide
*Look at section:* General Storage Pool Performance Considerations

2. After that, you can read Evil Tuning
http://www.solarisinternals.com/wiki/index.php/ZFS_Evil_Tuning_Guide


----------

