I'm configuring 300000 pages for SORTHEAP and 1.8 mln pages for SHEAPTHRES. Snapshots show that during the batch stream the maximum of only 175000 pages of sort heap are allocated per partition (all private sorts), for a total of just over 700000 pages for the entire database. At the same time there still are sort overflows.
I realize that I may not be able to eliminate overflows altogether, but why DB2 is not using all available sort heap? Are there any other parameters that I need to update along with sortheap/sheapthres?
The only thing I can add is that intra_parallel and sheapthres_shr come into play to enable shared sorts. But intra_parallel is only needed to be turned on if you have CPUs >> Partition.
Other then that, it may be worth checking, that you stack is 64-bit, and there are no hidden limits, such as user limits, preventing db2 using all the memory it needs.