Bug 319911 - 2.6.9 and interactive task starvation
2.6.9 and interactive task starvation
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.5
All Linux
high Severity high
: rc
: ---
Assigned To: Bryn M. Reeves
Martin Jenner
:
Depends On:
Blocks: 422551 430698
  Show dependency treegraph
 
Reported: 2007-10-05 05:39 EDT by Bryn M. Reeves
Modified: 2010-10-22 15:17 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-06-10 10:46:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Bryn M. Reeves 2007-10-05 05:39:51 EDT
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 05:39:51 EDT
Created attachment 217181 [details]
Mikes's  patch to avoid expired starvation
Comment 2 Bryn M. Reeves 2007-10-05 06:59:16 EDT
Created attachment 217221 [details]
patch re-diffed for 2.6.9-55.EL
Comment 4 Bryn M. Reeves 2007-10-05 10:31:21 EDT
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 15:23:16 EDT
Created attachment 217891 [details]
re-diffed with correct directory prefix
Comment 12 RHEL Product and Program Management 2008-02-05 15:09:44 EST
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.