xterm: huge process size and resident set size

xterm: huge process size and resident set size

Post by Bruce Hamilt » Sun, 19 Jan 2003 09:55:00



Solaris 9 FCS with Recommended patches through approx. October 2002;
CDE.

What causes an xterm to hang for on the order of a minute when I
resize it? The system is banging noisily on the disk the whole time. I
have approx. 720 MB of free swap out of a GB, 320 MB RAM, and / is
less than 50% full. This is an Ultra 10/ 300 MHz, but I have seen
similar behavior on many other systems and at other installations, so
I'm convinced that it's either an xterm or a Solaris issue.

The scroll-back log is not even that large (although I always start my
xterms with "-sl 10000" (ten thousand lines max scrollback).

I see that the xterm process size is 145M and RSS is 134M, so that
seems to be the immediate cause of the performance issue. The question
then becomes, what could cause those numbers to be so large?, because
most of my other xterms have sizes around 20MB and RSSs of around 3MB.

Thanks for any suggestions.

--Bruce

 
 
 

xterm: huge process size and resident set size

Post by Fredrik Lundho » Sun, 19 Jan 2003 10:10:30




>Solaris 9 FCS with Recommended patches through approx. October 2002;
>CDE.

>What causes an xterm to hang for on the order of a minute when I
>resize it? The system is banging noisily on the disk the whole time. I

I wonder, do S9 come with the "improved" XF86 version of xterm or the
old regular 6.4 one??

What happens if you try the xterm binary from a S8 installation??

Quote:>xterms with "-sl 10000" (ten thousand lines max scrollback).

Something reasonable should really be compiled in, out of the box
scrollback is useless.

/wfr
Fredrik
--
Fredrik Lundholm  


 
 
 

xterm: huge process size and resident set size

Post by Alan Coopersmit » Sun, 19 Jan 2003 12:34:15




|>Solaris 9 FCS with Recommended patches through approx. October 2002;
|>CDE.
|>
|>What causes an xterm to hang for on the order of a minute when I
|>resize it? The system is banging noisily on the disk the whole time. I
|
|I wonder, do S9 come with the "improved" XF86 version of xterm or the
|old regular 6.4 one??

Neither.  It's a version derived from the li18nux.org version (new to
S9).

--
________________________________________________________________________


  Working for, but definitely not speaking for, Sun Microsystems, Inc.

 
 
 

xterm: huge process size and resident set size

Post by Thomas Dicke » Mon, 20 Jan 2003 04:32:20






> |>Solaris 9 FCS with Recommended patches through approx. October 2002;
> |>CDE.
> |>
> |>What causes an xterm to hang for on the order of a minute when I
> |>resize it? The system is banging noisily on the disk the whole time. I
> |
> |I wonder, do S9 come with the "improved" XF86 version of xterm or the
> |old regular 6.4 one??
> Neither.  It's a version derived from the li18nux.org version (new to
> S9).

that one uses more memory per cell than either X11R6 or XFree86 xterm, btw.

(I'm still curious if Sun actually shipped the version with the li18nux.org
patch, since reading through it I saw some added bugs).

--

http://dickey.his.com
ftp://dickey.his.com

 
 
 

xterm: huge process size and resident set size

Post by Casper H.S. Di » Mon, 20 Jan 2003 20:57:30



>that one uses more memory per cell than either X11R6 or XFree86 xterm, btw.
>(I'm still curious if Sun actually shipped the version with the li18nux.org
>patch, since reading through it I saw some added bugs).

Quite a few bugs in the new xterm were fixed during S9 development.

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

xterm: huge process size and resident set size

Post by Thomas Dicke » Tue, 21 Jan 2003 01:06:13




>>(I'm still curious if Sun actually shipped the version with the li18nux.org
>>patch, since reading through it I saw some added bugs).
> Quite a few bugs in the new xterm were fixed during S9 development.

Then it would be fair to say that the S9 xterm was inspired by the
li18nux.org patch, rather than actually corresponding to it.

(I haven't had an opportunity to test the final version - the one based
on the patch failed a few cases in vttest).

--

http://dickey.his.com
ftp://dickey.his.com

 
 
 

xterm: huge process size and resident set size

Post by Alan Coopersmit » Tue, 21 Jan 2003 02:11:26





|
|>>(I'm still curious if Sun actually shipped the version with the li18nux.org
|>>patch, since reading through it I saw some added bugs).
|
|> Quite a few bugs in the new xterm were fixed during S9 development.
|
|Then it would be fair to say that the S9 xterm was inspired by the
|li18nux.org patch, rather than actually corresponding to it.

Right - I did say "derived from", which was intended to imply that.

--
________________________________________________________________________


  Working for, but definitely not speaking for, Sun Microsystems, Inc.

 
 
 

xterm: huge process size and resident set size

Post by Bruce Hamilt » Thu, 30 Jan 2003 05:48:21


No one has address my original question: why does Solaris 9 (FCS
patched through October 2002) thrash for a full minute when I resize
some random xterm in CDE, which often has a fairly small (few dozen
lines) scrollback history? How can I either fix or try to debug this?

I have 320 MB memory and 1GB swap.

"swap -s" shows around 3/4 GB of the swap is unused.

--Bruce

 
 
 

xterm: huge process size and resident set size

Post by Greg Andre » Thu, 30 Jan 2003 06:17:44



>No one has address my original question: why does Solaris 9 (FCS
>patched through October 2002) thrash for a full minute when I resize
>some random xterm in CDE, which often has a fairly small (few dozen
>lines) scrollback history? How can I either fix or try to debug this?

Does it do this when that xterm window is the ONLY thing you
have launched under CDE?

If it doesn't do it with just one xterm window, how many xterm
wondows does it take before it starts happening?  How many xterm
windows (and other programs) do you normally launch under CDE?

  -Greg
--
Do NOT reply via e-mail.
Reply in the newsgroup.

 
 
 

xterm: huge process size and resident set size

Post by Thomas Dicke » Thu, 30 Jan 2003 19:56:31



Quote:> No one has address my original question: why does Solaris 9 (FCS
> patched through October 2002) thrash for a full minute when I resize
> some random xterm in CDE, which often has a fairly small (few dozen
> lines) scrollback history? How can I either fix or try to debug this?

It's hard to say - you're running Sun's copy of xterm, which doesn't exactly
correspond to X11R6 or XFree86 xterms.

The few followups from Sun's people are content-free.  I don't recall a leak in
the resize code for xterm, but that would account for it.  (Essentially the
scrollback buffer is a large chunk of memory which is reallocated each time you
resize xterm).

There are other bugs in X11R6's resize code which I fixed long ago in XFree86,
but since we don't know which ones Sun fixed, it's hard to say.  The li18nux
patch added at least one bug, which - from the content-free responses, it is
not possible to say if Sun caught that.

--

http://dickey.his.com
ftp://dickey.his.com

 
 
 

xterm: huge process size and resident set size

Post by Bruce Hamilt » Fri, 31 Jan 2003 16:24:49




> >No one has address my original question: why does Solaris 9 (FCS
> >patched through October 2002) thrash for a full minute when I resize
> >some random xterm in CDE, which often has a fairly small (few dozen
> >lines) scrollback history? How can I either fix or try to debug this?

> Does it do this when that xterm window is the ONLY thing you
> have launched under CDE?

> If it doesn't do it with just one xterm window, how many xterm
> wondows does it take before it starts happening?  How many xterm
> windows (and other programs) do you normally launch under CDE?

>   -Greg

I typically run a dozen or so xterms. It starts happening within a
couple of days after I reboot.

I am not running many other apps; typically just one mozilla window, a
dtcm calendar, and half a dozen nedit windows. Yeah I know mozilla is
a swap hog, but it's iconized and the issue is the xterm process size.

--Bruce

 
 
 

1. How to get virtual memory size and working set size of a process on AIX ?

I know I should use getprocs(). It returns "struct procsinfo" object.
but there is no any document about what each field means in procsinfo
except the few comments in the header file /usr/include/procinfo.h

I wonder if anyone knows how to calculate the virtual memory size
and working set size of a process. Here is what I did, but I don't
know if it is correct. Thanks.

struct procsinfo buffer;
pid_t pid = getpid();
if (getprocs (&buffer, sizeof(buffer), NULL, 0, &pid, 1) != -1)
{
        workingSetSize = (buffer.pi_drss + buffer.pi_trss) * 4096;
        virtualSize = buffer.pi_dvm*4096 + buffer.pi_tsize;

Here is struct procsinfo:

struct procsinfo
{
        ......
        /* memory */
        unsigned long   pi_adspace;     /* process address space */
        unsigned long   pi_majflt;      /* i/o page faults */
        unsigned long   pi_minflt;      /* non i/o page faults */
        unsigned long   pi_repage;      /* repaging count */
        unsigned long   pi_size;        /* size of image (pages) */

        /* size of text */
        unsigned long   pi_tsize;       /* size of text */

        /* controlling tty info */
        unsigned long   pi_ttyp;        /* has a controlling terminal */
        unsigned long   pi_ttyd;        /* controlling terminal */
        unsigned long   pi_ttympx;      /*      "         "     channel */
        unsigned long   pi_dsize;       /* current break value */
        unsigned long   pi_sdsize;      /* data size from shared library */
        char            pi_comm[MAXCOMLEN+1]; /* (truncated) program name */

        /* memory usage info */
        unsigned long   pi_drss;        /* data resident set size */
        unsigned long   pi_trss;        /* text resident set size */
        unsigned long   pi_dvm;         /* data virtual memory size */
        unsigned long   pi_prm;         /* percent real memory usage */

2. Exabyte Mammoth on Dell PowerEdge 2300

3. Solaris: resident size of the process

4. convert .a to .so, how?

5. Process resident & total size

6. 3rd-party peripherals (disk) for RS/6000's

7. how to limit resident size of process

8. Just how good is CodeWarrior?

9. Data Set Resident Size

10. resident set size vs. real memory

11. What is Resident Set Size (RSS)?

12. ssh-agent's resident set size increase 8K after each authentication

13. Resident set size on Solaris