foowtf
foowtf

Reputation: 399

Performance when accessing file system metadata concurrently

I have to collect certain attributes of files (modification date and so on). But there are many small files to analyze.

My question is: would it be more performant if I read, say, 3 or 4 files at the same time? If you access a file on the web this is better since you have to wait for the server to respond. But what about a harddisk? Is the concurrent strategy faster if the files are already cached by the harddisk?

Upvotes: 2

Views: 84

Answers (1)

thiton
thiton

Reputation: 36059

You are accessing metadata, it seems (mtime), which are stored in the file's inode and therefore in the file system. Your limiting factor should (in UNIX terms) be the syscall to get the stat information, which could profit from parallelization.

Upvotes: 2

Related Questions