LowEndBox - Cheap VPS, Hosting and Dedicated Server Deals

The End of Uniprocessor Configs on Linux - It's a Multicore-Only Kernel Now

Single Core RIPLinux World News recently reported that the kernel dev team is moving away from uniprocessor kernel configurations.

The Linux kernel famously scales from the smallest of systems to massive servers with thousands of CPUs. It was not always that way, though; the initial version of the kernel could only manage a single processor. That limitation was lifted, obviously, but single-processor machines have always been treated specially in the scheduler. That longstanding situation may soon come to an end, though, if this patch series from Ingo Molnar makes it upstream.

This doesn’t mean Linux will stop working on single-processor machines.  What it means is that all the special code in the kernel (a long series of #ifdefs) to make uniprocessor code work better will be stripped out.

When you enable CONFIG_SMP, the kernel enables a lot of code to make SMP possible.  If this isn’t done, only one core will be recognized.  This patch will essentially make CONFIG_SMP always selected.

In modern environments, single-core systems are increasingly rare.  Even a Raspberry Pi Zero 2 is a quad core.  Yes, you can certainly find single-core systems, particularly in the embedded space, but this proposed patch is just reflecting reality.

When Linux was first released (early 90s), very few people had dual core systems on their desk.  Nowadays, trying to find a desktop system that has less than 4 cores is very hard.  And the server space has been multicore since forever.

So what’s the impact if you take a kernel a year from now that has CONFIG_SMP turned on and run it on a unicore machine?  Very little.  What’s being proposed will impact the scheduler, and the scheduler is slightly less efficient when it has to “think in SMP terms” on a single-core system.  But we’re talking ~5% efficiency gain if you’re hitting the scheduler really hard, and the odds are, you’re not.

In fact, you’re probably already doing this.  All the distros ship with CONFIG_SMP turned on, so unless you’re specially compiling a unicore kernel, you already know how this will perform.

 

No Comments

    Leave a Reply

    Some notes on commenting on LowEndBox:

    • Do not use LowEndBox for support issues. Go to your hosting provider and issue a ticket there. Coming here saying "my VPS is down, what do I do?!" will only have your comments removed.
    • Akismet is used for spam detection. Some comments may be held temporarily for manual approval.
    • Use <pre>...</pre> to quote the output from your terminal/console, or consider using a pastebin service.

    Your email address will not be published. Required fields are marked *