February 2011

Technical Computing

Filesystems and Performance - Part Two: Metadata Performance.

by Scott Nolin

Metadata performance problems are most likely on servers that routinely provide a large number of files. While not as common as general I/O performance issues discussed last month these computers are typically performing a high-profile task and can be particularly tricky to diagnose and solve. If you handle terabytes of data and millions of files this is a good topic to understand for your work.

What is file system metadata?

In general metadata is simply information about data. File system metadata for the linux/unix systems we are typically concerned includes inodes and dentries. The inode stores information such as ownership, permissions, size, and type. Dentry stands for “directory entry” and is used to maintain the relationship between file names, inodes, and directories.

Often sysadmins may talk about “inode problems” to mean file system metadata in general, though the problem likely also involves dentries.

Symptoms of Metadata Problems

The classic symptom of a file system metadata problem is when the result of an “ls” or ftp directory listing command takes an extremely long time, but in other ways the system is behaving normally. For example:  you can download a large file at a high rate of speed,  but listing the directory that file sits in takes a very long time.

Due to caching this symptom may go away temporarily when you re-list the directory, but after some time passes it may once again be very slow.

Tuning File System Metadata

Once file system metadata has been determined to be a problem, typically you would attempt to tune the system for better performance. Usually the problem is related to the metadata caching system. Often this caching is handled by the operating system but some file systems maintain their own metadata cache.

System tuning is naturally highly dependent on the particular OS and filesystem. For example, in the past I have tuned the Solaris operating system to provide a larger inode cache to improve metadata performance. With Solaris this was very straightforward. However, in some cases it can be much less so. In particular, Jesse Stroik has discovered some real challenges with Linux and how it handles caching.

Interested in More?

If you have specific questions or suspect you are experiencing a problem with metadata performance contact us in Technical Computing.

Back to Front Page

building top