Changes between Version 6 and Version 7 of PowerConsumption


Ignore:
Timestamp:
Jan 8, 2008 6:17:52 PM (5 years ago)
Author:
dkg
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PowerConsumption

    v6 v7  
    33[wiki:jrollins] recently got a [http://www.thinkgeek.com/gadgets/travelpower/7657/ kill-a-watt], a device which sits in-line with the mains power, and measures the power consumed.  Sadly, it uses a shitty LCD readout instead of an RS-232 machine-readable interface.  Also sadly, it can't be used to monitor machines without detaching their power lines first. 
    44 
     5== measurements == 
    56|| '''machine''' || '''specs''' || '''no load''' || '''CPU burn'''[[BR]] (`dd if=/dev/urandom of=/dev/null`) || '''disk read load'''[[BR]](`dd if=/dev/hda of=/dev/null`) || 
    67|| crusty || Pentium I 90MHz, 80MB RAM, 1G PATA disk ||41W || 43W || 46W || 
     
    89|| squeak || thinkpad X30 12" screen, P3 1.2GHz, 512MB RAM, 40GB PATA laptop HD || 17W || 31W || 24.5W || 
    910 
     11[[PageOutline]] 
     12== strategies currently measured == 
     13 
     14=== no load === 
     15 
     16let a stock linux kernel boot (kernels from lenny and etch at the moment), make sure that `vmstat` reports mostly idle CPU cycles. 
     17 
     18=== CPU burn === 
     19 
     20force the kernel to chew up as much of the CPU as possible.  on single CPU machines, just ask the kernel to generate pseudorandom numbers and throw them away: 
     21{{{ 
     22dd if=/dev/urandom of=/dev/null 
     23}}} 
     24 
     25If you've got a multi-CPI (or dual-core) machine, you might need to run one instance of this for each core you have available to make `vmstat` claim 100% load. 
     26 
     27=== disk read load === 
     28 
     29pull data straight from the raw disk device as fast as possible, and send it to the bit bucket.  this doesn't affect the disk at all, other than forcing a series of linear reads: 
     30{{{ 
     31dd if=/dev/hda of=/dev/null 
     32}}} 
     33 
     34 * does the kernel's disk cache have an effect on this? 
     35 
     36== other strategies == 
    1037There are obviously other interesting things that could affect power measurements.  These would be worth measuring at some point, for the devices which support them. 
    1138 
    12  * battery charge rates 
    13  * wireless networking 
    14  * bluetooth 
    15  * heavily random disk activity (e.g. swapping) -- straight `dd` is linear access, which might be different. 
    16  * disk write load  
    17  * massive video terminal activity (random pixel flipping) 
     39=== battery charge rates === 
     40 
     41 * enumerate the type of battery (or batteries) 
     42 * initial charge level 
     43 
     44=== networking === 
     45 
     46would sending a lot of traffic over the network affect power consumption 
     47 
     48==== wireless networking ==== 
     49 
     50=== bluetooth === 
     51 
     52=== USB devices === 
     53 * audio devices? 
     54 * USB serial lines 
     55 
     56=== serial console === 
     57 
     58If you send huge amounts of data over the serial console, does it affect power consumption? 
     59 
     60=== Random disk access === 
     61heavily random disk activity (e.g. swapping) -- straight `dd` is linear access, which might be different, since seeks probably cost something other than just active disks. 
     62 
     63=== disk write === 
     64Warning: this is extremely destructive!  Don't do this unless you understand what it will do to the machine you run it on. 
     65 
     66Best to select a specific partition that you know you can trash: 
     67{{{ 
     68dd if=/dev/zero of=/dev/hda7 
     69}}} 
     70=== video === 
     71How do we get massive video terminal activity (random pixel flipping) 
     72 
     73=== memory activity === 
     74i've heard reports that amount of memory present is an indicator of power consumed.  Is active use of the RAM required, or is it just the cost of refreshing the DRAM?  Could we use [http://www.memtest.org/ memtest86+ for this test]? 
     75 
     76=== power while off === 
     77how much does the machine draw after running: 
     78{{{ 
     79shutdown -h now 
     80}}} 
     81and waiting for the `Power down` message on the kernel's console?  on older machines like `crusty`, there is no difference between this and the "no load" state.  ugh.