Skip to contentSkip to conversation

Severe VFS Performance Issues 2.6 with > 95000 directory entries

DISCUSSION Jeff V. Merkey 4 participants 8 messages Nov 13, 2005

lore
Share & tools
lore
#0 lore raw

The subject line speaks for itself. This is using standard VFS readdir and lookup calls through the VFSwith ftp. Very poor. It appears dcache related since longer file names proportionately take longer based on the size of the name. My lookup routines use static pinned tables in memory, and are very fast. VFS peformance non-ftp are reasonable, but still have problems with the number of entries
in a directory gets above 50,000.

Jeff

#1 lore raw
Quoted 3 lines · Jeff V. Merkey

The subject line speaks for itself. This is using standard VFS readdir
and lookup calls through the VFSwith ftp. Very poor.

Reiser4 works fine with 100M entries in a directory, so VFS is not a bottleneck here.

[...]

Quoted 2 lines

Jeff

Nikita.

author
#2 lore raw
Quoted 8 lines · Nikita Danilov
Quoted 2 lines · Jeff V. Merkey

The subject line speaks for itself. This is using standard VFS readdir and lookup calls through the VFSwith ftp. Very poor.

Reiser4 works fine with 100M entries in a directory, so VFS is not a bottleneck here.

how about with ftp running on top? Try running FTP in directory with 100M entries. See how long it takes to return the data to the remote client for a dir listing.

Jeff

Quoted 9 lines

[...]

Quoted 2 lines

Jeff

Nikita.

#3 lore raw
Quoted 7 lines · jmerkey
Quoted 5 lines · Nikita Danilov
Quoted 3 lines · Jeff V. Merkey

The subject line speaks for itself. This is using standard VFS readdir
and lookup calls through the VFSwith ftp. Very poor.

Quoted 8 lines
Quoted 4 lines

Reiser4 works fine with 100M entries in a directory, so VFS is not a bottleneck here.

how about with ftp running on top? Try running FTP in directory with 100M entries. See how long it takes to return the data to the remote client for a dir listing.

Why are you thinking that it is VFS that is causing performance degradation here?

Quoted 8 lines

Jeff

Quoted 5 lines

[...]

Quoted 2 lines

Jeff

Nikita.

Quoted 3 lines
Quoted 3 lines
author
#4 lore raw
Quoted 12 lines · Nikita Danilov
Quoted 11 lines · jmerkey
Quoted 8 lines · Nikita Danilov
Quoted 2 lines · Jeff V. Merkey

The subject line speaks for itself. This is using standard VFS readdir and lookup calls through the VFSwith ftp. Very poor.

Reiser4 works fine with 100M entries in a directory, so VFS is not a bottleneck here.

Quoted 8 lines
Quoted 3 lines

how about with ftp running on top? Try running FTP in directory with 100M entries. See how long it takes to return the data to the remote client for a dir listing.

Why are you thinking that it is VFS that is causing performance degradation here?

Because I see the same degredation local vs. remote. My path for readdir and lookup are short. I dynamically (via math) create the file names on the fly and lookup simply reads a static table in memory for inode number. One thing I can check are calls to igetblk inside of lookup.

Jeff

Quoted 17 lines
Quoted 8 lines

Jeff

Quoted 5 lines

[...]

Quoted 2 lines

Jeff

Nikita.

Quoted 3 lines
Quoted 3 lines
#5 lore raw
In reply to jmerkey
Quoted 6 lines · jmerkey
Quoted 4 lines · Nikita Danilov
Quoted 1 line · Jeff V. Merkey
Quoted 1 line

The subject line speaks for itself. This is using standard VFS

readdir > and lookup calls through the VFSwith ftp. Very poor.

Quoted 8 lines
Quoted 4 lines

Reiser4 works fine with 100M entries in a directory, so VFS is not a bottleneck here.

how about with ftp running on top? Try running FTP in directory with 100M entries. See how long it takes to return the data to the remote client for a dir listing.

What filesystem are you using? If it's ext3 without dirindex turned on, that would definitely explain it.

-Doug

author
#6 lore raw
Quoted 28 lines · Douglas McNaught
Quoted 18 lines · jmerkey
Quoted 14 lines · Nikita Danilov
Quoted 3 lines · Jeff V. Merkey
Quoted 3 lines

The subject line speaks for itself. This is using standard VFS

readdir > and lookup calls through the VFSwith ftp. Very poor.

Reiser4 works fine with 100M entries in a directory, so VFS is not a bottleneck here.

Quoted 5 lines

how about with ftp running on top? Try running FTP in directory with 100M entries. See how long it takes to return the data to the remote client for a dir listing.

Quoted 7 lines

What filesystem are you using? If it's ext3 without dirindex turned on, that would definitely explain it.

-Doug

Thanks. I'll enable dirindex.

Jeff

#7 lore raw
In reply to Douglas McNaught
Quoted 22 lines · Douglas McNaught
Quoted 18 lines · jmerkey
Quoted 14 lines · Nikita Danilov
Quoted 3 lines · Jeff V. Merkey
Quoted 3 lines

The subject line speaks for itself. This is using standard VFS

readdir > and lookup calls through the VFSwith ftp. Very poor.

Reiser4 works fine with 100M entries in a directory, so VFS is not a bottleneck here.

Quoted 11 lines
Quoted 5 lines

how about with ftp running on top? Try running FTP in directory with 100M entries. See how long it takes to return the data to the remote client for a dir listing.

What filesystem are you using? If it's ext3 without dirindex turned on, that would definitely explain it.

I just noticed the I_NEW flag for iget which prevents multiple calls to refresh the inode. There's another code section where I update the filesize field after I call iget from lookup. This does not explain it either since I use math here to hash and post into the inode. I am still convinced that either in userspace or in the kernel VFS, there's still a case where readdit goes linear and starts to exhibit (O)(Log 2(N)) behavior as the directory gets large (above 50,000 entries).

Jeff