I could see one running out of inodes for a sizable dataset. Also, this seems like it would incur a good deal of iowait opening and closing all those fds.
Are you familiar with memcachedb? it's a berkleyDB back behind memcache with a lru key destruction in memcache that persists to disk using berkley db... you definitely don't need to re-invent the wheel here, you can possibly use innoDB as a key val store also if you can find the source/binaries for it....