View previous topic :: View next topic |
Author |
Message |
Irre Guru
Joined: 09 Nov 2013 Posts: 434 Location: Stockholm
|
Posted: Wed Feb 07, 2018 9:44 am Post subject: ¨0.06 KWh to emerge gcc-7.3 |
|
|
I emerged gcc on two different architectures, and came to the conclusion that energy consumption is the same.
First on Raspberry PI first generation:
genlop -t gcc
Wed Feb 7 01:54:05 2018 >>> sys-devel/gcc-7.3.0
merge time: 1 day, 17 hours, 24 minutes and 26 seconds.
Estimated power: 2 W
Energy consumption to build sys-devel/gcc-7.3.0: (24+17+24/60)*2 Wh = 0.063 KWh
Then on Intel i7-2670QM CPU 2.20GHz:
genlop -t gcc
Wed Feb 7 10:11:07 2018 >>> sys-devel/gcc-7.3.0
merge time: 1 hour, 6 minutes and 57 seconds.
Estimated power: 50 W
Energy consumption to build sys-devel/gcc-7.3.0: (1+7/60)*50 Wh = 0.055 KWh |
|
Back to top |
|
|
Wallsandfences Guru
Joined: 29 Mar 2010 Posts: 378
|
Posted: Wed Feb 07, 2018 12:05 pm Post subject: Re: ¨0.06 KWh to emerge gcc-7.3 |
|
|
Irre wrote: | I emerged gcc on two different architectures, and came to the conclusion that energy consumption is the same.
...
Estimated power: 2 W
Energy consumption to build sys-devel/gcc-7.3.0: (24+17+24/60)*2 Wh = 0.063 KWh
...
Estimated power: 50 W
Energy consumption to build sys-devel/gcc-7.3.0: (1+7/60)*50 Wh = 0.055 KWh |
Really? My conclusion would be that it‘s more effienct to compile on the more beefy machine... |
|
Back to top |
|
|
Irre Guru
Joined: 09 Nov 2013 Posts: 434 Location: Stockholm
|
Posted: Wed Feb 07, 2018 1:07 pm Post subject: |
|
|
you are right! (24+17+24/60)*2 Wh = 0.083 KWh |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54216 Location: 56N 3W
|
Posted: Wed Feb 07, 2018 1:10 pm Post subject: |
|
|
Irre,
I think both your power estimates are low but the result is expected.
Silicon performance has long been limited by the energy density its possible to extract to keep junction temperatures within bounds, your two processors will run at the same W/m^2 of die.
It follows that a smaller die must take longer to perform the same amount of work.
This is true regardless of the feature size on the semiconductor.
To increase the energy density, either the die must be run hotter, that demands novel semiconductors. They are around, in blue LEDs.
or novel cooling to dissipate the heat better. That's around too, its just very expensive. Water cooling is not the sort of thing I had in mind but its an example. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Irre Guru
Joined: 09 Nov 2013 Posts: 434 Location: Stockholm
|
Posted: Wed Feb 07, 2018 6:20 pm Post subject: |
|
|
Compiling with /var/tmp in tmpfs was much faster:
Wed Feb 7 20:00:41 2018 >>> sys-devel/gcc-7.3.0
merge time: 43 minutes and 2 seconds.
Estimated power: 50 W
Energy consumption to build sys-devel/gcc-7.3.0: (43/60)*50 Wh = 0.036 KWh |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10587 Location: Somewhere over Atlanta, Georgia
|
Posted: Wed Feb 07, 2018 6:25 pm Post subject: |
|
|
There are some architectural differences that are a factor as well. The highly refined & much-iterated x86 CISC still beats any RISC, clock for clock and (usually) watt for watt.
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9677 Location: almost Mile High in the USA
|
Posted: Wed Feb 07, 2018 6:59 pm Post subject: |
|
|
<sarcasm>
Gentoo is costing us $0.01 every time they make us compile gcc-7.3, (webkit, chromium, firefox, rust, ...) and $0.02 for openoffice... there's my two cents...
</sarcasm>
:) _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54216 Location: 56N 3W
|
Posted: Wed Feb 07, 2018 9:21 pm Post subject: |
|
|
John R. Graham,
The highly refined & much-iterated x86 CISC is actually a RISC core and has been for many years.
The CISC part is emulated by the microcode on the RISC core. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Wed Feb 07, 2018 9:27 pm Post subject: |
|
|
NeddySeagoon wrote: | John R. Graham,
The highly refined & much-iterated x86 CISC is actually a RISC core and has been for many years.
The CISC part is emulated by the microcode on the RISC core. | ++
What is microcode _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10587 Location: Somewhere over Atlanta, Georgia
|
Posted: Wed Feb 07, 2018 9:30 pm Post subject: |
|
|
It's not that simple (but I know you know that). For instance, branch prediction and speculative execution, which are both part of the "highly refined" part, are not done (or not all done) in microcode, but in hardware. Now you can go ahead & tell me that these techniques are equally applicable to RISC architectures.
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Wed Feb 07, 2018 9:59 pm Post subject: |
|
|
John R. Graham wrote: | It's not that simple (but I know you know that). For instance, branch prediction and speculative execution, which are both part of the "highly refined" part, are not done (or not all done) in microcode, but in hardware. Now you can go ahead & tell me that these techniques are equally applicable to RISC architectures.
- John |
ARM Cortex-A75
ARM Cortex-A72
ARM Cortex-A57
ARM Cortex-A15
(The RiP does not have speculative execution before the original discussion is thrown back as a counter to your broad statement... https://www.raspberrypi.org/blog/why-raspberry-pi-isnt-vulnerable-to-spectre-or-meltdown/)
please tell me these chips are CISC. Sure branch prediction and speculative execution are more advanced CPU techniques, they are not soo complex that they cannot be implemented in a RISC architecture because SHOCK HORROR they are within x86 CISC chips. These techniques are all about pipeline optimisation. _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9677 Location: almost Mile High in the USA
|
Posted: Wed Feb 07, 2018 10:38 pm Post subject: |
|
|
I don't know why speculative execution and branch prediction give CISC so much flak wnen the Alpha by (formerly) DEC had these too...and it's RISC. These performance enhancing features are merely omitted for simplicity for many processors because solely of complexity - not due to instruction set, but to hardware to ensure correct operation, though it's even more difficult on CISC and legacy code.
I suspect the demonization is solely due to the outstanding spectre/meltdown attacks. It boils down to a tradeoff, do you want GCC to finish compiling in 1 hour or 1 day, especially if you're trying to code/debug GCC...
Or in our case, run Gentoo... because a Gentoo box spends a lot of time with the gcc process in the run queue than many other Linux machines. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Wed Feb 07, 2018 10:45 pm Post subject: |
|
|
eccerr0r wrote: |
I suspect the demonization is solely due to the outstanding spectre/meltdown attacks. It boils down to a tradeoff, do you want GCC to finish compiling in 1 hour or 1 day, especially if you're trying to code/debug GCC... | You will notice the flak is targeted at Intel even though AMD, ARM, IBM, ... are also vulnerable BECAUSE the oversight is in the concept (of Spectre).
Intel screwed up with Meltdown in what can only be described as cutting corners to gain performance AND they hacked people off with their PR response "nothing to see here" (which may have worked with FDIV and f00f) rather than a technical solution. Couple that will an untimely stock sell off and reporting the issue to the Chinese before American companies. _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9677 Location: almost Mile High in the USA
|
Posted: Thu Feb 08, 2018 10:47 pm Post subject: |
|
|
Speaking of ramdisk, is the wattage also including disk power consumption for both machines? If including the same disk/storage consumption for both, I suspect the faster machine gets even more attractive to use.
However the faster machines do have dead weight like video cards and keyboards that don't help towards compilation, so that also may need to be accounted for. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
Irre Guru
Joined: 09 Nov 2013 Posts: 434 Location: Stockholm
|
Posted: Fri Feb 09, 2018 7:31 am Post subject: |
|
|
eccerr0r wrote: | Speaking of ramdisk, is the wattage also including disk power consumption for both machines? If including the same disk/storage consumption for both, I suspect the faster machine gets even more attractive to use.
However the faster machines do have dead weight like video cards and keyboards that don't help towards compilation, so that also may need to be accounted for. |
The faster machine (laptop) has no external connections but network cable and power. The slow was only connected to a (cold) 5V, 0.4A power supply and an external 64G usb-stick. No monitor or network. The machine was disconnected after command: |
|
Back to top |
|
|
|