Such PLT generation fully utilises all available cores of CPU, making impossible any significant use of computer, and in some cases causing CPU overheat—laptops, for example, just shut down.
So, how to make Dialyzer use no more than, say, 30% of CPU?
nice wouldn’t work here, as overheat still may be a problem (it just sets process’ niceness). There is utility (
cpulimit) that limits real CPU usage via sending
SIGCONT to process.
PLT generation with
dialyzer, limited by
cpulimit, will look like this:
$ dialyzer --build_plt --apps kernel erts stdlib crypto other apps here & $ cpulimit --pid=$! --limit=30
There are many different approaches to getting process’ PID that use different utilities, but, in my opinion, this one (start process in foreground and use
$! to get PID) is simplest and requires no external utilities (such as
pidof; by the way,
cpulimit supports limiting by executable name). Note that development version can lauch process by itself (thus no need to tell it about process’ PID or executable).
This blog is about things I encounter while doing web and non-web software development.