Really high kernel boot time

Solution 1:

Your log file shows the most time-consuming process with the line:

6.458s NetworkManager-wait-online.service

Therefore it would appear your biggest performance gain would be to have systemd not wait for the network to come up. See:

  • What does NetworkManager-wait-online.service do?

The answer explains the process in detail but, to summarize, you can use:

sudo systemctl disable NetworkManager-wait-online.service

Long kernel boot time

From this answer:

  • Long kernel load time

Try enabling Intel SpeedStep in BIOS.

Solution 2:

BIOS

ASUS X556UB v: 1.0

You have BIOS version X556UB.411. Version 412 is available here.

Note: Confirm that I have the correct web page for your model #.

Note: Have good backups before updating the BIOS.

Nvidia GM108M [GeForce 940M]

It looks like you're using the nouveau video driver. The Nvidia driver would provide better performance. The Nvidia driver can be downloaded here. (Or use Software & Updates Additional Drivers tab).

FSTAB (the real problem #1)

Note: 1.309s home-shawon-Store.mount

Change this line:

/dev/sdb1    /home/shawon/Store    ntfs    defaults,noatime,uid=1000,x-gvfs-hide    0    2

To this:

/dev/sdb1    /home/shawon/Store    ntfs    defaults,noatime,uid=1000,x-gvfs-hide    0    0

Note: For more reliable operation, change the /dev/sdxx to UUID=xxxxxxxxxxxxxxx

NCQ errors (the real problem #2)

Note: ata2.00: failed command: READ FPDMA QUEUED

Native Command Queuing (NCQ) is an extension of the Serial ATA protocol allowing hard disk drives to internally optimize the order in which received read and write commands are executed.

Edit sudo -H gedit /etc/default/grub and change the following line to include this extra parameter. Then do sudo update-grub to write the changes to disk. Reboot. Monitor hangs/etc., and watch grep -i FPDMA /var/log/syslog* or dmesg for continued error messages.

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash libata.force=noncq"

SWAP

Suggest the use of a /swapfile, instead of a swap partition.

Note: Incorrect use of the rm and dd commands can cause data loss. Suggest copy/paste.

In the terminal...

sudo swapoff -a           # turn off swap
sudo rm -i /swapfile      # remove old /swapfile

sudo dd if=/dev/zero of=/swapfile bs=1M count=4096

sudo chmod 600 /swapfile  # set proper file protections
sudo mkswap /swapfile     # init /swapfile
sudo swapon /swapfile     # turn on swap
free -h                   # confirm 16G RAM and 4G swap

Edit /etc/fstab, using sudo -H gedit /etc/fstab or sudo pico /etc/fstab.

Confirm this /swapfile line in /etc/fstab... and confirm no other “swap” lines... use SPACES in this line... confirm NO TABS...

/swapfile  none  swap  sw  0  0

Note: Comment out...

UUID=76408dec-2d63-402b-9624-fc562b8e9b5b    none    swap    sw    0    0

reboot                    # reboot and verify operation