| | 11 | [[PageOutline]] |
| | 12 | == strategies currently measured == |
| | 13 | |
| | 14 | === no load === |
| | 15 | |
| | 16 | let 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 | |
| | 20 | force 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 | {{{ |
| | 22 | dd if=/dev/urandom of=/dev/null |
| | 23 | }}} |
| | 24 | |
| | 25 | If 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 | |
| | 29 | pull 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 | {{{ |
| | 31 | dd if=/dev/hda of=/dev/null |
| | 32 | }}} |
| | 33 | |
| | 34 | * does the kernel's disk cache have an effect on this? |
| | 35 | |
| | 36 | == other strategies == |
| 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 | |
| | 46 | would 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 | |
| | 58 | If you send huge amounts of data over the serial console, does it affect power consumption? |
| | 59 | |
| | 60 | === Random disk access === |
| | 61 | heavily 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 === |
| | 64 | Warning: this is extremely destructive! Don't do this unless you understand what it will do to the machine you run it on. |
| | 65 | |
| | 66 | Best to select a specific partition that you know you can trash: |
| | 67 | {{{ |
| | 68 | dd if=/dev/zero of=/dev/hda7 |
| | 69 | }}} |
| | 70 | === video === |
| | 71 | How do we get massive video terminal activity (random pixel flipping) |
| | 72 | |
| | 73 | === memory activity === |
| | 74 | i'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 === |
| | 77 | how much does the machine draw after running: |
| | 78 | {{{ |
| | 79 | shutdown -h now |
| | 80 | }}} |
| | 81 | and 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. |