in reply to Sort taking a long time to clean up

Can you check if your computer started swapping memory to disk when doing the sort? I assume that the sort will need additional memory to hold intermediary results and you could easily cross that magic boundary where you swap memory to disk.

"Cleaning up" would then involve reading the data back from disk to fill the memory again with the data for other application which were temporarily swapped out of your computer's memory when the sort ran.

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

  • Comment on Re: Sort taking a long time to clean up

Replies are listed 'Best First'.
Re^2: Sort taking a long time to clean up
by itub (Priest) on Sep 15, 2004 at 21:30 UTC
    I don't think it's swapping. The process takes about 70 MB and there are still at least 100 MB left. The $N=500_000 process with sort takes less memory than the $N=5_000_000 process with no sort, but the latter is faster.