Points:
It looks like what you are looking for is external sorting.
Basically, you sort small chunks of data first, write it back to the disk and then iterate over those to sort all.