Painfully slow compilation (read: "make buildworld buildkernel") on not-so-weak system

From: Lev Serebryakov <lev_at_FreeBSD.org>
Date: Sat, 8 Dec 2018 14:13:03 +0300
Hello Freebsd-hackers,

 I'm experiencing very strange situation on my lab system which is
E3-1220v2, 8GiB of RAM and 850 EVO SATA SSD (with single ZFS pool).

 It runs CURRENT r341157. Kernel is built *without* INVARIANTS and other
heavy debug aids.

 Everything works great — but compilation. "make -j *1* buildkernel" takes
forever and each compiler invocation takes up to 10 seconds. For example,
I've clocked compilation of sys/dev/aic7xxx/aic7xxx_93cx6.c by stopwatch and
it takes 9 seconds. Please note, it is SINGLE JOB build. If I run "make
-j4" it will be much longer for each compiler out of 4. And all this time
"cc" / "c++" consume 100% of CPU.

 Even when build is single-job, system becomes unresponsive. With
4-job build running it could takes up to minute to switch screen's windows!

 Another strange thing I noticed: when system is in such state, "top -SH"
shows that sometimes very low-profile processes, like clock software
interrupt (!) could consume large amount of CPU for short periods time. When
system is idle there never will be "intr{swi4: clock (0)}" consuming 55% CPU
for one "frame" or sshd, or screen itself.

 I'm completely lost. Is it problem of software? Hardware? If it is
hardware problem what should I blame?

 I've checked all "standard" places — CPU is not throttling, SSD looks
perfectly Ok according to SMART and there is no complains from AHCI driver
about timeouts and such, system doesn't start to use swap.

-- 
Best regards,
 Lev                          mailto:lev_at_FreeBSD.org
Received on Sat Dec 08 2018 - 10:13:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:19 UTC