use sysconf to set number of threads