Under the Hood
Under the Hood The Linux 2.6 kernel includes a new, anticipatory scheduler for I/O operations. The scheduler boosts system responsiveness in the presence of streaming write operations by pausing briefly after read operations before proceeding to write operations (in anticipation of further reads). In eWEEK Labs tests, bringing up a new terminal window while a system was writing heavily was significantly faster with the anticipatory scheduler than with the default I/O scheduler in the 2.4 kernel.In some situations, such as with certain database workloads, the new anticipatory behavior may yield slightly slower performance. In such cases, administrators may opt to use a separate I/O scheduler within the 2.6 kernel, called the deadline scheduler, by passing the command "elevator=deadline" at boot.
The 2.6 kernel boasts an improved threading model, which includes support for NPTL (Native POSIX Thread Library). NPTL delivers performance gains for heavily threaded applications, including Java virtual machines. NPTL has been known to break compatibility with some applications. However, NPTLs compatibility problems had been mitigated at the time Red Hat began shipping NPTL in Red Hat Linux 9 last spring.
Linux 2.6 includes a new process scheduler, which is the part of the kernel that divides the processors time among running programs. The new scheduler, called the O(1) scheduler, increases scalability on multiprocessor systems by improving the algorithm with which the kernel conducts its process scheduling (and does so without reducing performance on single-processor systems).
Certain Linux distributions run the XFree86 graphics server with a boosted priority level, which, combined with the new process scheduler, can result in jerkiness and otherwise poor user-interface performance. Users can overcome this problem by returning the X server priority to 0, a configuration that Linux distributors will likely perform by default when they ship their distributions.
Linux 2.6 comes with new support for NUMA (Non-Uniform Memory Access), an architecture on which massive multiprocessor systems, such as Silicon Graphics Inc.s Altix 3000, are built. NUMA systems address memory bus bottlenecks with multiple memory buses. The result: For a given processor, some memory is closerand faster to accessthan other memory. In 2.6, Linux is aware of these relationships, and the kernel can optimize use of such a systems resources.
NUMA support in Linux gives companies running the operating system the option of moving up to higher-capacity hardware without requiring them to add a new platform into their administration mix.
The virtual memory subsystem in Linux 2.6 has also been reworked to improve scalability. Some of the changes required to support NUMA, for example, come from the new Linux virtual memory system.
Also new in 2.6 is support for symmetric multithreading. Symmetric multithreading is known in Intel Corp.s processors as Hyper-Threading, which enables a single Pentium 4 or Xeon to appear as two processors. The scalability and multithreading improvements in 2.6 that boost performance on symmetric multiprocessing systems will also benefit systems with symmetric multithreading chips.
At this point, however, the 2.6 kernel cant tell the difference between separate virtual and physical processors, an awareness that would provide better load balancing on systems with symmetric multithreading chips. It would be better, for example, if the kernel spread a load between two physically separate processors instead of between two virtual processors on the same chip. Work has been done to address this issue, but its not yet part of the official kernel.
In any case, Intel is building Hyper-Threading into more of its processors, and better support for this capability in Linux will help companies get the most out of their hardware. Similar technology, in which single chips function as multiple virtual processors, is appearing in other processors, such as multicore chips from Sun Microsystems Inc., so symmetric multithreading support will have applicability beyond Intels products.
Next page: Pre-emptive measures.
The new I/O scheduler will pay dividends to desktop users through improved responsiveness, as well as through various server tasks, such as Web servers carrying out large numbers of read operations.