Hi,
Software builds are typically bottlenecked by link time(disk bound)
and not compile time(processor bound).
I've successfully complied AOSP on intel i5-4210(hyper-threaded dual
core) @1.7 GHz and 8GB of RAM(and a large swap space of course),
I don't think there is any issue with your hardware.
I would suggest moving the source code to an SSD that is connected to
the MotherBoard of the computer via SATA interface or (NVMe M.2 if
possible) instead of using an external SSD , reason being there is lot
of linking involved while building AOSP(or any project for that
matter).
I'm assuming your external SSD is connected to your PC via USB 3.0
interface or USB-C interface , either of which would be slower than
SATA/NVMe M.2 and would require more processor time to perform
linking, that might be a reason why your CPU usage is so outrageous!
:P
Thanks and Regards,
Shubham Tomar