NUbots / robocup

The NUbot's RoboCup Code
GNU General Public License v3.0
34 stars 17 forks source link

CPU clock slows when on battery. #6

Closed BrendanAnnable closed 11 years ago

BrendanAnnable commented 11 years ago

As discovered today, the CPU/Ubuntu slows itself when taken off mains power (presumably to save battery power). It caused a very effect on the number of frames received by NUbugger per second (~25-30 to 3-6).

This needs to be further investigated into regarding how to disable it and how long the robot can last on full speed.

ghost commented 11 years ago

Someone needs to go through the firmware and sort it out, there are a few issues. I believe I was assigned to do it at some point, but I'm not sure when or how. :S

josiahw commented 11 years ago

This is actually one of the easier issues to fix on Ubuntu. Someone needs to just plug the robots into a monitor and go the the power saving control panel to set it to maximum performance on battery. :-)

Sent from my iPad

On 17/03/2013, at 8:32 PM, Blocks50 notifications@github.com wrote:

Someone needs to go through the firmware and sort it out, there are a few issues. I believe I was assigned to do it at some point, but I'm not sure when or how. :S

— Reply to this email directly or view it on GitHub.

BrendanAnnable commented 11 years ago

I would if I could find my damn HDMI cable >_>

On Sun, Mar 17, 2013 at 8:59 PM, josiahw notifications@github.com wrote:

This is actually one of the easier issues to fix on Ubuntu. Someone needs to just plug the robots into a monitor and go the the power saving control panel to set it to maximum performance on battery. :-)

Sent from my iPad

On 17/03/2013, at 8:32 PM, Blocks50 notifications@github.com wrote:

Someone needs to go through the firmware and sort it out, there are a few issues. I believe I was assigned to do it at some point, but I'm not sure when or how. :S

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/nubots/robocup/issues/6#issuecomment-15020103 .

BrendanAnnable commented 11 years ago

Further investigation appears to indicate the robot doesn't infact slow the CPU (even though it makes an audible change).

Ubuntu believes the robot is not on battery even when unplugged, and CPU performance tests reveal almost exactly the same numbers.

Results:

sudo upower -d

Device: /org/freedesktop/UPower/devices/line_power_ADP1 native-path: /sys/devices/LNXSYSTM:00/device:00/ACPI0003:00/power_supply/ADP1 power supply: yes updated: Mon May 20 22:49:27 2013 (895 seconds ago) has history: no has statistics: no line-power online: yes

Device: /org/freedesktop/UPower/devices/monitor_ttyUSB0 native-path: /sys/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/ttyUSB0/tty/ttyUSB0 vendor: Watts Up, Inc. model: Watts Up? Pro power supply: no updated: Thu Jan 1 10:00:00 1970 (1369055062 seconds ago) has history: yes has statistics: no monitor energy-rate: 0 W

Daemon: daemon-version: 0.9.15 can-suspend: yes can-hibernate yes on-battery: no on-low-battery: no lid-is-closed: no lid-is-present: no is-docked: no

# Unplugged sysbench --test=cpu --cpu-max-prime=20000 --num-threads=2 run sysbench 0.4.12: multi-threaded system evaluation benchmark

Running the test with following options: Number of threads: 2

Doing CPU performance benchmark

Threads started! Done.

Maximum prime number checked in CPU test: 20000

Test execution summary: total time: 108.0419s total number of events: 10000 total time taken by event execution: 216.0406 per-request statistics: min: 18.28ms avg: 21.60ms max: 67.14ms approx. 95 percentile: 21.99ms

Threads fairness: events (avg/stddev): 5000.0000/28.00 execution time (avg/stddev): 108.0203/0.01

# Plugged In sysbench --test=cpu --cpu-max-prime=20000 --num-threads=2 run sysbench 0.4.12: multi-threaded system evaluation benchmark

Running the test with following options: Number of threads: 2

Doing CPU performance benchmark

Threads started! Done.

Maximum prime number checked in CPU test: 20000

Test execution summary: total time: 107.9973s total number of events: 10000 total time taken by event execution: 215.9671 per-request statistics: min: 20.41ms avg: 21.60ms max: 67.52ms approx. 95 percentile: 21.92ms

Threads fairness: events (avg/stddev): 5000.0000/1.00 execution time (avg/stddev): 107.9836/0.00