Sluggish Laptop

For a while I have noticed a sluggishness with my Lenovo T400 laptop. I don’t know when this started but within the past few months ago. I am using Slackware 14.2 64-bit. The laptop has 4 GB of RAM and a 160 GB 5400 RPM mechanical hard drive.

Specifically, launching Firefox takes a long time and running my VirtualBox virtual machine (VM) that I use for work is painfully slow. When the VM triggers into desktop lock mode, restoring takes an extraordinary long time. After restoring the desktop, from that moment forward the virtual system clock is incorrect and offset by the amount of time the VM was locked.

Because the computer is a laptop I had configured the CPU scaling governor for powersave. I changed that option to ondemand. No change in Firefox launch time or VM behavior.

I replaced the hard drive with a Samsung 850 EVO 250 GB SSD. Some benchmarking showed improvements but the VM behavior remained the same.

    hdparm -Tt /dev/sda
    Timing buffered disk reads:
    HD: 75.3 MB/second
    SSD: 215 MB/second
    dd if=/dev/zero of=tempfile bs=1M count=1024 (flushed kernel cache)
    HD: 37 MB/second
    SSD: 265 MB/second
    dd if=tempfile of=/dev/null bs=1M count=1024 (flushed kernel cache)
    HD: 68 MB/second
    SSD: 220 MB /second
    Boot time to run level 3 command line login prompt
    HD: 44 seconds
    SSD: 24 seconds
    Launch MATE desktop (startx)
    HD: 23 seconds
    SSD: 15 seconds
    Launch Firefox
    HD: 27 seconds
    SSD: 13 seconds
    Launch VirtualBox VM to login manager
    HD: 57 seconds
    SSD: 42 seconds
    Login to VM
    HD: 44 seconds
    SSD: 46 seconds
    Launch Mikrotik Winbox (WINE) within VM
    HD: 34 seconds
    SSD: 25 seconds
    Launch Firefox within VM
    HD: 42 seconds
    SSD: 34 seconds

Noticeable is the VM times. The other tests showed about 2 to 3 times improvement. The VM times barely nudged or even worsened.

The VM is Ubuntu MATE 16.04.4 64-bit and is encrypted. The VM is used for remote access to work systems and the encryption is a necessary security precaution. I temporarily removed the encryption. I compacted the VM (vboxmanage modifyvdi "$VDI" compact). I repeated the VM tests.

    Launch VirtualBox VM to login manager
    SSD: 31 seconds
    Login to VM
    SSD: 36 seconds
    Launch Mikrotik Winbox (WINE) within VM
    SSD: 19 seconds
    Launch Firefox within VM
    SSD: 26 seconds

The T400 CPU is a Core Duo P8400, which does not support AES extensions. Without VM encryption I see nominal improvements. Encryption plays a minor role but not enough to be bothersome.

Next I manually locked the desktop. I do not use a screen saver in the VM.

I have to use locking for security. The configured timeout is 5 minutes. The password prompt dialog takes about 21 seconds to appear and about 30 seconds to restore the desktop. I never see this problem using an identical VM on my desktop computer, which has a 4-core i5-6400. Granted the desktop CPU is way more powerful than the T400 Core Duo P8400, but the slow times are curious.

Digging deeper I copied a CentOS 7 VM from the desktop to the laptop and repeated the steps. CentOS 7 is another work related OS. The same MATE desktop and being work related, the desktop is configured similarly. The desktop lock dialog times are normal.

The sluggishness with the T400 seems to be a little bit the VirtualBox encryption but mostly the Ubuntu MATE VM. Confusing to me is the VM works fine on my desktop but does not like something on the T400. I understand some differences in performance speeds but something is awry with this VM on the laptop.

The SSD did help in several ways but the VM problems persisted. I created a 32-bit VM, which ran better. Additionally, there are three vboxadd*.service files enabled when installing the VirtualBox GA in an Ubuntu VM. Disabling the vboxadd-x11 and vboxadd*.service services seem to cause no ill effect and the VM responded better without them. At least until I noticed the clock not staying synchronized. I restored the two services.

With the 32-bit system the lock desktop problem disappeared.

The T400 has seen better days.

Posted: Category: Usability Tagged: General

Next: NetworkManager Security

Previous: LibreOffice Draw Observations