Public bug reported: lshw on AArch64 hardware is painfully slow. This affects both lshw in current Ubuntu releases and vanilla upstream.
For a 48 core node, cpuinfo parsing added up to 30 seconds (8 lines per core in /proc/cpuinfo add up to 384 lines to parse). For a 96 core node, parsing took up to 5 minutes (!). I think the problem was introduced by [1], and can be summarized as: - CPU capabilities should be added only to the current CPU core, and NOT to all previous CPU cores parsed. My suggestion is dropping the loop in [1], thus calling the <addHint> and <describeCapability> only for currentcpu. I put together a small patch (basically removing the for loop in question) at [2] (or see attachement), which should be applied on top of version "02.16-2ubuntu1.3" from Ubuntu Trusty 14.04. After applying the patch at [2], parsing for the above system (48 cores) takes less than 1 second (instead of 30s), with the exact same results ... [1] https://github.com/lyonel/lshw/commit/beb89de5a3c10449fe73f1c77b2486d868e5bc9a #diff-f4010714738fa4cdd5999499579da2b3R217 [2] http://paste.ubuntu.com/16456620/ # lsb_release -rd Description: Ubuntu 14.04.4 LTS Release: 14.04 BR, Alex ** Affects: lshw (Ubuntu) Importance: Undecided Status: New ** Patch added: "AArch64-cpuinfo-Remove-redundant-cpu-caps-loop.patch" https://bugs.launchpad.net/bugs/1582181/+attachment/4663771/+files/AArch64-cpuinfo-Remove-redundant-cpu-caps-loop.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1582181 Title: AArch64: slow cpuinfo due to redundant loop To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/lshw/+bug/1582181/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
