Re: hacking linux for web servers

Thu, 18 Dec 1997 22:39:01 +0100 (CET)

On Thu, 18 Dec 1997, Andreas Jellinghaus wrote:

> but i found no solution for b) yet. maybe someone has an idea ?
> the problem is that several tasks create much io but need no cpu time,
> and all other tasks have a hard time reading something. i'm looking for a
> good place where i can give normal tasks io priority over my "bad" tasks.

make_request() is called for all 'real' IO operation, so if an application
behaves bad, it will see make_request() often. You can increase an IO
statistics counter there (take care, you'll hit 32 bits fast), and then
you can weight this counter in goodness() apropriately. Is this a good
solution for your problem?

this will not cover writes, as we cache heavily there and things go
through bdflush, thus there is no easy (if at all) solution to identify
the 'originator' of write IO requests. Luckily, if there are lots of
writes, there will be lots of reads as well. (unless people are
logging/generating something, or are trying to be nasty on purpose)

-- mingo