This bug is missing log files that will aid in diagnosing the problem.
While running an Ubuntu kernel (not a mainline or third-party kernel)
please enter the following command in a terminal window:

apport-collect 1812569

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable
to run this command, please add a comment stating that fact and change
the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the
Ubuntu Kernel Team.

** Changed in: linux (Ubuntu)
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1812569

Title:
  Default kernel "cfq" I/O scheduler results in worse rotating disk
  performance than necessary

Status in linux package in Ubuntu:
  Incomplete

Bug description:
  1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> 
About Ubuntu
  Ubuntu 18.04.1 LTS

  2) The version of the package you are using, via 'apt-cache policy pkgname' 
or by checking in Software Center
  linux-image-generic       4.15.0.43.45

  3) What you expected to happen
  HDD performance is not unnecessary slow by default because the wrong "cfq" IO 
scheduler is used

  4) What happened instead
  HDD performance is slow compared to other systems where other IO scheduler 
like "deadline" or "noop" is used. Even random OOM killings occur because swap 
performance is too low.

  
  Hi all,

  About a year ago I moved from CentOS 7 to Ubuntu 18.04 on a couple of
  older desktop and laptop machines. One of the things I noticed after
  the switch, was that disk IO performances seemed to be degraded, and
  the machines often became unresponsive with lot of IO load, like
  copying files or swapping when a lot of memory was used. People on
  other Ubuntu machines with HDD that I know or use the mentioned
  machines, also complained about annoying system lockups and hangs.
  Degrading IO performance could be caused by many things, like drivers,
  wrong block size aligning, heavier desktop environment and
  applications and browsers and web applications that become heavier in
  RAM and IO usage. I tried several things like using lighter XFCE
  environment, switching from Firefox to Chrome, adding adblockers and
  webtracker blockers, and using a tab suspension plugin, to lower
  memory usage. But low performance issues still remained and it
  appeared that especially swapping became terribly slow and even the
  kernel OOM killer started killing random applications, something I
  haven't experienced before on desktop machines.

  After a while I found out that on the old CentOS 7 installs, the disk
  IO scheduler was set to "deadline", while on the Ubuntu 18.04
  installs, it is "cfq". So a month ago on three Ubuntu 18.04 I switched
  the scheduler from "cfq" to "noop". Guess what, after a month I can
  conclude that the machines turned to be much more responsive, no
  strange OOM killings anymore, and even when significant swap is used,
  the machine is still responsive and workable. I set it on other
  peoples computers as well and also there, complaints about slowness
  disappeared.

  Could it be that
  1. the CFQ schedulers, that stands for "Complete Fairness Queueing", is 
causing all processes to use disk IO randomly simultaneously, and that is 
causing heavy seeking activity on old-fashion rotating HDDs, causing it to 
severely lower the IO throughput?
  2. it is better to by default use the "deadline" or "noop" IO scheduler for 
HDDs, by putting the following in /etc/udev/rules.d/50-scheduler.rules:
    ACTION=="add|change", KERNEL=="sd[a-z]", 
ATTR{queue/rotational}=="1",ATTR{queue/scheduler}="noop"
    to gain much better IO performance in general for "older" systems using 
HDDs.
  3. is this something others experience as well, although I think there is no 
'placebo' effect on my side. Is it wise to test with some benchmark?

  Systems involved that I tested:
  1. AMD Athlon(tm) II X4 640 Processor, 8GB RAM, Western Digital Blue 7200rpm 
1TB disk (WDC WD10EZEX-00BN5A0)
  2. Acer Aspire R3-471T-33NP laptop, Intel(R) Core(TM) i3-4005U CPU, 4GB RAM, 
Seagate Laptop Thin HDD 5400rpm 500GB disk (ST500LT012-1DG142)
  3. Acer Veriton L4630G desktop, Intel(R) Core(TM) i5-4440S CPU, 8GB RAM, 
Western Digital Red 5400rpm 3TB disk (WDC WD30EFRX-68EUZN0)

  These machines are all installed with LVM and amount of swap that
  equals the amount of RAM, contrary the Ubuntu defaults of configuring
  plain disk partitions and only 950MB of swap. This mainly because I
  want the flexibility of LVM when I need to change disk configurations
  later on, and I want to be able to use Hibernation (suspend to disk)

  Typical usage: browsing websites, emailing using Thunderbird, using
  LibreOffice documents, occasional copying over large amounts of files
  to/from external USB disks, occasional image and video editing.

  I see my more modern Thinkpad T450s laptop with SSD with Ubuntu 18.04
  is also using CFQ, but there I never experience IO slowness, even when
  GBs of swap are in use. Probably CFQ works fine with SSDs that have
  much lower seek times.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1812569/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to