function getProcessCount(total) {
	if (total < 2) {
		return 1;
	}
	if (total > 80) {
	    return parseInt(total / 30);
	}
	return 2;
}

function getThreadCount(total) {
	if (total < 2) {
		return 1;
	}
        if (total > 80) {
	    return parseInt(total / (parseInt(total / 30)));
        }
	return parseInt(total / 2 + 0.5);
}

function getProcessCount(total) {
	if (total < 2) {
		return 1;
	}
	
	var processCount = 2;

	if (total > 80) {
		processCount = parseInt(total / 40) + 1;
	}
	
	if (processCount > 20) {
		processCount = 20;
	}
	return processCount;
}

function getThreadCount(total) {
	var processCount = getProcessCount(total);
	return parseInt(total / processCount);
}

Modify process and thread calc to support vuser more than 600.