Bug 319911 - 2.6.9 and interactive task starvation
Summary: 2.6.9 and interactive task starvation
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.5
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Bryn M. Reeves
QA Contact: Martin Jenner
URL:
Whiteboard:
Depends On:
Blocks: 422551 430698
TreeView+ depends on / blocked
 
Reported: 2007-10-05 09:39 UTC by Bryn M. Reeves
Modified: 2018-11-14 18:12 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-06-10 14:46:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Mikes's patch to avoid expired starvation (2.04 KB, patch)
2007-10-05 09:39 UTC, Bryn M. Reeves
no flags Details | Diff
patch re-diffed for 2.6.9-55.EL (2.02 KB, patch)
2007-10-05 10:59 UTC, Bryn M. Reeves
no flags Details | Diff
re-diffed with correct directory prefix (2.05 KB, patch)
2007-10-05 19:23 UTC, Bryn M. Reeves
no flags Details | Diff

Description Bryn M. Reeves 2007-10-05 09:39:51 UTC
Description of problem:
The scheduler in 2.6.9 is subject to starvation problems with interactive tasks.
 Insertion of newly activated tasks into the active runqueue array can prevent
the scheduler draining the active array & switching to the inactive array,
effectively starving those tasks in the inactive array.

This is seen for e.g. with a large number of server processes being continually
awoken to service requests.

See:

http://lwn.net/Articles/176635/
http://lwn.net/Articles/176638/

Version-Release number of selected component (if applicable):
2.6.9-55.EL

How reproducible:
100% under the right conditions

Steps to Reproduce:
1. Create a situation where a number of processes are being continuously awoken
to service requests. E.g. configure apache httpd and generate a loadavg of ~10
using the ab tool.
2. Time the execution of some non-interactive tasks in a spare terminal, e.g.:

$ time netstat -n | grep unix | wc -l

  
Actual results:
Execution of the non-interactive tasks is delayed by very long periods (minutes
in some cases) due to starvation of the expired array. 

 
Expected results:
With the attached __activate_task patch applied delays are reported to be
drastically reduced (~10s of seconds).


Additional info:

Comment 1 Bryn M. Reeves 2007-10-05 09:39:51 UTC
Created attachment 217181 [details]
Mikes's  patch to avoid expired starvation

Comment 2 Bryn M. Reeves 2007-10-05 10:59:16 UTC
Created attachment 217221 [details]
patch re-diffed for 2.6.9-55.EL

Comment 4 Bryn M. Reeves 2007-10-05 14:31:21 UTC
Results from a dual core system running httpd at a 1m loadavg of ~6 (load
generated with ab):

RHEL4 baseline:
[root@p380-1 ~]# uname -r
2.6.9-55.ELsmp

[root@p380-1 ~]# time netstat|grep unix|wc -l
20

real    31m34.660s
user    0m4.476s
sys     0m48.278s

RHEL4 with avoid-interactive-starvation-rhel4.patch:
[root@p380-1 ~]# uname -r
2.6.9-55.EL.bz319911smp

[root@p380-1 ~]# time netstat|grep unix|wc -l
20

real    3m13.364s
user    0m4.583s
sys     0m51.709s

Raising severity as this has a huge impact on "victim" processes overall runtime.


Comment 6 Bryn M. Reeves 2007-10-05 19:23:16 UTC
Created attachment 217891 [details]
re-diffed with correct directory prefix

Comment 12 RHEL Program Management 2008-02-05 20:09:44 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.


Note You need to log in before you can comment on or make changes to this bug.