title: External sorting of lines. Сount of files to merge?
body: <p>I need to sort the rows in the file in the minimum time (tens of GB) on a PC. I should use N-way merge sorting, right? How do choose the number N (the number of files to merge at a time)? Should I measure delays when reading or writing and tune N? Or get disk information from the system? If i have SSD, could I merge all sorted part at once (The program need to somehow determine is it an SSD)? What other optimizations can be?</p>