unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Questions about proced
Date: Sun, 07 Apr 2024 19:09:54 +0300	[thread overview]
Message-ID: <86r0fhyx0t.fsf@gnu.org> (raw)
In-Reply-To: <875xwt89f7.fsf@zohomail.eu> (message from Rahguzar on Sun, 07 Apr 2024 17:33:50 +0200)

> From: Rahguzar <rahguzar@zohomail.eu>
> Cc: help-gnu-emacs@gnu.org
> Date: Sun, 07 Apr 2024 17:33:50 +0200
> 
> Hi Eli,
> 
> > I'm not sure I understand: you do have rss in the attributes, and I
> > presume that the amount of physical RAM in the system is well known,
> > so why is it a problem?
> 
> It is a minor problem but I actually don't understand how proced is
> calculating the percentage. If I compare the percentage memory value
> from proced with that of top I see that top show a value 4 times that of
> proced. Before noticing this I though it was due to proced including
> swap but the amount swap is half the amount of ram so I would have
> expected the factor to be 1.5. Other programs also show values very
> similar to top. The problem is that if I don't remember this fact, I
> don't catch the high memory usage.

You have the sources (in sysdep.c) of what Emacs does, so you can just
look there, and then consult the various system documentation.  AFAIR,
the %Mem column should show the percentage of the physical RAM that
the process's RSS (resident set) takes.  That's what I see on 2
different systems, one MS-Windows, the other GNU/Linux.  On the latter
I compared with 'top', and it shows the same value.  So I don't think
I understand why you see something different.

> > > 2) The pcpu construct displays the percentage of cpu used by a process.
> > > However it seems like it uses a very long interval to calculate this
> > > percentage. So often processes which are basically idle now show up at
> > > the top when sorting the processes by pcpu and I can see the cpu used by
> > > them decaying slowly. Is it possible to use a shorter interval for pcpu?
> 
> > AFAIK, this is calculated by the OS, not by Emacs.
> 
> Comparing with top, I notice that value is top changes much more quickly
> compared to proced and better reflects the current load. The amount of
> total cpu time used by a process is identical between top and proced so
> I had assumed that they differed by how the calculated the current load.

You need to tell more details, like which process you are looking at
in the list (better not be the Emacs process which shows the Proced
display, for obvious reasons), whether you enabled auto-update in
Proced and with what update interval, etc. etc.



  reply	other threads:[~2024-04-07 16:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-07 15:33 Questions about proced Rahguzar
2024-04-07 16:09 ` Eli Zaretskii [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-04-06  9:57 Rahguzar
2024-04-06 17:47 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86r0fhyx0t.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).