How to keep Acer Aspire One ZG5 AOA-150 clock rate high while on battery?



  • I've been using an Acer Aspire One ZG5 AOA-150 as a pfsense router for over two years now.
    During this time the original battery and the replacement battery died after an average of one year of useful life per battery.

    Running the netbook on AC at all times obviously is not good for the battery life. At some point I removed the battery and ran on AC only for a while, but then missed the short power outage remedy that it represents when it is plugged in at all times.

    I am just about to replace the battery again and I was advised by the battery vendor to install a timer and turn off the AC at least twice a day for an hour each time in order to have the battery "act like a normal battery".

    When I was doing this I noticed that under pfSense/FreeBSD my ZG5 goes at a lower network throughput, in fact exactly half of AC power performance.

    I don't know if the clock frequency also goes down or not, I couldn't figure out how to check the clock rate in real time while in pfSense, but when I plugged in a USB drive with bootable windows on it and ran CPU-Z (and network benchmarks) I found out that under Windows XP when I remove the AC the network performance or clock frequency does not change at all.

    So, my question is twofold:

    1. Anyone has had a similar experience and figured out a remedy?
    2. Is there a way in pfSense or FreeBSD the CPU/system performance settings can be tuned?

    Thanks for any help.
    Halea



  • @haleakalas:

    1. Is there a way in pfSense or FreeBSD the CPU/system performance settings can be tuned?

    Check: system –> advanced --> miscellaneous --> power savings



  • Thanks Carlie. I tried PowerD with "Maximum" for Battery Power Mode; it didn't seem to make a difference.

    Actually, I eventually turned off PowerD as sporadically I would get some error messages indicating that my power control circuitry is not supported or something to that effect (sorry I don't recall the exact wording and this time around I didn't get any error message on the console).

    My reasoning was that if my hardware was not supported in that respect, probably pfSense couldn't slow it down when the AC was removed. But I might have misunderstood the message…

    Anybody out there using an Acer Aspire One ZG5 AOA-150 as a pfsense router? ...and some feedback?
    Thanks again.
    Halea


  • Netgate Administrator

    Check the bios for any power saving options you can disable.

    Steve



  • Just wanted to share the outcome of my investigations. I actually couldn't get to the bottom of this issue, but I learned how to live with it  :)

    AOA-150 somehow manages to slow itself down when the input voltage goes down from the power supply voltage to the battery voltage.

    The BIOS is bare bones, it doesn't offer any adjustment capability.
    The pfSense handling of the power circuit is a bit iffy as it throws some error messages on the console from time to time which seems to indicate that the hardware is not supported (but then why is it even allowed to be turned on?). So, I turned it off in the pfSense menu.

    The fact that at a lower voltage level the system slows itself down is not too surprising as I have another laptop which does exactly the same. My only interrogation at this point is why Windows XP (the original OS on this machine which is still installed on the hard drive) runs at full speed on battery when the AC charger is removed (it shows that the hardware is capable of full speed even at battery voltage) whereas pfSense/FreeBSD goes half speed (probably to preserve the battery life), and how is that controlled?

    Anyway, the timer on the AC supply line switches off 6 times a day for 1 hour each time in order to maintain the battery. During that time AOA-150 can only move 3-4 Mbps whereas with full AC power it can move 8-9 Mbps.

    Any thoughts, comments insight welcome as usual.

    Halea


  • Netgate Administrator

    The biggest killer for Li-Ion batteries is heat. The next biggest thing is charging them to 100% (perhaps also heat related) or discharging them too far. Some years ago Sony made a laptop that had bios setting for just this type of use. You could set it to only charge to 80%. If you can run the batteries between 80 and 20% charge you can get many times more charge cycles from them. I wouldn't like to guess how many laptops are plugged in most of the time. A lot.  ;)

    I would power it down at most once a day. Any more than that is just eating through your charge cycles IMHO.

    The first thing that I see is that both those numbers are way below what I'd expect from that CPU. How is it hooked up? Did you mean MBps?

    Steve



  • No error, I meant megabit per second. The overall speed limitation (or poor performance) might have something to do with the fact that I am using an Ethernet/USB adapter for the LAN and the native ethernet for the WAN.

    Incidentally, I tried to use the Ethernet/USB adapter for the WAN but that configuration proved itself to be a total disaster as the dynamic IP dropped every few minutes and necessitated a complete reboot. So, no doubt that the device driver for this Ethernet/USB adapter is not optimized or well supported by FreeBSD. But on the LAN side, and with a static IP there is almost no damage :) I mean packet loss etc is at a very minimum, actually interestingly enough no packet loss at all right now over a period of 7 day use.

    And my performance measurement is not very scientific either, I simply run one or two Netflix streams (then a few more downloads) for a while and observe how the throughput changes when the AC is on or off.

    Thanks for your input.

    Halea



  • @haleakalas:

    No error, I meant megabit per second. The overall speed limitation (or poor performance) might have something to do with the fact that I am using an Ethernet/USB adapter for the LAN and the native ethernet for the WAN.

    That might be the culprit! Some USB power saving mechanism triggers on your motherboard, which may decrease the performance of your USB nic. That's why you don't see it under XP.
    Maybe you could try to install the USB nic's driver in XP also, and try some network traffic tests with power unplugged, through the USB nic.
    Also, you might try different drivers for that nic in FreeBSD / pfSense…



  • Interesting thought! The USB might indeed be the raison power savings get kicked in…
    I was thinking about digging into the chip manufacturer's website to see if I could find an alternate driver for FreeBSD to address the speed issue, so who knows, there might be a solution.
    Thanks for the suggestion.
    Halea


  • Netgate Administrator

    Hmm, that's an interesting suggestion. Whatever it is it must be something triggered by the underlying hardware monitor on the board since pfSense/FreeBSD isn't aware of the power source (or is it?).
    It seems unlikely to be a CPU downclocking issue because it should be able to sustain 10Mbps even with the processor running at a fraction of it's normal speed.
    Try running 'top -aSH' at the console when running on battery.
    Could this be a C state issue with the system continually sleeping/waking?

    Steve



  • I remember Windows has its own power saving settings related to USB devices. Maybe FreeBSD doesn't, thus some defaults apply.



  • I did some more testing with the current USB/Ethernet adapter and I noticed that I can get a bit more than 30 Megabit per second when AC power is plugged in and around 12 Megabit per second on battery.
    This time around instead of streaming video from Netflix I downloaded a bunch of multi-gigabyte OS ISOs from various sites simultaneously. So, the performance is better than I first thought (with the same hardware, same device driver etc.)

    Now, the really interesting part of the story. I restarted AOA-150 with its original hard drive and Windows XP OS, installed the device driver for the USB/Ethernet adapter, which turned to be a crappy, no-name, no signature, device driver from 2006 found on the mini-CD that it came with. With nothing connected to the native LAN adapter, I used it to connect to the internet and downloaded a bunch of files the way I tested the router configuration above.
    The performance of that thing was eye popping, for almost 30mn it downloaded at the rate of 85 Megabit per second without a hiccup! (I have a 101 megabit per second internet downlink).
    Even more interesting, on battery the throughput turned out to be just a little under 70 megabit per second. It went on without missing a heartbeat for more than 20mn before I had to plug in the AC again as the charge level was down to 15% (the battery is new but it was not at full charge when I started my tests, under normal use I can get more than 2 hours of continued use, like netflix video watching, etc., with pfSense as a router I can have it work on battery for 3.5 hours).

    So, my conclusion is that although the Ethernet/USB adapter is not a performance champion, for a cheap, no name product it's more than decent under windows as the device driver is apparently better designed and implemented. Most interestingly the device works flawlessly without dropping IP address etc. (Whether it activates some sort of power saving scheme in windows XP is unclear given how close the throughput readings are. And in either case the CPU clock frequency remains at top speed)
    Under pfSense (and probably FreeBSD alone) the same hardware exhibits a far worse performance and loses its dynamic IP address after a while.

    Now, having done device level programming in a previous life (Unix System V v2.2 and Windows NT) I know that the challenge of implementing device driver software on these two platforms is equal-weight. So, I guess I am having a bit of trouble to understand why those Ethernet/USB adapters are not better supported on BSD.

    That said, all in all I am glad that there is an open source router software like pfSense and very thankful to the community standing behind it. Keep up the great work and thanks for all the help, input and comments.

    Halea


  • Netgate Administrator

    Unfortunately usb Ethernet is notoriously bad in pfSense. You might try a 2.2 snapshot. They're built on FreeBSD 10.1 so have much newer drivers.

    Steve


  • Rebel Alliance Developer Netgate

    @stephenw10:

    Unfortunately usb Ethernet is notoriously bad in pfSense everywhere. You might try a 2.2 snapshot. They're built on FreeBSD 10.1 so have much newer drivers.

    FTFY  ;D



  • @jimp:

    @stephenw10:

    Unfortunately usb Ethernet is notoriously bad in pfSense everywhere. You might try a 2.2 snapshot. They're built on FreeBSD 10.1 so have much newer drivers.

    FTFY  ;D

    Hey! Watch your language, there are ladies here  :-[

    Halea ;D


  • Netgate Administrator

    Really trying to think of something offensive FTFY might stand for but failing.  :P

    Pretty sure it's Fixed That For You which didn't offend me. As I wrote that I was initially going to put FreeBSD (or even BSD) but for all I know the USB Ethernet drivers in FreeBSD stable might be much better. I don't know, I avoid USB Ethernet if at all possible.  ;)

    Steve

    Edit: and now I've checked urban dictionary I find much more offensive acronyms. I'm sure Jim didn't mean that.  :)



  • Mea culpa! You're absolutely right. That's what he most obviously meant and I never doubted it, but I tried to run a joke on him.
    I thought my tongue in cheek comment would make it easy to understand with my grin at the end, but maybe not…
    The offensive version is when you replace 'fix' with the 4 letter f word and it's popular enough to have made it to online dictionaries.
    Halea


  • Netgate Administrator

    Ha, I'm clearly not hanging around the right places on-line.  ;D

    Steve