It would be interesting to know how well
Spectrum Scale large directory and small file features work in these sort
of DB-ish applications.
You might want to optimize by creating
a file system provisioned and tuned for such application...
Regardless of file system, `ls
-1 | grep ...` in a huge directory is not going to be a good idea. But
stats and/or opens on a huge directory to look for a particular file should
work pretty well...