Quantcast
Channel: Active questions tagged zfs - Server Fault
Viewing all articles
Browse latest Browse all 143

ZFS folder very slow after having many files

$
0
0

I am running Ubuntu 24.04 using ZFS for my filesystems. This is on a laptop whose only storage device is a WD Black SN850X NVMe card. The default Ubuntu installation process configured two ZFS pools:

                                          capacity     operations     bandwidth pool                                    alloc   free   read  write   read  write--------------------------------------  -----  -----  -----  -----  -----  -----bpool                                    187M  1.69G      0      0    381    204  86349523-abd9-7a45-ab84-60d7622c240f   187M  1.69G      0      0    381    204--------------------------------------  -----  -----  -----  -----  -----  -----rpool                                    286G   634G     13     31  1.11M   796K  cc31ec4d-1dd2-ed4f-9f90-fa99ec5aa3a2   286G   634G     13     31  1.11M   796K--------------------------------------  -----  -----  -----  -----  -----  -----

/tmp is part of the root mount, which is in rpool.

My /tmp folder briefly had over 2 million files in it due to a bug in some code. When there were this many files in it, performance took a nosedive -- even just listing files (without sorting) would pause for upwards of a second. I removed most of the files, and things are back down to a manageable level now. But, operations on the list of files in /tmp are still slow.

When I time ls --sort=none on e.g. /bin, which has 2,842 entries it, I get something like:

real    0m0.088suser    0m0.001ssys     0m0.075s

But the same command on /tmp, which currently has 4,444 entries:

real    0m0.472suser    0m0.007ssys     0m0.446s

It seems that briefly housing 2 million files has left a permanent impact on the structure of /tmp? Is there a way to fix this? Do I just need to make a new /tmp and cut over to it??


Viewing all articles
Browse latest Browse all 143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>