QUOTE
500,000 directory entries
Man you have alot of pages, huh? ;-)
First: on Linux every directory is like a file in general, it means it needs storage for the name and for general data, let's say if that would be 32 Bytes, you would have 16 Mbytes just of useless folder data. I'm not aware of how much folders the system can handle, but you can guess from that, that you will cause the machine not to be very fast with that many folders (if they are below one main folder ,you will cause it surely to hang for awhile, while accessing the structure).
Just with a short view to your 500,000 numbers, i'm sure that whatever you want to do can be done better than creating so many folders. Like having a Database or Just have some information compressed together etc. etc.
If you explain what you are planning to create, we maybe can give you some better solutions than your mass-folder-project