public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.1 Scheduler Latency Measurements (Preemption diabled/enabled)
@ 2004-02-03 16:24 Christoph Stueckjuergen
  2004-02-04  0:19 ` Nick Piggin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Christoph Stueckjuergen @ 2004-02-03 16:24 UTC (permalink / raw)
  To: linux-kernel

Hi,

I performed a series of measurements comparing scheduler latency of a 2.6.1 
kernel with preemption enabled and disabled on an AMD Elan (i486 compatible) 
with 133 Mhz clock frequency.

The measurements were performed with a kernel module and a user mode process 
that communicate via a character device interface. The user mode process uses 
a blocking read() call to obtain data from the kernel. The kernel module 
reads the system time every 10 ms by calling do_gettimeofday(), wakes up the 
sleeping user mode process and passes the system time to it. After having 
received the system time from the kernel, the user mode process reads the 
system time by calling gettimeofday() and is thus able to determine the 
scheduler latency by subtracting the two times. The user mode process is run 
with the SCHED_FIFO scheduling policy.

Measurements were carried out on a „loaded“ and an „unloaded“ system. The 
„load“ was created by a process that continuously writes data to the serial 
interface /dev/ttyS0.

The results are:
"loaded" system, 10.000 samples
average scheduler latency (preemption enabled / disabled): 170 us / 232 us
minimum scheduler latency (preemption enabled / disabled): 49 us / 43 us
maximum scheduler latency (preemption enabled / disabled): 840 us / 1063 us

"unloaded" system, 10.000 samples
average scheduler latency (preemption enabled / disabled): 50 us / 44 us
minimum scheduler latency (preemption enabled / disabled): 46 us / 41 us
maximum scheduler latency (preemption enabled / disabled): 233 us / 215 us

Any help in interpreting the data would be highly appreciated. Especially:
- Why does preemption lead to a higher minimum scheduler latency in the loaded 
case?
- Why does preemption worsen scheduler latency on the unloaded system?

Best regards,
Christoph

PS: I am not subscribed, please CC me if you answer!

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: 2.6.1 Scheduler Latency Measurements (Preemption diabled/enabled)
@ 2004-02-18 21:00 Roger Larsson
  0 siblings, 0 replies; 7+ messages in thread
From: Roger Larsson @ 2004-02-18 21:00 UTC (permalink / raw)
  To: Christoph Stueckjuergen, Robert Love; +Cc: linux-kernel

Christoph Stueckjuergen wrote:

>Hi,
>
>I performed a series of measurements comparing scheduler latency of a 2.6.1 
>kernel with preemption enabled and disabled on an AMD Elan (i486 compatible) 
>with 133 Mhz clock frequency.

OK, then you have worse hardware than I had when I started to measure
latency :-)

> - - - interesting way of trigger and measure deleted - - -

> The results are:
> "loaded" system, 10.000 samples
> average scheduler latency (preemption enabled / disabled): 170 us / 232 us
> minimum scheduler latency (preemption enabled / disabled): 49 us / 43 us
> maximum scheduler latency (preemption enabled / disabled): 840 us / 1063 us
> 
> "unloaded" system, 10.000 samples
> average scheduler latency (preemption enabled / disabled): 50 us / 44 us
> minimum scheduler latency (preemption enabled / disabled): 46 us / 41 us
> maximum scheduler latency (preemption enabled / disabled): 233 us / 215 us
> 

Robert Love said:
> That said, I would of expected slightly better numbers.

I would say that the numbers are quite good :-)
For comparation check
  http://www.gardena.net/benno/linux/audio/

There are some load tests there that you can use
to generate load: disk access, memory pressure, X11, ...

Note that more memory can result in worse latency, longer linked lists
to walk...

/RogerL

-- 
Roger Larsson
Skellefteå
Sweden

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-02-19  7:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-03 16:24 2.6.1 Scheduler Latency Measurements (Preemption diabled/enabled) Christoph Stueckjuergen
2004-02-04  0:19 ` Nick Piggin
2004-02-04  0:37 ` Robert Love
2004-02-18  3:41 ` Bill Davidsen
2004-02-18  4:07   ` Nick Piggin
2004-02-18  7:42     ` Christoph Stueckjuergen
  -- strict thread matches above, loose matches on Subject: below --
2004-02-18 21:00 Roger Larsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox