* Alpha OSF1/2.0 server problem
@ 1994-08-27 3:13 David Scarbro
1994-08-28 3:25 ` Torbj|rn Lindgren
0 siblings, 1 reply; 12+ messages in thread
From: David Scarbro @ 1994-08-27 3:13 UTC (permalink / raw)
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; j<jlimit; j++)
{
p = XCreatePixmap(display, XtWindow(appshell), 512, 512, 8);
XSync(display,False);
ximage->data[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
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Alpha OSF1/2.0 server problem
1994-08-27 3:13 Alpha OSF1/2.0 server problem David Scarbro
@ 1994-08-28 3:25 ` Torbj|rn Lindgren
1994-08-29 13:03 ` Gary Newman
1994-09-01 18:08 ` Andre Beck
0 siblings, 2 replies; 12+ messages in thread
From: Torbj|rn Lindgren @ 1994-08-28 3:25 UTC (permalink / raw)
In article <33mb0k$gg1@sundog.tiac.net>,
David Scarbro <hds@tang.tiac.net> wrote:
>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.
Well, the problem is that free-ing memory does *not* return the memory
to the system under most versions of UNIX. Therefore memory that has
been allocated won't be freed until the program terminates.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Alpha OSF1/2.0 server problem
1994-08-28 3:25 ` Torbj|rn Lindgren
@ 1994-08-29 13:03 ` Gary Newman
1994-08-30 16:27 ` Greg Lueck Development Environment
1994-09-01 18:08 ` Andre Beck
1 sibling, 1 reply; 12+ messages in thread
From: Gary Newman @ 1994-08-29 13:03 UTC (permalink / raw)
Torbj|rn Lindgren (tl@cd.chalmers.se) wrote:
: In article <33mb0k$gg1@sundog.tiac.net>,
: David Scarbro <hds@tang.tiac.net> wrote:
: >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.
: Well, the problem is that free-ing memory does *not* return the memory
: to the system under most versions of UNIX. Therefore memory that has
: been allocated won't be freed until the program terminates.
Actually, the problem is that "malloc" uses the "sbrk" call to extend
memory, and that cannot be undone to free the memory later. A better
method would be to use "mmap" to add memory segments as needed, but
this would require a different malloc.
I don't know why there isn't a better malloc out there that uses mmap.
Anyone know?
--
Gary Newman gnewman@xmx.com
XMX Corp. voice: (617) 275-9694
One Oak Park Fax: (617) 271-9164
Bedford, MA 01730
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Alpha OSF1/2.0 server problem
1994-08-29 13:03 ` Gary Newman
@ 1994-08-30 16:27 ` Greg Lueck Development Environment
1994-08-30 23:00 ` David Scarbro
0 siblings, 1 reply; 12+ messages in thread
From: Greg Lueck Development Environment @ 1994-08-30 16:27 UTC (permalink / raw)
In article <CvAsAB.9tE@world.std.com>, gnewman@world.std.com (Gary Newman) writes:
|> Actually, the problem is that "malloc" uses the "sbrk" call to extend
|> memory, and that cannot be undone to free the memory later. A better
|> method would be to use "mmap" to add memory segments as needed, but
|> this would require a different malloc.
|>
|> I don't know why there isn't a better malloc out there that uses mmap.
|> Anyone know?
Actually, "sbrk" can be used to return memory to the system. Passing a
negative value to "sbrk" reduces the virtual size of the process. Thus, "free"
can return memory to the system when that memory is at the end of the process's
heap. The malloc system in DEC OSF/1 V3.0 supports this feature and even
allows applications to tune the behavior. See the malloc() manpage for more
details if you are interested.
--
-------------------------------------------------------------------------------
Greg Lueck Opinions expressed herein are my own.
lueck@zk3.dec.com
-------------------------------------------------------------------------------
--
-------------------------------------------------------------------------------
Greg Lueck Opinions expressed herein are my own.
lueck@zk3.dec.com
-------------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Alpha OSF1/2.0 server problem
1994-08-30 16:27 ` Greg Lueck Development Environment
@ 1994-08-30 23:00 ` David Scarbro
0 siblings, 0 replies; 12+ messages in thread
From: David Scarbro @ 1994-08-30 23:00 UTC (permalink / raw)
In article <33vmm3$mh6@jac.zko.dec.com>, lueck@gurgi.zk3.dec.com (Greg Lueck Development Environment) says:
>
>
>In article <CvAsAB.9tE@world.std.com>, gnewman@world.std.com (Gary Newman) writes:
>|> Actually, the problem is that "malloc" uses the "sbrk" call to extend
>|> memory, and that cannot be undone to free the memory later. A better
>|> method would be to use "mmap" to add memory segments as needed, but
>|> this would require a different malloc.
>|>
>|> I don't know why there isn't a better malloc out there that uses mmap.
>|> Anyone know?
>
>Actually, "sbrk" can be used to return memory to the system. Passing a
>negative value to "sbrk" reduces the virtual size of the process. Thus, "free"
>can return memory to the system when that memory is at the end of the process's
>heap. The malloc system in DEC OSF/1 V3.0 supports this feature and even
>allows applications to tune the behavior. See the malloc() manpage for more
>details if you are interested.
>
>--
>-------------------------------------------------------------------------------
>Greg Lueck Opinions expressed herein are my own.
>lueck@zk3.dec.com
>-------------------------------------------------------------------------------
>--
The Dec X Server provided with OSF/1 2.0 normally returns memory to the
system as described above and the Dec X Server provided with OSF/1 1.3
version does not. However, this was not the point of my original article.
The point was this:
If a large number of images are sent to Dec's OSF/1 2.0 server, it gets
into a state where it is adding exponentially more memory for each image
sent to it. It eventually starts allocing 2x's the memory required for
each image sent. Further, after it gets into this state it stops
returning memory to the system when the images are released.
This exponential allocation behavior is unique to the server that Dec
provides with OSF/1 2.0. It does not occur in either the OSF/1 1.3 server
or a server built from the X11R5 source code from MIT.
Dec customer support has acknowledged that the problem exists. They have
been able to reproduce it with the sample program provided in the
original article, Unfortunately, they have not been able to provide
a work around or a patch for the problem.
Does anyone have any insight into why the server provided with OSF/1
V2.0 is behaviing this way? And, more importantly, is there a fix or a
workaround?
Thanks in advance.
----
David Scarbro
hds@tang.tiac.net
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Alpha OSF1/2.0 server problem
1994-08-28 3:25 ` Torbj|rn Lindgren
1994-08-29 13:03 ` Gary Newman
@ 1994-09-01 18:08 ` Andre Beck
1994-09-01 18:42 ` AUSTIN PARK stefanovich boris
` (2 more replies)
1 sibling, 3 replies; 12+ messages in thread
From: Andre Beck @ 1994-09-01 18:08 UTC (permalink / raw)
In article <33p02t$j5c@nyheter.chalmers.se>, tl@cd.chalmers.se (Torbj|rn Lindgren) writes:
|> In article <33mb0k$gg1@sundog.tiac.net>,
|> David Scarbro <hds@tang.tiac.net> wrote:
|> >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.
|>
|> Well, the problem is that free-ing memory does *not* return the memory
|> to the system under most versions of UNIX. Therefore memory that has
|> been allocated won't be freed until the program terminates.
However, one would expect that OSF/1 would deal with it better. Of course
it does, in version 1.3 at least. For some strange reasons, DEC OSF/1 2.0
is _still_ not 1.3, but 1.2 ;(
--
+-o-+--------------------------------------------------------+-o-+
| o | \\\- Brain Inside -/// | o |
| o | ^^^^^^^^^^^^^^ | o |
| o | Andre' Beck (ABPSoft) Andre_Beck@IRS.Inf.TU-Dresden.de | o |
+-o-+--------------------------------------------------------+-o-+
^ permalink raw reply [flat|nested] 12+ messages in thread* AUSTIN PARK
1994-09-01 18:08 ` Andre Beck
@ 1994-09-01 18:42 ` stefanovich boris
1994-09-02 7:42 ` Alpha OSF1/2.0 server problem Burkhard Neidecker-Lutz
1994-09-07 20:39 ` Shawn C. Masters
2 siblings, 0 replies; 12+ messages in thread
From: stefanovich boris @ 1994-09-01 18:42 UTC (permalink / raw)
AUSTIN PARK MANAGEMENT - The Number One UNIX Recruiters in Canada
We are currently recruiting candidates with 2+ years of work experience in
sofware development, technical support, MAC, and Q.A. Testing. If you have
OOP, RDBMS (Sybase or Oracle), LAN/WAN, or Internet implementation experience,
we'd like to talk to you about opportunities with our client companies.
Call us at (416) 488-9565, Fax us at (416) 488-9601 or Snail us at:
AUSTIN PARK MANAGEMENT
40 Eglinton Avenue West
Suite #207
Toronto, Ontario
M4P 3A2
*************************call us before we call you!!************************
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Alpha OSF1/2.0 server problem
1994-09-01 18:08 ` Andre Beck
1994-09-01 18:42 ` AUSTIN PARK stefanovich boris
@ 1994-09-02 7:42 ` Burkhard Neidecker-Lutz
1994-09-07 16:41 ` Andre Beck
1994-09-07 20:39 ` Shawn C. Masters
2 siblings, 1 reply; 12+ messages in thread
From: Burkhard Neidecker-Lutz @ 1994-09-02 7:42 UTC (permalink / raw)
In article <3455ab$pe7@ztivax.zfe.siemens.de> beck@dali11.zfe.siemens.de (Andre Beck) writes:
>|> Well, the problem is that free-ing memory does *not* return the memory
>|> to the system under most versions of UNIX.
>
>However, one would expect that OSF/1 would deal with it better. Of course
>it does, in version 1.3 at least. For some strange reasons, DEC OSF/1 2.0
>is _still_ not 1.3, but 1.2 ;(
DEC OSF/1 V3.0's malloc *does* give memory back when the conditions are
right. And we didn't pick that feature up from OSFs OSF/1. DEC OSF/1 cannot
be characterized as being any one of the different OSF OSF/1 releases,
it contains technology from several and then a lot more.
Burkhard Neidecker-Lutz
GLASS Project, CEC Karlsruhe
Advanced Technology Group, Digital Equipment Corporation
neideck@nestvx.enet.dec.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Alpha OSF1/2.0 server problem
1994-09-02 7:42 ` Alpha OSF1/2.0 server problem Burkhard Neidecker-Lutz
@ 1994-09-07 16:41 ` Andre Beck
1994-09-08 15:09 ` Greg Lueck Development Environment
0 siblings, 1 reply; 12+ messages in thread
From: Andre Beck @ 1994-09-07 16:41 UTC (permalink / raw)
In article <346l15INNba1@usenet.pa.dec.com>, neideck@nestvx.enet.dec.com (Burkhard Neidecker-Lutz) writes:
|> In article <3455ab$pe7@ztivax.zfe.siemens.de> beck@dali11.zfe.siemens.de (Andre Beck) writes:
|> >|> Well, the problem is that free-ing memory does *not* return the memory
|> >|> to the system under most versions of UNIX.
|> >
|> >However, one would expect that OSF/1 would deal with it better. Of course
|> >it does, in version 1.3 at least. For some strange reasons, DEC OSF/1 2.0
|> >is _still_ not 1.3, but 1.2 ;(
|>
|> DEC OSF/1 V3.0's malloc *does* give memory back when the conditions are
|> right. And we didn't pick that feature up from OSFs OSF/1. DEC OSF/1 cannot
|> be characterized as being any one of the different OSF OSF/1 releases,
|> it contains technology from several and then a lot more.
|>
Is 3.0 out yet ? I accept that DEC OSF/1 is not exactly the same as
OSF/1 (vendor-adaption was one of the goals of OSF). However, mentioning
OSF/1 1.3 vs. 1.2 I mainly pointed to the difference between a Mach 2.5
Quasi-BSD Kernel vs. a Mach 3.0 real microkernel with OSF beeing a server
on it. This difference lets 1.3 introduce the concept of sparse filled
address spaces, which is the only _real_ way to allow free() to give
memory back to the system. The probability that one can lower the break
on a random free() is not that high - even with sorted pools. Thats a
problem which is immanent to the linear-extended address space concept.
--
+-o-+--------------------------------------------------------+-o-+
| o | \\\- Brain Inside -/// | o |
| o | ^^^^^^^^^^^^^^ | o |
| o | Andre' Beck (ABPSoft) Andre_Beck@IRS.Inf.TU-Dresden.de | o |
+-o-+--------------------------------------------------------+-o-+
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Alpha OSF1/2.0 server problem
1994-09-07 16:41 ` Andre Beck
@ 1994-09-08 15:09 ` Greg Lueck Development Environment
0 siblings, 0 replies; 12+ messages in thread
From: Greg Lueck Development Environment @ 1994-09-08 15:09 UTC (permalink / raw)
>Is 3.0 out yet ?
Yes, DEC OSF/1 V3.0 is out now. You should be able to get a copy by callng
1-800-DIGITAL.
--
-------------------------------------------------------------------------------
Greg Lueck Opinions expressed herein are my own.
lueck@zk3.dec.com
-------------------------------------------------------------------------------
--
-------------------------------------------------------------------------------
Greg Lueck Opinions expressed herein are my own.
lueck@zk3.dec.com
-------------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Alpha OSF1/2.0 server problem
1994-09-01 18:08 ` Andre Beck
1994-09-01 18:42 ` AUSTIN PARK stefanovich boris
1994-09-02 7:42 ` Alpha OSF1/2.0 server problem Burkhard Neidecker-Lutz
@ 1994-09-07 20:39 ` Shawn C. Masters
1994-09-08 13:09 ` Paul Southworth
2 siblings, 1 reply; 12+ messages in thread
From: Shawn C. Masters @ 1994-09-07 20:39 UTC (permalink / raw)
: |> David Scarbro <hds@tang.tiac.net> wrote:
: |> >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.
: |>
In the release notes for DEC OSF/1 V2 it states that after each
X session, the server has a 2.4 Meg leak. The correction is to put a
terminate option in the server command, so the server terminates after
every disconnect.
73,
Shawn KE4GHS
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Alpha OSF1/2.0 server problem
1994-09-07 20:39 ` Shawn C. Masters
@ 1994-09-08 13:09 ` Paul Southworth
0 siblings, 0 replies; 12+ messages in thread
From: Paul Southworth @ 1994-09-08 13:09 UTC (permalink / raw)
In article <34l8db$5bk@portal.gmu.edu>,
Shawn C. Masters <smasters@bzy.gmu.edu> wrote:
> In the release notes for DEC OSF/1 V2 it states that after each
>X session, the server has a 2.4 Meg leak. The correction is to put a
>terminate option in the server command, so the server terminates after
>every disconnect.
More precisely, if you're using xdm, you need to change
/usr/lib/X11/xdm/Xservers to look like this:
#
# Xservers file, workstation prototype
#
# This file should contain an entry to start the server on the
# local display; if you have more than one display (not screen),
# you can add entries to the list (one per line). If you also
# have some X terminals connected which do not support XDMCP,
# you can add them here as well. Each X terminal line should
# look like:
# XTerminalName:0 foreign
#
# To use the shared memory transport, change the :0 in the ":0 local"
# line to local:0 like this:
# local:0 local /usr/bin/X11/X
#
:0 local /usr/bin/X11/X -terminate
--
Paul Southworth
CICNet Systems Support
pauls@cic.net
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~1994-09-08 15:09 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-08-27 3:13 Alpha OSF1/2.0 server problem David Scarbro
1994-08-28 3:25 ` Torbj|rn Lindgren
1994-08-29 13:03 ` Gary Newman
1994-08-30 16:27 ` Greg Lueck Development Environment
1994-08-30 23:00 ` David Scarbro
1994-09-01 18:08 ` Andre Beck
1994-09-01 18:42 ` AUSTIN PARK stefanovich boris
1994-09-02 7:42 ` Alpha OSF1/2.0 server problem Burkhard Neidecker-Lutz
1994-09-07 16:41 ` Andre Beck
1994-09-08 15:09 ` Greg Lueck Development Environment
1994-09-07 20:39 ` Shawn C. Masters
1994-09-08 13:09 ` Paul Southworth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox