From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103734,27179c3b815f2f49,start X-Google-Attributes: gid103734,public X-Google-Thread: 1164f8,27179c3b815f2f49,start X-Google-Attributes: gid1164f8,public X-Google-Thread: fee84,27179c3b815f2f49,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-08-26 20:15:13 PST Path: bga.com!news.sprintlink.net!sundog.tiac.net!usenet From: hds@tang.tiac.net (David Scarbro) Newsgroups: comp.windows.x,comp.unix.osf.osf1,comp.sys.dec Subject: Alpha OSF1/2.0 server problem Date: 27 Aug 1994 03:13:24 GMT Organization: none Message-ID: <33mb0k$gg1@sundog.tiac.net> NNTP-Posting-Host: tang.tiac.net X-Newsreader: WinVN 0.90.5 Xref: bga.com comp.windows.x:10863 comp.unix.osf.osf1:3226 comp.sys.dec:5492 I'm posting this for a friend that does not have netnews access. If you have any insight into this problem he can be reached at the email address listed at the end of the message. Dec customer support has acknowledged the existence of this problem but as yet have not been able to provide a workaround or a patch. ------------------------------------------------ We have been tracking a strange problem in the Xdec X-server, running under OSF version 2.0. The program we are working on is unusual in that it creates many large pixmaps. The problem is that as we create more and more pixmaps, the server begins to grow out of proportion to the incremental space we are asking for. After a while, it becomes almost exponential, and we quickly run out of memory and swap space. We do not observe this problem under OSF version 1.3 or before. In all cases, both OSF 1.3 and 2.0, we have tested this on a 3000/500 and a 3000/300LX: same results. A further complication is that the problem does not seem to occur until after a substantial number of pixmaps have been created. Thus, it is likely that few (if any) developers have observed the problem! Also, various and unpredictable changes in the code can make the problem disappear, only to return when some other seemingly minor modification is made. To illustrate the problem, run an X client including this code: jlimit = 320; for (j=0; jdata[10] = j; /*useless: but prevents possible optimization*/ XPutImage(display, p, gc, ximage, 0, 0, 0, 0, 500, 500); XSync(display,False); } Rather than growing by 80 Mbytes, the server process size grows by 125 M-bytes. When these Pixmaps are destroyed -- or when the client process terminates -- the server process does not decrease in size. Sometimes, afterwards the server cannot make connections using shared memory. (Get SMT-WARNING ... using Unix-domain socket.) Setting jlimit down to 80 will result in no problems. The server will grow by about the expectred 20 M-bytes, and after the client process is terminated, all of this memory is returned to the system, as expected. Adding some delays sometimes causes the problem to disappear, changing the order of steps in the code sometimes helps, changing the size of the pixmaps (e.g. to 1024 x 1024 x 8) sometimes helps, but we have not been able to find a consistent set of rules, much less a set we could live width! The one consistent relationship seems to be that if the server grows only as expected, it returns the client-requested memory to OSF when the client is terminated, but if the server is "pushed" into the "bad" state (allocating more memory than is needed), it will not return any memory (except maybe a megabyte or so). Under OSF 1.3, the excessive growth problem does not occur, but we observe the well known problem that the server does not return any memory to OSF. This is unpleasant, but is one we can live with. Does anyone have a clue as to what is happening? I also have a complete test program that I can E-mail to anyone who wants to poke at it. It is about 13 K-bytes of c code, so I didn't want to clutter up this forum. Jeff Brenner jbrenner@piano.mecn.mass.edu (617) 944-5846