Source Code Review Form 
=======================
(version 1.2)

Date: 2007-03-29

1 Identification

AH-2007-03-29-0: Bugfix:    quota verification time may not grow with the number of queues if all jobs go in single queue
                 Bugster:   6539215
                 Review:    RD

2 Conformance to specification

2 [x] yes
2 [ ] no - comment:


3 Documentation

3.1 user/admin guide
3.1 [x] yes
3.1 [ ] no - comment:

3.2 man pages (user view)
3.2 [x] yes
3.2 [ ] no - comment:

3.3 -help output
3.3 [x] yes
3.3 [ ] no - comment:

3.4 documented interfaces (at least GDI, EVI, libs, ADOC format)
3.4 [x] yes
3.4 [ ] no - comment:

3.5 messages, output formats
3.5 [x] yes
3.5 [ ] no - comment:

3.6 Bugster CR and Issuezilla
3.6 [x] yes
3.6 [ ] no - comment:

3.7 Issuezilla
3.7 [x] yes
3.7 [ ] no - comment:


4 Source review

4.1 Style guide conformance
4.1 [x] yes
4.1 [ ] no - comment:

4.2 Memory leaks
4.2 [x] yes
4.2 [ ] no - comment: 

4.3 Thread safe
4.3 [x] yes
4.3 [ ] no


5 Tests

5.1 flawfinder diff
No new flaws.
5.1 [ ] yes
5.1 [x] no

5.2 Used memory leak debugger
5.2 [ ] yes
5.2 [x] no - comment: NA

5.3 Manual tests
5.3 [x] yes
5.3 [ ] no - comment:
Configure 100 queues Q001-Q100. The queues should have no load thresholds, 
4 slots per node and be available for @allhosts. Use at least 4 execution 
hosts as to get a halfway realistic performance behavoir. Enable scheduler
profiling with sched_conf(5) params setting PROFILE=true. Configure five
projects Project1-Project5. Configure 10 INT consumable resources F001-F010
and with each of them having a global capacity of 100. Configure a resource
quota that limits use of F001-F010 to 1 per project

  limit  projects {*} to F001=1,F002=1,F003=1,F004=1,F005=1,F006=1,F007=1,F008=1,F009=1,F010=1

before job submission disable all queues using qmod -d "*" and remove the
sge_schedd messages file. 

Then submit 1000 sequential jobs: For each of the five projects submit a series of
20 identical jobs requesting -l F001=1 to -l F010=1 (5*10*20 = 1000). Jobs can
be normal sleeper jobs that remain 5 minutes pending or even more.

When all jobs are submitted enable all queues using qmod -e "*" and record the 
first 'n' schedd profiling messages with job dispatching time contained using 

   # grep "job dispatching took" $SGE_ROOT/default/spool/qmaster/schedd/messages | head -7

Before the fix the follwing numbers were typical

   03/28/2007 17:49:59|schedd|es-ergb01-01|P|PROF: job dispatching took 3.840 s (1000 fast, 0 comp, 0 pe, 0 res)
   03/28/2007 17:50:05|schedd|es-ergb01-01|P|PROF: job dispatching took 2.180 s (950 fast, 0 comp, 0 pe, 0 res)
   03/28/2007 17:50:10|schedd|es-ergb01-01|P|PROF: job dispatching took 2.160 s (950 fast, 0 comp, 0 pe, 0 res)
   03/28/2007 17:50:15|schedd|es-ergb01-01|P|PROF: job dispatching took 2.170 s (950 fast, 0 comp, 0 pe, 0 res)
   03/28/2007 17:50:20|schedd|es-ergb01-01|P|PROF: job dispatching took 2.130 s (950 fast, 0 comp, 0 pe, 0 res)
   03/28/2007 17:50:26|schedd|es-ergb01-01|P|PROF: job dispatching took 2.170 s (950 fast, 0 comp, 0 pe, 0 res)
   03/28/2007 17:50:31|schedd|es-ergb01-01|P|PROF: job dispatching took 2.170 s (950 fast, 0 comp, 0 pe, 0 res)

after the fix these numbers are typical

   03/29/2007 16:24:10|schedd|es-ergb01-01|P|PROF: job dispatching took 1.580 s (1000 fast, 0 comp, 0 pe, 0 res)
   03/29/2007 16:24:12|schedd|es-ergb01-01|P|PROF: job dispatching took 0.020 s (950 fast, 0 comp, 0 pe, 0 res)
   03/29/2007 16:24:17|schedd|es-ergb01-01|P|PROF: job dispatching took 0.020 s (950 fast, 0 comp, 0 pe, 0 res)
   03/29/2007 16:24:22|schedd|es-ergb01-01|P|PROF: job dispatching took 0.030 s (950 fast, 0 comp, 0 pe, 0 res)
   03/29/2007 16:24:27|schedd|es-ergb01-01|P|PROF: job dispatching took 0.030 s (950 fast, 0 comp, 0 pe, 0 res)
   03/29/2007 16:24:32|schedd|es-ergb01-01|P|PROF: job dispatching took 0.030 s (950 fast, 0 comp, 0 pe, 0 res)
   03/29/2007 16:24:37|schedd|es-ergb01-01|P|PROF: job dispatching took 0.030 s (950 fast, 0 comp, 0 pe, 0 res)


5.4 Testsuite covers issue
5.4 [ ] yes
5.4 [x] no - comment: Created testsuite issue #2226

5.5 If 5.4 = no: Testsuite issue created
5.5 [x] yes
5.5 [ ] no - comment:

5.6 Testsuite run successfull
5.6 [ ] yes
5.6 [x] no - comment: Covered by manual tests.

6 Comments

7 Accepted
7 [x] yes
7 [ ] no - comment:
