Subject: pkgsrc on SMP machines
To: None <>
From: None <>
List: tech-pkg
Date: 12/15/2005 02:52:59
Hi, can anyone suggest a good strategy for utilising the most of SMP hardware
when building software from pkgsrc??

I have Sun E450 with 4X 250MHz UltraSparc II CPUs, most of the time the system
is 70% idle, because pkgsrc tends to use mainly 1 CPU.

Fixing all Makefiles to support -j > 1 seems quite unreasonable, I guess the
best solution would be to have a multithreaded compiler, which distributes
workload to a specified number of threads, i.e.:

cc -xO3 -xtarget=ultra -xthr=4 some_file.c

-xthr=4 would tell compiler to spawn up to 4 threads when invoked

I wonder if there are such compilers out there...