[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

345.0. "Swap of ALL-IN-1 subprocess" by VAXSPO::ANDRE () Fri Mar 27 1992 14:26

    
    	My customer said that the new memory management from VMS 5.4-3
    doesn't work for ALL-IN-1 subprocesses . In other words , VMS is
    not swapping out ALL-IN-1 subprocesses , even if they're doing
    nothing .
    	Anyone has more informations about it ??
    
    		thanks ,
    
    			Andre'
T.RTitleUserPersonal
Name
DateLines
345.1Subprocess is not idle ?UTRTSC::SCHOLLAERTHalf Dutch - Half BelgiumTue Mar 31 1992 15:5312
>    	My customer said that the new memory management from VMS 5.4-3
>    doesn't work for ALL-IN-1 subprocesses . In other words , VMS is
>    not swapping out ALL-IN-1 subprocesses , even if they're doing
>    nothing .

VMS works like expected. IDLE processes are swapped out.

$ sho proc /cont shows that the ALL-IN-1 subprocess is spending
CPU time, even when the main process is swapped.

Don't ask me why...
    
345.2spending CPU timeVAXSPO::ANDRETue Mar 31 1992 20:298
    
    	You're right , the subprocess is spending CPU time , but how can
    I explain that to my customer ??? 
    	Do you know any reason that forces subprocesses to spend CPU time ?
    
    	Thanks ,
    
    		Andre'
345.3SHALOT::LAMPSONWhatever ya do, ya gotta have FUN!Tue Mar 31 1992 22:348
        Well, every time a permanent symbol in ALL-IN-1 is created or
        updated and if the subprocess is open, a corresponding DCL symbol
        is created or updated.
        
        For example, if the code GET $MIKE = "ANYTHING HERE" is executed,
        the DCL symbol MIKE is created.
        
        _Mike
345.4OddAERO::TALLETTJust one more fix, then we can ship...Wed Apr 01 1992 09:1112
    
    	RE: .3
    
    	How can permanent symbols be getting created if the main process
    	is swapped?
    
    	This sounds wierd to me. Does it use LOTS of CPU or just the odd
    	tick? Its probably not lots or we would have had it bugged. So
    	whats going on? Something to do with mailboxes?
    
    Regards,
    Paul
345.5Slowly TickingUTRTSC::SCHOLLAERTHalf Dutch - Half BelgiumWed Apr 01 1992 09:4034
        RE. 4
    
>    	This sounds wierd to me. Does it use LOTS of CPU or just the odd
>    	tick? Its probably not lots or we would have had it bugged. So
        
        On a 6000, the process uses in 5 elapsed minutes:
        
        	* 0.1 of a second CPU 
        	* 100 page faults
        	* no I/O
        
        Hereby some snapshots of my batchjob checking the subprocess...
        
 Elapsed CPU time:          0 00:00:02.76
 Connect time:              0 00:50:28.43

 Elapsed CPU time:          0 00:00:02.77
 Connect time:              0 00:50:38.69

 Elapsed CPU time:          0 00:00:02.78
 Connect time:              0 00:51:09.32

 Elapsed CPU time:          0 00:00:02.79
 Connect time:              0 00:52:10.58

 Elapsed CPU time:          0 00:00:02.80
 Connect time:              0 00:52:20.93

 Elapsed CPU time:          0 00:00:02.81
 Connect time:              0 00:52:41.46

 Elapsed CPU time:          0 00:00:02.82
 Connect time:              0 00:52:51.67

345.6Einstein says you can't watch without disturbingIOSG::SHOVEDave Shove -- REO-D/3CWed Apr 01 1992 12:3310
    I expect you know this, but others may not -
    
    monitoring a process with SHOW PROC actually causes it to use a little
    CPU (because it's done using inter-process ASTs or something - it's a
    long time since I went on a VMS Internals course :-)). However, I don't
    believe it uses page faults, except sometimes for the first time.
    
    So I agree with Paul - it does sound wierd.
    
    Dave.
345.7Einstein : candidate for the VMS Internals course UTRTSC::SCHOLLAERTHalf Dutch - Half BelgiumWed Apr 01 1992 14:3143
    Dave,
    
    > I expect you know this, but others may not -
    >monitoring a process with SHOW PROC actually causes it to use a little
    >CPU (because it's done using inter-process ASTs or something - it's a
    
    No, I didn't. Don't tell my boss. But.....
    
    >         -< Einstein says you can't watch without disturbing >-
    
    Einstein must have lived long before "$SHOW SYSTEM" was invented.
    
    Have a look at the following 30 second snapshots from
    my main process (ALL-IN-1) and its subprocess (A1_SUB).
    
VAX/VMS V5.5  on node UTRYIT   1-APR-1992 13:41:51.46   Uptime  1 21:02:15
  Pid    Process Name    State  Pri      I/O       CPU       Page flts Ph.Mem
    
2CE01B76 A1_SUB          LEF      6      121   0 00:00:01.83       665    108  S
2CE01B76 A1_SUB          LEF      6      121   0 00:00:01.83       665    108  S
2CE01B76 A1_SUB          LEF      6      121   0 00:00:01.83       665     96  S
2CE01B76 A1_SUB          LEF      6      121   0 00:00:01.83       680    108  S
2CE01B76 A1_SUB          LEF      5      121   0 00:00:01.84       680     96  S
2CE01B76 A1_SUB          LEF      6      121   0 00:00:01.85       695    108  S
2CE01B76 A1_SUB          LEF      6      121   0 00:00:01.85       695    108  S
2CE01B76 A1_SUB          LEF      6      121   0 00:00:01.85       695     96  S
2CE01B76 A1_SUB          LEF      6      121   0 00:00:01.86       710    108  S
2CE01B76 A1_SUB          LEF      6      121   0 00:00:01.86       710    108  S
2CE01B76 A1_SUB          LEF      6      121   0 00:00:01.87       710     96  S
2CE01B76 A1_SUB          LEF      6      121   0 00:00:01.87       710     96  S
    
2CE0027E ALL-IN-1        LEF      4     3246   0 00:00:45.13     16277   2265   
2CE0027E ALL-IN-1        LEF      4     3246   0 00:00:45.13     16277   2265   
2CE0027E ALL-IN-1        LEF      4     3246   0 00:00:45.13     16277   2265   
2CE0027E ALL-IN-1        LEF      4     3246   0 00:00:45.13     16277   2265   
2CE0027E ALL-IN-1        LEF      4     3246   0 00:00:45.13     16277   2265   
2CE0027E ALL-IN-1        LEF      4     3246   0 00:00:45.13     16277   2265   
2CE0027E ALL-IN-1        LEF      4     3246   0 00:00:45.13     16277   2265   
2CE0027E ALL-IN-1        LEF      4     3246   0 00:00:45.13     16277   2265   
2CE0027E ALL-IN-1        LEFO     4       --  swapped  out  --           1886   
2CE0027E ALL-IN-1        LEFO     4       --  swapped  out  --           1886   
2CE0027E ALL-IN-1        LEFO     4       --  swapped  out  --           1886   
2CE0027E ALL-IN-1        LEFO     4       --  swapped  out  --           1886   
345.8The elevated priority is a big clue (for what?)BUFFER::VICKERSIf it helps a customer, DO ITWed Apr 01 1992 17:3526
    Dave, as always, is right on the money.  Of course, it was an physicist
    named Heisenburg who developed the theory of uncertainty which states
    that the act of measuring an event affects the event.  As explained
    quite fully on page 333 of the VAX/VMS INTERNALS AND DATA STRUCTURES by
    Ruth Goldenberg, $GETJPI must use a Special Kernel Mode AST to obtain
    process information since that information is maintained within the
    process space.  Sounds like Object Oriented Programming doesn't it?

    In any case, the CPU and page fault behavior is consistent with the
    effect of the ASTs being processed by the processes being observed.
    However, the changes in priority and memory usage indicate that the
    subprocess is doing other work, especially IO (causing the priority to
    be elevated).

    It is also interesting that the page faults for the subprocess jump by
    15 at roughly the same point as the main process was swapped out.

    I assume that you have done a SHOW PROC/CONT on the sub process to be
    sure that there are no images running there?  Of course, DCL itself is
    more than capable of doing enough IO to keep the priority elevated.

    Is the job tree complicated by having sub processes under A1_SUB by any
    chance?

    The current evidence is most strange, indeed,
    don
345.9The Morning afterUTRTSC::SCHOLLAERTHalf Dutch - Half BelgiumThu Apr 02 1992 09:2647
Hello,

>    In any case, the CPU and page fault behavior is consistent with the
>    effect of the ASTs being processed by the processes being observed.
>    However, the changes in priority and memory usage indicate that the
>    subprocess is doing other work, especially IO (causing the priority to
>    be elevated).

I think this is correct for $SHOW PROCESS. 
$SHOW SYSTEM does not affect any in or outswapped process. Don't
ask my why. To avoid the watcher-bewatched conflict I went home
and had a good night sleep.....

Last result of SHOW SYSTEM on 2 apr:

2CE01B76 A1_SUB          LEF      6      121   0 00:00:01.87       710     96  S
    
SHOW SYSTEM on 3 apr on the morning after

2CE01B76 A1_SUB          LEF      4      121   0 00:00:05.86     13124     93  S

Main process still swapped out...

2CE0027E ALL-IN-1        LEFO     4       --  swapped  out  --           1886   

>    It is also interesting that the page faults for the subprocess jump by
>    15 at roughly the same point as the main process was swapped out.

After the main process is swapped out, the subprocess keeps paging...

>    I assume that you have done a SHOW PROC/CONT on the sub process to be
>    sure that there are no images running there?  Of course, DCL itself is
>    more than capable of doing enough IO to keep the priority elevated.

Yip. The only thing I did in the subprocess was $set proc/name=A1_SUB.

>    Is the job tree complicated by having sub processes under A1_SUB by any
>    chance?

No tree.

>    The current evidence is most strange, indeed,

Indeed. Check on VMS 5.3, the subprocess is not using any resources...

Should it be VMS 5.4 forcing the subprocess to adjust its working set ?
Whats so special about the ALL-IN-1 subprocess ?
345.10Any chance there's an old VTX image in there??IOSG::SHOVEDave Shove -- REO-D/3CThu Apr 02 1992 12:5312
    That's A LOT of page-faulting. There obviously really is something
    going on in the subprocess (or $SHOW SYSTEM is a liar :-)). 
    
    The main process will sometimes use CPU when theoretically idle if
    broadcast trapping is turned on and there are some broadcasts (new
    mail, operator does REPLY/ALL, etc). Is there any chance that there's
    some image lying around in the subprocess that also does broadcast
    trapping (for example, VTX, TPU)?? Indeed, is there any image in the
    subprocess (according to SHOW PROC/CONT or f$getjpi(pid,"IMAGNAME"))?
    
    All very curious . . .
    Dave.
345.11story continuesUTRTSC::SCHOLLAERTHalf Dutch - Half BelgiumThu Apr 02 1992 17:2614
    Dave,
    
    There is nothing running in my subprocess.
    I just invoke ALL-IN-1 and $set proc/name=a1_sub 
    
    I found the cause of the problem. Its the new memory
    managament mechanism ITSELF !
    
    Set MMG_CTLFLAGS to 0 and no pagefault and no cpu-tick will
    occur.
    
    Big question: whats so special about the ALL-IN-1 subprocess ?
    
    Jan
345.12doing something?IOSG::DAVISMark DavisThu Apr 02 1992 18:2025
    
    
       Hi,
    
       I have looked at this on a 5.3 system - The ALL-IN-1 subprocess seems 
       to have a timer queue entry that is scheduled every minute exactly. The 
       timer queue entry appears immediately after ALL-IN-1 creates the 
       subprocess - this is stepping through with the debugger.
    
       On a 5.3 system the only noticeable thing that occurs when the timer 
       request goes off is that the process gets a priority boost.
    
       However on a 5.5 system with memory management I guess that the 
       following happens. Because of small activity every minute, the process 
       is identified as an periodically waking process - i.e one that is 
       liable not for swapping but for trimming of 25% of its pages when it 
       enters the wait state (assuming that free memory has fallen to less 
       than twice FREEGOAL). The next time it wakes up it needs to bring those 
       pages into memory - thus causing pagefaults and CPU usage. The CPU 
       would probably be too small to be detectable without the page faults.
    
       What it is trying to do every minute I don't know. 
    
       				Mark
    
345.13sorry , but ...VAXSPO::ANDREThu Apr 02 1992 21:195
    
    	Isn't possible that the ALL-IN-1 subprocess is created with a flag
    that disables swapping ?
    
    		Andre'
345.14Not thatIOSG::DAVISMark DavisFri Apr 03 1992 12:1020
    
    
    No, unless disable swapping is the default. 
    
    There seem to be two main problems here with the ALL-IN-1 subprocess.
    The first, as was said earlier, is that whenever a permanent symbol is
    created or modified in the main process, then the corresponding symbol
    is created or modified in the subprocess. This is done in the
    subprocess. Permanent symbols are frequently modified in the main
    process and so there will be continual activity in the subprocess
    while the main process is active.
    
    The other problem is that even when the main process is inactive or
    swapped out, there is a small amount of activity in the subprocess
    that is activated by an entry in the timer queue every minute. Perhaps
    this is some side effect of the create process system service.
    
    
    						Mark
    
345.15No timed wait that I can see; no flags eitherIOSG::SHUV::IOSG::SHOVEREO/D-3CFri Apr 03 1992 16:568
No. ALL-IN-1 issues a very simple $CREPRC call, with no flags or anything 
(other than pointing the input and output at appropriate mailboxes.)

I can't find anything in the code which waits for a minute.

Strange . . .

Dave.
345.16Effected more than ones a minuteUTRTSC::SCHOLLAERTHalf Dutch - Half BelgiumFri Apr 03 1992 17:2814
    > I can't find anything in the code which waits for a minute.
    
    The subprocess is more than ones a minute effected.
    
    Have a look at pagefaults during the following 10 sec snapshots.
    
  Pid    Process Name    State  Pri      I/O       CPU       Page flts Ph.Mem

2CE02764 A1_SUB          LEF      7       35   0 00:00:00.75       364     97  S
2CE02764 A1_SUB          LEF      7       35   0 00:00:00.75       364     97  S
2CE02764 A1_SUB          LEF      6       35   0 00:00:00.75       366     95  S
2CE02764 A1_SUB          LEF      6       35   0 00:00:00.75       379    108  S
2CE02764 A1_SUB          LEF      6       35   0 00:00:00.75       379    108  S