0

How I get in this trouble

Today, I was running an Arch Linux 32-bit virtual machine in GNOME Boxes in Ubuntu 16.04 LTS, my computer suddenly freeze, so I force shutdown by holding power button. After that, every time I boot my computer (Ubuntu 16.04 LTS), it takes me 3 minutes to enter login screen, this is unacceptable.

I also read this question and didn't find any solution, but I run a couple systemd-analyze command and save outputs

systemd-analyze

I executed 3 systemd-analyze commands, saved their output to 3 files, and uploaded HERE

systemd-analyze --system blame > blame
systemd-analyze --system critical-chain > critical-chain
systemd-analyze --system plot > systemd-analyze.svg

For blame file, use less or cat in terminal to view its content with color

I don't know how systemd works and I understand these systemd-analyze output very little. I could get rid of some services that take too long to run but I don't know how important are these services, what are their roles, and I don't want to screw up my computer

Update: A few more information

I installed 2 OS: Windows 10 in /dev/sda1 and Ubuntu 16.04 in /dev/sda5, I also make a NTSF drive (named STORAGE4, not Windows 10 partition, for saving data only) auto-mount at startup (using gnome-disks)

My root partition (/dev/sda5):

  • Filesystem type: ext4

  • Size: 133.9 GB total, 71.2 GB used, 55.9 GB free

My STORAGE4 (/dev/sda2):

  • Filesystem type: NTFS

  • Size: 134.2 GB, 123.2 GB used, 11.0 GB free

Root

STORAGE4

From @MarkStosberg:

You also didn't mention if the Virtual Machines were set to start at boot

I have 4 virtual machines and they're all turned off. How can I even set these VM start at boot anyway? (I mean, before I even see the lightdm login screen)

GNOME Boxes

Running hdparm:

$ sudo hdparm -Tt /dev/sda

/dev/sda:
 Timing cached reads:   9350 MB in  2.00 seconds = 4677.33 MB/sec
 Timing buffered disk reads:  20 MB in  3.58 seconds =   5.59 MB/sec
DMaster
  • 141

2 Answers2

0

One of your docs you posted indicated that your system might be an ASUS X550LD notebook. All of these come with spinning disk drives, so they will be slower than SSDs.

Just to compare your result with another system, I generated the SVG for my own system, which indicates that my boot time is about 10 seconds on my SSD.

You mentioned that you were using Boxes just before this happened. So trying to "undo" whatever you were doing in Boxes might help.

Disks also slow down when they get closer to getting full. If your HDD is close to being full, that could be part of the issue.

You also didn't mention which file system(s) you were using. File system choice could also be a factor.

You also didn't mention if the Virtual Machines were set to start at boot, which could contribute.

I reviewed the files you posted and there wasn't obvious cause for the slow down, which is why I suspect it may be hardware related.

You can also try using a hard disk benchmarking to confirm the throughput that is capable of. For comparison, here's the result of testing the SSD in my laptop:

$ sudo hdparm -Tt /dev/sda

/dev/sda:
 Timing cached reads:   11776 MB in  2.00 seconds = 5892.27 MB/sec
 Timing buffered disk reads: 216 MB in  3.01 seconds =  71.77 MB/sec

Looking at your follow-up hdparm output, your basic disk performance for buffered disk reads is lousy-- only about 5 MB/sec.

This post says "A modern 2.5" 5400 RPM drive should be able to hit 100 MB/s."

There may be more than one factor at play, but having a relatively slow 5,400 RPM HDD is definitely part of your slow performance issue.

0

I figured it out:

Cause: When I force shutdown, for some reasons, my MBR table corrupted, causing lost of swap partition. So every time I boot my machine, the OS tries to find that partition for swap space, increases boot time as a result.

Solution: Open /etc/fstab (as superuser), remove (or comment out) the line contains old swap partition, set up a new swap.

DMaster
  • 141