I have a single server running some code that creates millions of small files all in a single directory. At first, the code runs extremely fast. After a day or so, it begins to slow down quite a bit. I'm trying to figure out whether this is an issue with the code, or whether this is an issue with the number of files in the directory.
The code itself creates a file if one does not exist, then opens the file and writes a single line to it. If the file does exist, it will open the file and append a single line to it.
With that said, I've been benchmarking my code and making changes as need be, but I'd like to benchmark XFS as well to see if that is the bottleneck. My question is, how do I benchmark the read/write performance of XFS?