Path: utzoo!utgpu!watmath!clyde!att!ucbvax!ICAEN.UIOWA.EDU!dbfunk From: dbfunk@ICAEN.UIOWA.EDU (David B. Funk) Newsgroups: comp.sys.apollo Subject: Re: Huge data segments in SR10 Message-ID: <8811110459.AA25851@umaxc.weeg.uiowa.edu> Date: 11 Nov 88 04:30:17 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: Iowa Computer Aided Engineering Network, University of Iowa Lines: 40 In posting <130@tatti.utu.fi> Matti Jokinen (moj@utu.fi) Asks: >SR10 appears to use about 10 times more space per process than SR9.7 did. >Here is a sample output from `ps axv': (listing deleted) >The value of the SIZE field matches approximately the amount of disk space >lost when the process is started. Daemons alone consume more than 15 MB. >User processes are no smaller. Even without diskless clients and remote >users the peak load may go up to 30 MB if, for instance, cron and inetd >spawn a few background processes while you have two or three active windows >(I have once run out of disk space this way). >What is the motivation of such apparently wasteful use of resources? Or is >there something wrong in our system? Since the programs ran with much smaller >data segments in SR9.7, it seems obvious that the bulk of the space is unused. In "Domain System Software Release Notes" for SR10.0 there is a discussion of the changes to the system routines malloc() & rws_$alloc on page 1-18. The important part is that the requested storage is marked as "used" on disk at allocation time, not delayed until the pages are used. The net result is a process' stack frame is completely allocated at process creation time. Thus each new process you start eats up at least 500K bytes of disk space, even if it's just a little thing like pwd. Also pre-SR10 inprocess execution saved you the cost of a new stack for simple command execution. In the release notes, page 2-1 recommends: "All systems should have about four to five megabytes free disk space to boot and run a small number of server and user processes." (Emphasize the word "small".) Note that the regy daemon, rgyd (new at SR10), wants to keep a copy of the whole registry database in memory. The other NCS daemons that are needed at SR10 add to the memory demand. The bottom line is that SR10 uses up lots of resources, gone are the days that you could run a node with 1 meg of RAM and 34 meg of disk. Nice new things like long path & variable names, NCS, big directories, etc., cost resources. At a SR10 transition class, I heard a joking comment: "buy stock in disk drive companies." One thing that might help, you may be able to bind your small programs with a stack size smaller than the 256K byte default. Dave Funk