From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753953AbcLKVlz (ORCPT ); Sun, 11 Dec 2016 16:41:55 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:37149 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752113AbcLKVlx (ORCPT ); Sun, 11 Dec 2016 16:41:53 -0500 MIME-Version: 1.0 From: =?UTF-8?Q?Alexandre=2DXavier_Labont=C3=A9=2DLamoureux?= Date: Sun, 11 Dec 2016 16:41:51 -0500 Message-ID: Subject: Scheduler patches: 6x performance increase when system is under heavy load To: linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uBBLfxCg030940 Hi, There's a research paper[1] called "The Linux Scheduler: a Decade of Wasted Cores". It shows how the Linux Kernel scheduler is broken and they provided fixes[2] for some of the know issues that it has. The changes are illustrated in a presentation[3] that was shown during a talk. I patched my kernel with these patches using a simple tool[4]. I compiled the Linux kernel on it and I was flabbergasted to see an estimated six times performance increase. It was blazing fast and I couldn't believe it. Here are my results (using "time make -j32" on my VM that has 4 cores): Kernel 4.8.14 real 26m56.151s user 79m52.472s sys 7m42.964s Same kernel, but patched: real 4m25.238s user 13m52.932s sys 1m25.820s I hope you guys will look into this. If these changes were introduced into the kernel, it would be great and benefit to a lot of people. There may be some regression. People have said that it improved the throughput of the kernel, but on some application such as games, there are some performance spikes due to overscheduling. This already happens in the vanilla kernel, but it's worsened a bit. Power management will also be a thing to look into. I hope the scheduler engineers will fix the kernel. The research paper has been out for a while and nothing has been done yet. Personally, I think six times is huge as someone who compiles huge projects often and the regressions if any are not apparent to me. Other people should try it too to test if it's good. Regards, Alexandre-Xavier Labonté-Lamoureux [1] https://www.ece.ubc.ca/~sasha/papers/eurosys16-final29.pdf [2] https://github.com/Freeaqingme/wastedcores/tree/linux-4.5/patches [3] http://www.i3s.unice.fr/~jplozi/wastedcores/files/extended_talk.pdf [4] https://github.com/Turbine1991/build_ubuntu_kernel_wastedcores