linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Bradford <john@grabjohn.com>
To: felipe_alfaro@linuxmail.org, john@grabjohn.com
Cc: helgehaf@aitel.hist.no, linux-kernel@vger.kernel.org
Subject: Re: O(1) scheduler & interactivity improvements
Date: Mon, 23 Jun 2003 13:44:14 +0100	[thread overview]
Message-ID: <200306231244.h5NCiE1Q000920@81-2-122-30.bradfords.org.uk> (raw)

> > > Maybe I have different a different idea of what "interactive" should be.
> > 
> > [snip]
> > 
> > > moving windows around the screen do feel jerky and laggy at best
> > > when the machine is loaded. For a normal desktop usage, I prefer all
> > > my intensive tasks to start releasing more CPU cycles so moving a
> > > window around the desktop feels completely smooth
> > 
> > That's fine for a desktop box, but I wouldn't really want a heavily
> > loaded server to have database queries starved just because somebody
> > is scrolling through a log file, or moving windows about doing admin
> > work.
>
> I agree 100%... So this leads us to having two different set of
> scheduler policies: for desktop usage, and for server usage. For desktop
> usage, most of the apps need CPU bursts for a bried period of time. For
> server usage, we want a more steady scheduling plan.

Unfortunately, what is good for a desktop box is often counter
productive for a server :-(

> > If I was simply typing a letter, I wouldn't really care about
> > interactivity.  If I was using a heavily loaded server to do it,
> > (unlikely), I'd rather the wordprocessor was starved, and updated the
> > screen once per second, and gave more time to the server processes,
> > because I don't need the visual feedback to carry on typing.  Screen
> > updates are a waste of CPU in that instance - it might look nice, but
> > all it's doing is starving the CPU even more.
>
> So, opaque window moving is also a waste of time and we'd better stick
> to border-only (transparent) window moving ;-)

Well, no, opaque window moving is fine if the CPU isn't at 100%.  If
it is, I'd rather see choppy window movements than have a server
application starved of CPU.  That's just my preference, though.

> Nah! I also think it'a waste of time, but Joe-end-user won't think the
> same. He'll have a better feeling using more CPU to refresh the screen
> at a faster rate, even when that's a waste of CPU cycles.

I totally agree, but it's really tempting to say that that's the
distribution's responsibility to renice the X server, and let the
kernel default to doing the Right Thing, which is to starve screen
refreshes in favour of 'real' work.

Of course, people who are running X on a server for admin tasks could
always renice their X server to a lower priority to achieve a similar
effect.

> > I propose a radically different approach to scheduling, why not
> > favour processes that cause the fewest cache faults?  I.E. if a
> > process that gets more done in it's timeslice is more deserving of
> > it.  It might look ugly with screen updates being starved, but it
> > would probably get more work done :-).
>
> What would happen with poorly written programs? There are a lot of them
> that don't take advantage of memory locality, are not designed to fully
> utilize the cache, or use arrays in a way that produces too much
> page/cache faults.

Those programs are broken by design :-), (especially on NUMA
hardware).

I was just thinking that with cache-friendly processes being given a
bigger timeslice, we wouldn't be filling the cache with irrelevant
data so often.

John.

             reply	other threads:[~2003-06-23 12:22 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-23 12:44 John Bradford [this message]
2003-06-23 16:32 ` O(1) scheduler & interactivity improvements Helge Hafting
2003-06-23 19:00   ` Felipe Alfaro Solana
2003-06-23 19:17     ` Helge Hafting
2003-06-24 22:41   ` Timothy Miller
2003-06-25 21:42     ` Helge Hafting
2003-06-25 23:16       ` Timothy Miller
2003-06-23 21:48 ` Bill Davidsen
  -- strict thread matches above, loose matches on Subject: below --
2003-06-23 23:32 John Bradford
2003-06-24  4:13 ` Bill Davidsen
2003-06-23 19:20 John Bradford
2003-06-23 10:50 John Bradford
2003-06-23 11:22 ` Felipe Alfaro Solana
2003-06-23 11:36 ` Denis Vlasenko
2003-06-22 16:07 Felipe Alfaro Solana
2003-06-22 20:00 ` Davide Libenzi
2003-06-23 12:50   ` Jesse Pollard
2003-06-23  8:09 ` Helge Hafting
2003-06-23 10:18   ` Felipe Alfaro Solana
2003-06-23 16:21     ` Daniel Gryniewicz
2003-06-23 18:59       ` Felipe Alfaro Solana
2003-06-23 16:47     ` Helge Hafting
2003-06-24 18:12       ` Bill Davidsen
2003-06-25 21:41         ` Helge Hafting
     [not found]       ` <5.2.0.9.2.20030624215008.00ce73b8@pop.gmx.net>
2003-06-26  9:59         ` Helge Hafting
2003-06-26 10:39           ` Mike Galbraith
2003-06-26 14:50           ` Bill Davidsen
2003-06-26 23:10           ` Timothy Miller
     [not found]           ` <Pine.LNX.3.96.1030626104733.17562D-100000@gatekeeper.tmr.c om>
2003-06-27  6:36             ` Mike Galbraith
2003-06-27  8:18               ` Helge Hafting
2003-06-27  9:46                 ` Mike Galbraith
2003-06-27 11:39                   ` Helge Hafting
2003-06-27 12:18                     ` Mike Galbraith
2003-06-28  3:51                   ` Bill Davidsen
     [not found]                   ` <Pine.LNX.3.96.1030627234408.25848A-100000@gatekeeper.tmr.c om>
2003-06-28  5:44                     ` Mike Galbraith
2003-06-28 14:34                       ` Helge Hafting
2003-06-29  6:08                         ` Mike Galbraith
2003-06-30 13:37                       ` Bill Davidsen
2003-06-27  6:54           ` jw schultz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200306231244.h5NCiE1Q000920@81-2-122-30.bradfords.org.uk \
    --to=john@grabjohn.com \
    --cc=felipe_alfaro@linuxmail.org \
    --cc=helgehaf@aitel.hist.no \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).