BSDCan2009 - Final Release

BSDCan 2009
The Technical BSD Conference

Speakers
George Neville-Neil
Schedule
Day Talks - 1 - 2009-05-08
Room MNT 203
Start time 14:30
Duration 01:00
Info
ID 117
Event type Lecture
Track Hacking
Language used for presentation English

Understanding and Tuning SCHED_ULE

With the advent of widespread SMP and multicore CPU architectures it was necessary to implement a new scheduler in the FreeBSD operating system. The SCHEDULE scheduler was added for the 5 series of FreeBSD releases and has now matured to the point where it is the default scheduler in the 7.1 release. While scheduling processes was a difficult enough task in the uniprocessor world, moving to multiple processors, and multiple cores, has significantly increased the number of problems that await engineers who wish to squeeze every last ounce of performance out of their system. This talk will cover the basic design of SCHEDULE and focus a great deal of attention on how to tune the scheduler for different workloads, using the sysctl interfaces that have been provided for that purpose.

Understanding and tuning a scheduler used to be done only by operating systems designers and perhaps a small minority of engineers focusing on esoteric high performance systems. With the advent of widespread multi-processor and multi-core architectures it has become necessary for more users and administrators to decide how to tune their systems for the best performance. The SCHEDULE scheduler in FreeBSD provides a set of sysctl interfaces for tuning the scheduler at run time, but in order to use these interfaces effectively the scheduling process must first be understood. This presentation will give an overview of how SCHEDULE works and then will show several examples of tuning the system with the interfaces provided.

The goal of modifying the scheduler's parameters is to change the overall performance of programs on the system. One of the first problems presented to the person who wants to tune the scheduler is how to measure the effects of their changes. Simply tweaking the parameters and hoping that that will help is not going to lead to good results. In our recent experiments we have used the top(1) program to measure our results.

A brief outline:

*) Introduction

*) SCHED_ULE Overview

*) Tuning Parameters

*) A small tuning experiment (handling involuntary context switches)

*) The effect of cpusets

*) Using cpusets effectively