[Bug 1582181] Re: AArch64: slow cpuinfo due to redundant loop
Ike Panhc
ike.pan at canonical.com
Wed Mar 21 08:19:07 UTC 2018
** Description changed:
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.
+ 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
+
+ [Impact]
+ lshw takes too long time on parsing /proc/cpuinfo on aarch64 system
+ It takes minutes on 96cores and almost 10min on 224cores system.
+
+ [Test Case]
+ `time sudo lshw` and it shall be less then 15sec
+
+ [Regression Potential]
+ This patch only affect code for aarch64. No regression possible on other aarch64 and has been tested on aarch64
+
+ [Other Info]
+ Patch has been merged into upstream branch.
+ https://github.com/lyonel/lshw/commit/20cda77239e8604e798b87a0441e694edb0214d1
** Description changed:
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
- [Impact]
+ [Impact]
lshw takes too long time on parsing /proc/cpuinfo on aarch64 system
It takes minutes on 96cores and almost 10min on 224cores system.
[Test Case]
`time sudo lshw` and it shall be less then 15sec
- [Regression Potential]
- This patch only affect code for aarch64. No regression possible on other aarch64 and has been tested on aarch64
+ [Regression Potential]
+ This patch only affect code for aarch64. Lowest regression rick on other arch and has been tested on aarch64
[Other Info]
Patch has been merged into upstream branch.
https://github.com/lyonel/lshw/commit/20cda77239e8604e798b87a0441e694edb0214d1
** Description changed:
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
[Impact]
lshw takes too long time on parsing /proc/cpuinfo on aarch64 system
It takes minutes on 96cores and almost 10min on 224cores system.
[Test Case]
`time sudo lshw` and it shall be less then 15sec
[Regression Potential]
- This patch only affect code for aarch64. Lowest regression rick on other arch and has been tested on aarch64
+ This patch only modifies codes for aarch64. Lowest regression rick on other arch and has been tested on aarch64
[Other Info]
Patch has been merged into upstream branch.
https://github.com/lyonel/lshw/commit/20cda77239e8604e798b87a0441e694edb0214d1
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to lshw in Ubuntu.
https://bugs.launchpad.net/bugs/1582181
Title:
AArch64: slow cpuinfo due to redundant loop
Status in lshw package in Ubuntu:
In Progress
Bug description:
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
[Impact]
lshw takes too long time on parsing /proc/cpuinfo on aarch64 system
It takes minutes on 96cores and almost 10min on 224cores system.
[Test Case]
`time sudo lshw` and it shall be less then 15sec
[Regression Potential]
This patch only modifies codes for aarch64. Lowest regression rick on other arch and has been tested on aarch64
[Other Info]
Patch has been merged into upstream branch.
https://github.com/lyonel/lshw/commit/20cda77239e8604e798b87a0441e694edb0214d1
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lshw/+bug/1582181/+subscriptions
More information about the foundations-bugs
mailing list