So, 800KB per file, sounds like a good division. Nothing really stops you from using one giant file, of course. A matrix, at least one like yours that isn't sparse, can be considered a file of fixed length records, making random access a trivial matter.
If you do store it one file per row, I might suggest making a directory tree corresponding to decimal digits, so 0/0/0/0
through 9/9/9/9
.
Considerations one way or the other...
- is it being backed up? Do you have high-capacity backup media or something ordinary?
- does this file ever change?
- if it does change and it is backed up, does it change all at once or are changes localized?