From: se@IKP.Uni-Koeln.DE (Stefan Esser)
Newsgroups: comp.unix.ultrix
Subject: Re: DECstation 5000/240 hangs
Keywords: DECstation 5000/240 hangs
Date: 7 Apr 92 20:32:01 GMT
Organization: Institute of Nuclear Physics, University of Cologne, Germany

In article <1992Apr5.023126.12607@luga.latrobe.edu.au>, cchd@lucifer.latrobe.edu.au (Huw Davies) writes:
|> We have recently upgraded a DECstation 5000/120 to a 5000/240. The
|> system is used as a timesharing system and has 64Mb of memory, two
|> Wren disks, Presoserve, an Exabyte and DEC CD-ROM.

What is the size of your swap partitions ?


|> last pid:  9121;  load averages: 82.91, 82.10, 78.33                   12:17:40
|> 158 processes: 155 sleeping, 1 running, 2 stopped
|> Cpu states:  0.7% user,  0.0% nice,  1.6% system, 97.7% idle                lux
|> Memory: 28920K ( 5540K) real, 44768K ( 9600K) virtual, 21800K free
|> 
|>   915 cchd      55  -10   884K  668K run    18:11  0.00%  0.00% top
|> 29882 9109214g  25    0   332K   80K stop    0:00  0.00%  0.00% vi
|>  7791 9124698t   4    0   328K  148K stop    0:03  0.00%  0.00% ftp

We had a similar problem, but probably for a different reason.

Since the disk write performance of the DECstation 5000 with the 
current Ultrix release is very low (~400 KB/s) its easy to saturate 
a drive with write operations. 

Now Ultrix has a silly 'feature': It calls fsync() as part of fclose(). 
If you write a large file (eg. 10 MB) the buffer cache will be filled 
with data of this single file.
If you close the file, the system wants to write out the buffers 
as quick as possible, and seems to do this with much higher priority 
than reading data requested by other processes or pageing.

Given the low write speed this leads to a 20 second 'hang' until 
all data has been flushed to disk and the inode has been updated.
Since many processes become active once in a while, this results 
in a very large run queue and thus the observed load average.

Since we write about 10 files of 32MB each (and about 500 smaller ones)
after each run of our exp. data analysis programs (about twice an hour)
this is very annoying ...
The machine 'hangs' twice an hour for some minutes if this program is 
running :-(.   (and its running day and night for month ...)

|> I can see the load average :-( and this explains the hang. Any ideas????

you could check whether there is much disk activity (but your top output 
suggests it isn't, since the system % is very low).
Anyway the symptoms you describe are typical for a situation, in which 
the machine isn't able to run many processes, which are only waiting for 
a page in.
Maybe there is something not configured correctly or your applications 
do 'funny' things you didn't write about (eg. very large processes, large 
shared memory segments) ...

STefan

PS: I consider calling fsync() on fclose() braindamaged, since it makes 
    it very hard to get good interactive performance, when large writes
    occur. Of course this guarantees file system consistence, but I'd rather 
    get my data to disk fast, so that there is something I'd have to worry 
    about getting inconsistent ...
    Why are such changes (synchronous data writes on file close) made 
    to Ultrix and why don't I get a chance to turn them off ?
-- 
 Stefan Esser,  Institute of Nuclear Physics,  University of Cologne,  Germany
 se@IKP.Uni-Koeln.DE                                           [134.95.192.50]
Newsgroups: comp.unix.ultrix