home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / sun / misc / 6164 < prev    next >
Encoding:
Text File  |  1993-01-07  |  3.6 KB  |  80 lines

  1. Newsgroups: comp.sys.sun.misc
  2. Path: sparky!uunet!fmrco!fmrco!msommer
  3. From: fmrco!msommer@uunet.uu.net (Mark Sommer)
  4. Subject: System Mode Swamp on Sparc 2
  5. Message-ID: <FMRCO!MSOMMER.93Jan7093547@ampere.uunet.uu.net>
  6. Sender: news@fmrco.uucp
  7. Organization: Fidelity Management & Research Co.
  8. Distribution: usa
  9. Date: Thu, 7 Jan 1993 14:35:47 GMT
  10. Lines: 68
  11.  
  12. A program of mine, for some unknown reason, spends an inordinate
  13. amount of time in system mode. Any insights or suggestions would be
  14. welcome. 
  15.  
  16. My program calls a Fortran function to solve a large quadratic
  17. programming problem. The program is extremely computationally
  18. intensive and it runs very large (>10MB), but my machine has 48MB of
  19. memory and lots of swap space (>80MB), so I would have expected it to
  20. spend most of its time in user mode. In fact, according to many
  21. indicators (such as gprof), it spends most of its time in kernel mode.
  22. I've included information I think might be relevant.
  23.  
  24. This is what ps says about my program:
  25.  
  26.   ampere% ps -u
  27.   USER       PID %CPU %MEM   SZ  RSS TT STAT START  TIME COMMAND
  28.   msommer  22245 83.3  9.510232 4436 p1 R    15:07  27:51 portopt -p /tmp/port-222
  29.  
  30. I was first alerted to the problem when I "time"d a script (porto)
  31. that runs my program (portopt). (Presumably, the "time" command
  32. tabulates for all porto's child processes.) The 164 page faults
  33. and 0 swaps seem reasonable to me:
  34.  
  35.   ampere% time porto > opt
  36.   187.240u 3576.250s 1:17:39.44 80.7% 0+2251k 11+47io 164pf+0w
  37.  
  38. Pstat says I'm using all my physical memory, but have lots of virtual
  39. memory left:
  40.  
  41.   ampere% /etc/pstat -s
  42.   20260k allocated + 10172k reserved = 30432k used, 49844k available
  43.  
  44. According to "trace -p", my program doesn't do any system calls during
  45. the bulk of its runtime.
  46.  
  47. Here's what vmstat says as portopt is running. Notice, there doesn't
  48. seem to be an unusual amount of paging or swapping, yet the cpu's "sy"
  49. column is pegged:
  50.  
  51.  procs     memory              page               disk       faults     cpu
  52.  r b w   avm   fre  si so  pi  po  fr  de  sr s0 d1 d2 d3  in  sy  cs us sy id
  53.  1 0 0     0  2272  10  0   0   0   0   0   0 46  0  0  0 214 264  44  6 94  0
  54.  1 0 0     0  2272   5  0   0   0   0   0   0  3  0  0  0 114 163  34  7 93  0
  55.  1 0 0     0  2272   5  0   0   0   0   0   0  0  0  0  0  80 190  42  5 95  0
  56.  1 0 0     0  2272  10  0   0   0   0   0   0  0  0  0  0  60 181  39  5 95  0
  57.  1 0 0     0  2272   0  0   0   0   0   0   0  0  0  0  0  65 198  43  5 95  0
  58.  1 0 0     0  2272   0  0   0   0   0   0   0  0  0  0  0  72 260  53  6 94  0
  59.  1 0 0     0  2272  10  0   0   0   0   0   0 46  0  0  0 203 180  41  7 93  0
  60.  1 0 0     0  2272   5  0   0   0   0   0   0 13  0  0  0 131 152  36  8 92  0
  61.  1 0 0     0  2272   0  0   0   0   0   0   0  0  0  0  0  73 137  34  6 94  0
  62.  1 0 0     0  2272   0  0   0   0   0   0   0  0  0  0  0  56 141  34  6 94  0
  63.  1 0 0     0  2272   0  0   0   0   0   0   0  0  0  0  0  51 114  31  6 94  0
  64.  1 0 0     0  2272   0  0   0   0   0  16   0  0  0  0  0  42  92  26  4 96  0
  65.  2 0 0     0  2272  10  0   0   0   0   0   0 47  0  0  0 182 154  37  5 95  0
  66.  1 0 0     0  2272   5  0   0   0   0   0   0  2  0  0  0 126 171  39  6 94  0
  67.  1 0 0     0  2272   5  0   0   0   0   0   0  0  0  0  0  77 178  41  6 94  0
  68.  1 0 0     0  2272  10  0   0   0   0   0   0  0  0  0  0  64 184  40  3 97  0
  69.  1 0 0     0  2272   0  0   0   0   0   0   0  0  0  0  0  51 163  37  4 96  0
  70.  1 0 0     0  2272   0  0   0   0   0  16   0  0  0  0  0  60 193  41  3 97  0
  71.  1 0 0     0  2272  10  0   0   0   0   0   0 47  0  0  0 164 140  34  7 93  0
  72.  
  73.  
  74. Can anyone explain what's going on?
  75. --
  76. Mark Sommer
  77. Fidelity Management and Research
  78.  
  79.  
  80.