Under the Hood

 
 
By Jason Brooks  |  Posted 2004-03-08 Print this article Print
 
 
 
 
 
 
 


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.

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.

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.

WEB RESOURCES

  • The Wonderful World of Linux 2.6 www.kniggit.net/wwol26.html
  • The Post-Halloween Document (Oct. 31, 2003, was the 2.6 code freeze date) http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt
  • Towards Linux 2.6 www-106.ibm.com/developerworks/linux/library/l-inside.html
  • Kernel comparison of Web serving on 2.4 and 2.6 www-106.ibm.com/developerworks/linux/library/l-web26
  • All Linux kernel development is hashed out in public on mailing lists; read and search the archives at lkml.org
  • For a much easier alternative to sifting through all the kernel list messages yourself, the discussion-based site kerneltrap.org features interesting clippings from the kernel list postings and debates
  • 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 closer—and faster to access—than 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.



     
     
     
     
    As Editor in Chief of eWEEK Labs, Jason Brooks manages the Labs team and is responsible for eWEEK's print edition. Brooks joined eWEEK in 1999, and has covered wireless networking, office productivity suites, mobile devices, Windows, virtualization, and desktops and notebooks. JasonÔÇÖs coverage is currently focused on Linux and Unix operating systems, open-source software and licensing, cloud computing and Software as a Service. Follow Jason on Twitter at jasonbrooks, or reach him by email at jbrooks@eweek.com.
     
     
     
     
     
     
     

    Submit a Comment

    Loading Comments...
     
    Manage your Newsletters: Login   Register My Newsletters























     
     
     
     
     
     
     
     
     
     
     
    Rocket Fuel