Building Your Own Linux Kernel: Tricky kernel options (part 3)
IO Schedulers, Processors, Power Management
After the last article, you've built a custom kernel, turning off some options you don't need and maybe reducing the number of modules. But some of the options in the kernel configuration are confusing! Today I'll try to clarify some of the places where it's easy to go wrong.
Block Layer: IO Schedulers
Under "Enable the block layer" lies an option you probably wouldn't think to look at: "IO Schedulers". That's obviously some kind of ï¿½bergeeky option that only a kernel developer would care about, right?
Well, mostly true. But if you're on a netbook, there's a hidden option you should know about: the No-op scheduler.
IO schedulers manage disk reads and writes to try to reduce the number of times the disk head has to move. But with a solid-state drive, there's no disk head, and all this smart scheduling can actually hurt performance.
Under IO Schedulers --> Default I/O scheduler, you'll see an option for the "No-op" scheduler (Figure 1). If your main disk is solid-state, try it. You may see an improvement.
You can even enable it at runtime for a single disk:
# cat /sys/block/sda/queue/scheduler noop anticipatory deadline [cfq] # echo noop > /sys/block/sda/queue/scheduler [noop] anticipatory deadline cfq
Processor type and features
This option group is fairly straightforward, but there are a few options worth noting.
"Tickless System" lets the system set timer interrupts only as needed, rather than at every clock cycle. This can really help with laptop battery life. You also need it if you run performance measurement apps like powertop.
"Symmetric multi-processing support" is needed for machines with multiple CPUs. You'll also want it if you have a "hyperthreaded" CPU, like an Atom.
"Processor family" lets you build a kernel that may run a bit faster on your specific processor. Most people don't see much difference in practice. If you enable this but upgrade hardware often, you might want to turn on "Generic x86 support" as well, so you'll be able to run your kernel on any x86 machine.
I mentioned "High Memory Support" in the last article -- remember, if you have 4GB you may need to set it to 64GB.
Other Stories on LinuxPlanet
Power management and ACPI options
ACPI is how modern x86-based machines do power management. APM is an
older standard. Unless you have a very old machine (older than 7 years),
you can probably turn off APM and use only ACPI.
If your machine has trouble suspending, either to disk or to RAM,
or it doesn't respond appropriately to the power button or can't read
the battery level, ACPI is the category to check.
- Skip Ahead
- 1. IO Schedulers, Processors, Power Management
- 2. IO Schedulers, Processors, Power Management
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
- 1Linux Top 3: GNOME 3.12 and New Betas for Ubuntu 14.04 and OpenMandriva Lx 2014.0
- 2Linux Top 3: Linus Lashes out, Linux 3.14 Gets PIE and Ubuntu One is Done.
- 3Linux Top 3: Ubuntu 14.04, Debian Gives Squeeze More Life and Red Hat Goes Atomic
- 4Linux Top 3: CoreOS, Oracle Enterprise Linux 7 and Ubuntu 14.10
- 5Linux Top 3: Debian Gives Up on Upstart, Ubuntu and Linux Kernel Updates