Internal Hard drive extremely slow unless using barrier=0 on ext4
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
I have a brand new laptop (Asus N551VW, i7-6700HQ, 16 Gb ram) on which i installed Ubuntu 14.04 64bit and a new Samsung SSD 850 PRO 512Gb (latest firmware). I installed the default MySql 5.6.27 on the machine but I noticed a very VERY slow performance of the database (just creating a db and executing some migrations without any data takes around 33 seconds while on lower-hardware co-workers notebooks it takes like 3 seconds). Every sql statement seems to spend most time in "system lock" state, as i could see with a SHOW PROCESSLIST.
I thought it to be an hard drive issue, but executing the hard drive benchmark in Ubuntu gives 500 Mb/s read and 350 Mb/s write speed, which looks mostly normal.
I also tried updating to the new 4.2 kernel, but the issue still there. To make an experiment, i cloned the ssd on a normal hard drive, switched it in and connected the SSD externally with an usb box. I moved mysql data directory to the external disk, and retried the db creation: it took only 2.5 seconds.
Just out of curiosity i tried the same operation on an internal non-ssd disk: when the hd is plugged inside the laptop with sata, the database creation takes more than 2 minutes, while with the data dir on external usb (with the same physical disk) it took less than 10 seconds.
WORKAROUND: Add barrier=0 to root drive mount options with no other modification caused the same script to take 1.5 seconds instead of 33, with a 22x increase in performance.
I have opened his bug on askubuntu (http://
The problem is present both in trusty's default kernel (3.19.0-47.53) and in the 4.2 (4.2.0-25.30).
---
ApportVersion: 2.14.1-0ubuntu3.19
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/
DistroRelease: Ubuntu 14.04
HibernationDevice: RESUME=
InstallationDate: Installed on 2016-01-06 (60 days ago)
InstallationMedia: Ubuntu 14.04.3 LTS "Trusty Tahr" - Beta amd64 (20150805)
Lsusb:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 8087:0a2a Intel Corp.
Bus 001 Device 002: ID 04f2:b3fd Chicony Electronics Co., Ltd
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: ASUSTeK COMPUTER INC. N551VW
NonfreeKernelMo
Package: linux (not installed)
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=
ProcVersionSign
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
RelatedPackageV
linux-
linux-
linux-firmware 1.127.20
Tags: trusty
Uname: Linux 4.2.0-30-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:
_MarkForUpload: True
dmi.bios.date: 11/13/2015
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: N551VW.205
dmi.board.
dmi.board.name: N551VW
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: 1.0
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK COMPUTER INC.
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.name: N551VW
dmi.product.
dmi.sys.vendor: ASUSTeK COMPUTER INC.
Changed in linux (Ubuntu): | |
status: | Incomplete → Confirmed |
Changed in linux (Ubuntu): | |
importance: | Low → Medium |
status: | Confirmed → Triaged |
lspci:
00:00.0 Host bridge: Intel Corporation Device 1910 (rev 07)
00:01.0 PCI bridge: Intel Corporation Device 1901 (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Device 191b (rev 06)
00:04.0 Signal processing controller: Intel Corporation Device 1903 (rev 07)
00:14.0 USB controller: Intel Corporation Device a12f (rev 31)
00:14.2 Signal processing controller: Intel Corporation Device a131 (rev 31)
00:15.0 Signal processing controller: Intel Corporation Device a160 (rev 31)
00:15.1 Signal processing controller: Intel Corporation Device a161 (rev 31)
00:16.0 Communication controller: Intel Corporation Device a13a (rev 31)
00:17.0 SATA controller: Intel Corporation Device a103 (rev 31)
00:1c.0 PCI bridge: Intel Corporation Device a112 (rev f1)
00:1c.3 PCI bridge: Intel Corporation Device a113 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Device a14e (rev 31)
00:1f.2 Memory controller: Intel Corporation Device a121 (rev 31)
00:1f.3 Audio device: Intel Corporation Device a170 (rev 31)
00:1f.4 SMBus: Intel Corporation Device a123 (rev 31)
01:00.0 3D controller: NVIDIA Corporation Device 139b (rev a2)
02:00.0 Network controller: Intel Corporation Wireless 7265 (rev 59)
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5287 (rev 01)
03:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 12)
lshw: NotebookSKU uuid=AACF7E31- 37C3-407D- AE85-B0B7C19488 32 34567
description: BIOS
capabilities : pci upgrade shadowing cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer acpi usb smartbattery biosbootspecifi cation uefi
description: L1 cache
capabilities : synchronous internal write-back data
description: L1 cache
capabilities : synchronous internal write-back instruction
description: L2 cache
capabilities : synchronous internal write-back unified
description: L3 cache
capabilities : ...
description: Notebook
product: N551VW (ASUS-NotebookSKU)
vendor: ASUSTeK COMPUTER INC.
version: 1.0
serial: FBN0CJ073215469
width: 64 bits
capabilities: smbios-3.0 dmi-3.0 vsyscall32
configuration: boot=normal chassis=notebook family=N sku=ASUS-
*-core
description: Motherboard
product: N551VW
vendor: ASUSTeK COMPUTER INC.
physical id: 0
version: 1.0
serial: BSN123456789012
slot: MIDDLE
*-firmware
vendor: American Megatrends Inc.
physical id: 0
version: N551VW.205
date: 11/13/2015
size: 64KiB
capacity: 5952KiB
*-cache:0
physical id: 11
slot: L1 Cache
size: 128KiB
capacity: 128KiB
*-cache:1
physical id: 12
slot: L1 Cache
size: 128KiB
capacity: 128KiB
*-cache:2
physical id: 13
slot: L2 Cache
size: 1MiB
capacity: 1MiB
*-cache:3
physical id: 14
slot: L3 Cache
size: 6MiB
capacity: 6MiB