fixed sort for max size partitions