optimal number of threads - PDF doc